https://github.com/bmoneill/enigma
Enigma machine simulator and Bombe
https://github.com/bmoneill/enigma
cipher cli cryptography enigma enigma-machine history
Last synced: 9 months ago
JSON representation
Enigma machine simulator and Bombe
- Host: GitHub
- URL: https://github.com/bmoneill/enigma
- Owner: bmoneill
- License: mit
- Created: 2025-07-10T15:19:41.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-09-05T18:30:08.000Z (10 months ago)
- Last Synced: 2025-09-05T20:37:18.638Z (10 months ago)
- Topics: cipher, cli, cryptography, enigma, enigma-machine, history
- Language: C
- Homepage:
- Size: 271 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Enigma machine simulator and cryptanalysis tools
[](https://github.com/bmoneill/enigma/actions/workflows/cmake-single-platform.yml).
This project aims to create a full-featured C99 library and toolset for simulating and cracking the Enigma.
The library and toolset currently supports simulating all common 3-rotor military Enigma configurations used
in World War II. It also supports cracking ciphertext utilizing multithreaded Index of Coincidence, n-gram
analysis, and brute force methods.
## About the Enigma
The Enigma was a cipher device used by the Germans during World War II to encrypt military communication.
It uses a very complex wiring system to scramble the input.
When a key is pressed, the signal first passes through the plugboard, which swaps the letter with another according
to its configuration. It then travels through three rotors, each further scrambling the signal. Next, the signal
reaches the reflector, which further scrambles the signal. Then, the signal passes through the rotors again in reverse.
Finally, the signal passes through the plugboard again, and the resulting encoded letter lights up on the lampboard.
The Enigma's encryption was symmetric — ciphertext is decrypted using the same key as was used to create it.
## Building
```shell
cmake .
cmake --build .
```
## Documentation
* [Library Documentation](https://bmoneill.github.io/enigma/).
* [Enigma Simulator Documentation](doc/enigmacli.md).
* [Enigma Cracking Tools Documentation](doc/enigmacrack.md).
## Further Reading
* [The Cryptographic Mathematics of Enigma](https://www.nsa.gov/portals/75/documents/about/cryptologic-heritage/historical-figures-publications/publications/wwii/CryptoMathEnigma_Miller.pdf)
* [Enigma Cipher Machine on Crypto Museum](https://www.cryptomuseum.com/crypto/enigma/index.htm)
* [The Turing-Welchman Bombe (National Museum of Computing)](https://www.tnmoc.org/bombe)
* [Cracking Enigma in 2021 (Computerphile on YouTube)](https://youtu.be/RzWB5jL5RX0)
## License
Copyright (c) 2025 Ben O'Neill . This work is released under the
terms of the MIT License. See [LICENSE](LICENSE) for the license terms.