The Enigma machine isn't just any encryption device - it changed history! This seemingly simple machine was so complex that breaking it led to:
- Creation of the first computer by Alan Turing
- Birth of modern computing and cryptography
- Allied victory in WWII by breaking "unbreakable" codes
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:
DOCUMENTATION.md
: Complete technical breakdown of how each component worksCPP_CONCEPTS.md
: Learn about the C++ concepts used in this project- Each file explains different aspects:
- How hardware maps to code
- Historical accuracy details
- Programming concepts used
- Step-by-step encryption process
- Clone the repository
- Compile with any C++ compiler:
g++ 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 implementationDOCUMENTATION.md
: Technical details and hardware simulation explanationCPP_CONCEPTS.md
: C++ concepts and learning resourcesREADME.md
: This file
- 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