The Enigma Machine Simulator is an educational model of the three-rotor Enigma I/M3-style signal path. It uses rotors I–V, wide reflectors B/C, an identity entry wheel, and an optional plugboard. It does not simulate military message procedures or the four-rotor M4.
A moving substitution
A rotor is a wheel with 26 contacts and fixed internal wiring. One side receives a letter, and the wiring connects it to a different contact. Rotating the wheel changes that correspondence. The right wheel moves before every letter enters the electrical path, so repeated letters need not produce repeated output.
Enigma played a major role in twentieth-century cryptography. Its historical importance includes the work of Polish cryptanalysts and later Allied teams, as well as the operational practices that influenced its weaknesses. This simulator illustrates a mechanism; it does not recreate that whole history.
Rotor order and starting positions
Order is always left, middle, right, as an operator sees the windows. Select three different wheels from I–V. Swapping two changes the signal route.
Starting positions are the three window letters before the first press. The beginner demo uses I–II–III, positions AAA, rings AAA, reflector B and no plugboard. These are demonstration settings, not a famous military key.
The machine windows show the current positions. Reset Rotor Positions restores your configured start and clears the message while retaining the rest of your settings. Clear message clears only the displayed message and continues from the current wheel positions. Reset Machine restores I–II–III, positions AAA, rings 01–01–01, reflector B, and no plugboard connections.
Ring settings: the wiring relative to the alphabet
Ringstellung adjusts the alphabet ring relative to the wiring core. Each ring supports A–Z (A corresponds to historical 01). Rings change the electrical offset. In these wheels, the notch travels with the alphabet ring, so the turnover letter visible in the window stays the same when a ring setting changes.
Reflector and the return trip
The reflector connects contacts in pairs and sends the signal back through the wheels in reverse order and through the plugboard again. The result illuminates one lamp. An Enigma letter never encrypts to itself, a property that also helped cryptanalysis.
Expand How this key traveled to see the actual input/output letters at each stage for the latest key. The illustrated pulse summarizes that route; it is not a drawing of every wire.
Plugboard pairs
The plugboard exchanges letters before and after the rotor assembly. In Advanced mode, select two unconnected letter sockets beneath the keyboard to join them. Select a connected socket to remove that pair. Keyboard users can Tab to each socket and activate it with Enter or Space. You can also enter space-separated pairs such as AM FI NV and choose Apply pairs. A letter can belong to only one pair, self-pairs are rejected, and at most ten pairs are supported. Pair chips remove individual connections; Clear Plugboard removes all connections. Connected sockets display their partner letter, so color is not required to identify a pair.
Copy, import, and random setup
The configuration summary distinguishes selected starting positions from current windows. Copy Settings exports the selected starting positions with rotor order, numeric rings, reflector, and plugs. Paste that five-line format into Paste Machine Settings in Advanced mode, then choose Import Settings. Import validates every field before applying it, clears the message, and restores the imported start. Randomize Setup creates a valid configuration for exploration; it is not a historical daily key.
Why the middle wheel double-steps
This is not a simple odometer. Before each press, the machine checks the right and middle notch positions. The right wheel always advances; a right notch advances the middle wheel; a middle notch advances both the middle and left wheels. Consequently, the middle wheel can advance on two successive presses.
With I–II–III, the window sequence ADU → ADV → AEW → BFX demonstrates the double step. Notch turnover letters are Q, E, V, J and Z for I, II, III, IV and V respectively.
Use the simulator
- Open Enigma Machine Simulator. Stay in Simple mode to begin.
- Type in Input message, or click a round machine key. Focus the machine body to type physical keyboard letters; other fields keep their normal keyboard behavior.
- Watch the wheels, lampboard and latest-key text. Typing processes immediately. Process / replay animates messages up to 120 characters; larger messages finish instantly.
- Copy the output or expand the signal explorer. The simulator accepts up to 10,000 characters; it does not upload messages.
- Switch to Advanced mode for rotor order, starting positions, rings, reflector and plugboard. Mode changes preserve your settings. Setting changes reprocess the current message from the new starting positions.
Only ASCII A–Z is processed; ASCII lowercase becomes uppercase. Spaces, punctuation, digits and other Unicode are preserved exactly and do not advance the machine. This is a convenience for learning, rather than the original operator's message-preparation procedure. HTML-looking strings are text, never executable content.
The same settings decrypt
Enigma is reciprocal. With identical rotor order, rings, plugboard, reflector and starting positions, processing ciphertext produces the original uppercase message. Decrypt this output restores the configured start and processes the current ciphertext. You can also copy the ciphertext, reset to the starting positions, and paste it into Input message.
For the default demo settings, AAAAA produces BDZGO, and HELLOWORLD produces ILBDAAMTAZ. Preserved spaces appear unchanged, so HELLO WORLD produces ILBDA AMTAZ.
History, not modern protection
Enigma is historically important but cryptographically obsolete. Do not use it to protect sensitive modern information. Rotor ciphers are not a substitute for modern authenticated encryption, and this simulation does not provide integrity, authentication, or strong modern confidentiality.
References and next step
Historical wiring/turnover data: David Hamer's table at the Enigma Museum. Implementation reference and comparison vectors: Py-Enigma documentation.
Return to the interactive machine and try changing one ring or one plugboard pair. Compare the route in the signal explorer.
