C++

Enigma Machine CLI

A command-line simulation of the WWII Enigma cipher machine, built to actually understand the mechanism rather than just read about it. It models the rotor wiring, stepping mechanism (including the double-step anomaly), reflector, and plugboard, and encrypts/decrypts text the same way the real hardware did.

Implementing the rotor stepping correctly was the part that forced the most careful thinking — it’s easy to get the basic substitution right and still get the stepping sequence subtly wrong.

View repository →