Enigma TUI (Terminal User Interface)
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 usingpip 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
Metadata
Release files for enigmatui 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| enigmatui-1.2.2.tar.gz | 12.6 kB | Without provenance | Details for enigmatui-1.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| enigmatui-1.2.2-py3-none-any.whl | Python 3 | none | any | Details for enigmatui-1.2.2-py3-none-any.whl |
Total release size: 28.9 kB
Release files / enigmatui-1.2.2.tar.gz
| Download URL | enigmatui-1.2.2.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77e9192b8d53cafdadda8ef7e0cb6e8249f5ac9dc80334a66e651549b490e054
|
|
BLAKE2b-256 checksum How to use checksums |
85536cd128bddcbeca27bb639fb34da9254eeb9f92741ab64c345a4e36ec979a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / enigmatui-1.2.2-py3-none-any.whl
| Download URL | enigmatui-1.2.2-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d6352898ca7aa72f1b27ceafeba154947fbd061639e0e010e02093dba2cd55e
|
|
BLAKE2b-256 checksum How to use checksums |
fcd7e9d8bb1a21df895717173a477e806207fe25e6e304376e2c74e9972048d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for enigmatui 1.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.