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 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file enigmatui-1.1.0.tar.gz.
File metadata
- Download URL: enigmatui-1.1.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31ad55e5290c8224b4a989b5875b691a2a82e36f2c4d9b6c1e545b2f395451f5
|
|
| MD5 |
b4a55caecac283dc4999f353f726a244
|
|
| BLAKE2b-256 |
3c82b6847575858aef954277fd71da28635316ef6e584a9e0bfb314ac8f280ed
|
File details
Details for the file enigmatui-1.1.0-py3-none-any.whl.
File metadata
- Download URL: enigmatui-1.1.0-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ae2b3e735c58df3aaabe0b7e645fd31016f56f33a6a0b579ca96e585f52036b
|
|
| MD5 |
5e828494799cccd7444cfed5d684452d
|
|
| BLAKE2b-256 |
81d33a06a602e353e47c473f371e89ec7c1517be6540fa11101c8640e130c97c
|