Unlike other implementations that just focus on the math, this simulator:
- Perfectly mirrors the physical machine's signal path
- Each array represents actual mechanical parts
- Every step matches real hardware:
- Keyboard input → Electrical signal
- Plugboard wires → Array swaps
- Rotating wheels → Array shifts
- Electrical path → Position tracking
- Light bulb output → Character display
- 🎮 Interactive CLI menu system
- 🔄 Message encryption and decryption
- 🔌 Configurable plugboard (swap letter pairs)
- ⚙️ Adjustable rotor positions
- 💫 Uses actual historical Enigma rotor wirings
- 🎯 Perfect encryption/decryption with reciprocal property
Want to dive deeper? Check out these detailed docs:
docs/documentation.md
: Complete technical breakdown of how each component works
- Clone the repository
- Compile with any C++ compiler:
g++ -std=c++11 main.cpp -o enigma
- Run the executable:
./enigma
Choose option (1-5): 1
Enter message to encrypt: HELLO
Encrypted message: LZFBD
Choose option (1-5): 3
Enter two letters to swap (e.g., AB): HM
Plugboard configured: H <-> M
Choose option (1-5): 4
Enter positions for left, middle, and right rotors (e.g., AAA): XYZ
Rotor positions set to: XYZ
main.cpp
: Core implementation with encryption/decryption logicenigma_display.cpp
: ASCII UI and visual interface implementation- 📁
docs/
DOCUMENTATION.md
: Technical details, hardware simulation, and implementation choicesCPP_CONCEPTS.md
: C++ concepts used and learning resourcesORIGINAL.md
: Historical Enigma machine specifications and details
README.md
: Project overview, setup instructions, and usage guide
- Each letter encrypts differently based on rotor positions
- Plugboard adds extra encryption complexity
- Matches historical Enigma machine behavior
- Simple but powerful encryption system
This project helps you understand:
- How physical encryption machines work
- Mapping hardware to software concepts
- Array manipulation and character handling
- Historical cryptography
- Modular programming
🤝 Contributing Feel free to:
Fork the project Add new features Fix bugs Submit pull requests
Made with 💻 by a student fascinated by cryptography, history, and C++!
"Sometimes it is the people no one imagines anything of who do the things that no one can imagine." - Alan Turing