Skip to main content

Enigma TUI is a Terminal User Interface for Enigma machines, allowing you to simulate different Enigma machine models from the terminal

Project description

Enigma TUI (Terminal User Interface)

Enigma TUI

Enigma TUI is a Terminal User Interface for Enigma machines, allowing you to simulate different Enigma machine models from the terminal.

Built with Python, it employs enigmapython as Enigma engine and textual to render the interface.

Prerequisites

  • Python 3.11
  • Clone this repo, checkout the desired branch/tag and install requirements (pip install -r requirements.txt) or directly from PyPI using pip install enigmatui

How to run Enigma TUI

Use Python to run Enigma TUI's package

$ python -m enigmatui

Enigma TUI online version

An online version of Enigma TUI exists thanks to the Render's free plan. If you'd like to test Enigma TUI before installing it locally, please refer to https://enigma-tui.onrender.com/

How it works

Reading the usage instructions is more difficult than using the application itself.

Enigma TUI has a fairy simple user interface with a couple of screens to let you configure an Enigma machine (among the supported models) and encrypt/decrypt messages, plus seeing in realtime the machine internals (rotors positions, wirings) and how a single letter is scrambled from the keyboard to rotors, through reflector and back up to lamp.

Please refer to the following flowchart to navigate the app.

flowchart TD
%% Nodes
    A("Splash screen")
    B("Main screen")
    C("Configure screen")
    D("De/Encrypt screen")


%% Edge connections between nodes
    Start([Start]) --> A
    A -- Go to app --> B 
    C -- Save and exit --> B
    B -- Configure --> C
    B -- De/Encrypt --> D
    D -- Back --> B
    A -- Quit --> End([Stop])
    B -- Quit --> End([Stop])
    C -- Quit --> End([Stop])
    D -- Quit --> End([Stop])
    

Anytime you can press ctrl-q to quit the application.

Run Enigma TUI in development mode

By following this procedure, you leverage pytest-watch to live reloading the application upon Python code change. In addition, thanks to the textual run command with its --dev flag, changing the stylesheets reflects to the interface instantly.

$ pip install -r requirements-dev.txt
$ cd src/tui
$ pip install -e .
$ ptw --runner "textual run --dev  enigmatui/__main__.py"      

The above commands are valid provided that you cloned the enigma-tui repository from GitHub and your terminal is in the repository's root directory.

Enigma references

If you want more details about how an Enigma machine works, especially to understand the difference between the machine models, rotors types ans so on, I can not suggest you a better reference than Crypto Musem

Support

Found it useful/funny/educational? Please consider to Buy Me a Coffee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enigmatui-1.2.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enigmatui-1.2.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file enigmatui-1.2.0.tar.gz.

File metadata

  • Download URL: enigmatui-1.2.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for enigmatui-1.2.0.tar.gz
Algorithm Hash digest
SHA256 e35258c6eb8226560c66d337e55c13df87efb56882f2613d4a20c4c75d8709f7
MD5 4117d82f405e42fec7912b7c3ddb1f69
BLAKE2b-256 ca6b7b1fcb90f97bd28f4e9b07ea70f8c5b1c14ae088b84b28c3b8b6ca8e6721

See more details on using hashes here.

File details

Details for the file enigmatui-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: enigmatui-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for enigmatui-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dcf50c93b4ac0c5f0a68a57e8d348ef4d587d59f545a23700e9740d9a93696d5
MD5 72312f03aaefdd7c3bc4199311c93c76
BLAKE2b-256 634b716b2f1c9f9587799bdc31dd568673d775709894db70c78e1898d3fae21e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page