A Python-based interactive simulation of the historic Enigma Machine, supporting real-time encryption, decryption, hashing, and file processing — built with both a Graphical User Interface (GUI) and Command Line Interface (CLI).
⚙️ Ideal for showcasing InfoSec knowledge, cryptographic fundamentals, and Python GUI development in academic or professional settings.
- 🧠 Enigma-based rotor encryption logic
- 🔄 Symmetric encryption & decryption logic
- 🖼️ Full-featured Tkinter GUI
- 💻 Lightweight CLI tool included
- 💾 Save & load custom configurations
- 📂 Encrypt/decrypt text files
- 🔐 MD5 + SHA256 hashing support (via GUI)
- 🔍 Verbose mode for encryption steps
- ✅ No external dependencies required
(Includes MD5 + SHA256 hash generator in GUI)
Component | Tool/Library |
---|---|
Language | Python 3.x |
GUI Framework | Tkinter |
Config Handling | JSON |
Hashing | hashlib |
Testing | unittest |
git clone https://github.com/masfaatanveer/enigma-infosec.git
cd enigma-infosec
python cli_interface.py
- Load default/custom configuration
- Enter initial key (e.g.,
MAS
) - Choose to encrypt/decrypt a message or file
- Optionally save updated configuration
python gui_interface.py
- Enter message and key
- Select rotors and reflector
- Choose Encrypt or Decrypt
- Use "Process Message" or "Process File"
- Generate MD5 + SHA256 hash with one click
With same configuration and key (MAS
):
Input Message: HELLO
Encrypted Message: XZLMP
Decrypted Message: HELLO
For input MASFA
:
#### Hashed Output:
MD5: bcf213325c01e1c47bd0622ac6a1eaf3
SHA256: 9bc72c58d0c6482ae79861fd0e5359fa8d8b5ecad32ce3c167155de3f7122a4e
python -m unittest discover -s tests
- Verifies rotor mapping symmetry
- Ensures encryption == decryption
- Checks reflector logic
Operation | Time |
---|---|
Encrypt message | Instant |
File processing | < 1s (avg) |
Save/load config | Instant |
Run full tests | ~0.3 sec |
.
├── cli_interface.py # CLI-based tool
├── gui_interface.py # GUI with Tkinter
├── enigma.py # Core Enigma logic
├── rotor.py / reflector.py # Logic components
├── config/ # Custom config files
├── tests/ # Unit tests
└── README.md
- ✅ Compatible with Windows / macOS / Linux
- ✅ No need to install any library — just pure Python
- 💡 Great for InfoSec, Cryptography Demos, or University Projects
Developed, modified & maintained by Masfa Tanveer 🧠
This project is based on Enigma logic and educational adaptations.
Licensed under MIT License
[Python] [Cryptography] [Encryption] [Decryption] [Enigma-Machine] [GUI] [CLI] [Hashing] [InfoSec] [Cybersecurity] [Tkinter] [MD5] [SHA256]
enigma-infosec
🚀 A powerful Python-based rotor encryption system with file handling, hashing, and real-time GUI/CLI support — perfect for information security use cases.