Ciphers · EnigmaEnigma machine simulator I · II · III
An Enigma cipher simulator of the Enigma I: three rotors out of five, a reflector, ring settings and a plugboard. Press the keys — the rotors turn and a lamp lights up with the cipher letter. To decrypt, set the same settings and type the ciphertext.
Everything runs in your browser — the text goes nowhere
To decrypt, set the same settings and type the ciphertext — Enigma is reciprocal.
Left
Middle
Right
Reflector
Daily keyB | I II III | 01 01 01 | AAA | —
Only the machine settings go into the link — never the text.
02
Signal path
last letter: A → O
Key→A
Plugboard→A
Rotor III→G
Rotor II→R
Rotor I→U
Reflector BU → C
Lamp←O
Plugboard←O
Rotor III←O
Rotor II←V
Rotor I←Y
The current runs from the key through the plugboard and the three rotors from right to left, bounces off the reflector and comes back by another path. That is why a letter never turns into itself: just now A became O.
03
History
1918
Invention
Arthur Scherbius patents a rotor cipher machine. At first it is sold to banks and the post office.
1926–45
Wehrmacht
The German army and navy adopt Enigma. Settings change every day from printed key sheets.
1932 · 1940
Broken
Rejewski reconstructs the rotor wiring; at Bletchley Park Turing and Welchman build the Bombe.
A ≠ A
Weakness
A letter never encrypts to itself — codebreakers used this to discard wrong guesses about the text.
04
Frequently asked questions
A key press sends current through the plugboard, three rotors from right to left and the reflector, then back by another path — and a lamp lights up with the cipher letter. Before every press the right rotor turns one step, and the middle and left ones turn when their neighbour reaches its notch. So the same letter is enciphered differently each time, and the rotor positions repeat only after 16,900 presses.
Set the same settings as the sender: rotor order, reflector, ring settings, the starting letters in the windows and the plugboard pairs. Then type the ciphertext — the machine returns the plain text. There is no separate decrypt mode: Enigma is reciprocal, and one operation does both jobs. Without the settings you cannot decrypt it — there are far too many keys to try them all.
Because of the reflector: it turns the current back through the rotors along a different wire, so the signal can never arrive at the key it left from. That was the price of a reciprocal cipher. Codebreakers laid an expected word such as “WETTERBERICHT” (weather report) against the ciphertext and discarded every position where any letter matched itself.
The ring setting (Ringstellung) turns a rotor’s wiring against the letters in its window: with ring 02 the same rotor at the same window letter enciphers differently — AAAAA becomes EWTYX instead of BDZGO. The plugboard swaps letters in pairs before and after the rotors. The army used 10 pairs, and the plugboard alone gave about 150 trillion possible keys.
Polish mathematicians came first: Marian Rejewski, Jerzy Różycki and Henryk Zygalski. In 1932 Rejewski reconstructed the rotor wiring from intercepted messages. In 1939 the Poles handed their work to Britain and France. At Bletchley Park, Alan Turing and Gordon Welchman built the Bombe — an electromechanical machine that ran through rotor positions and ruled out the impossible ones.
Set rotors I, II and III, reflector UKW-B, rings 01-01-01, starting letters AAA and an empty plugboard. Type AAAAA — you should get BDZGO, and the windows stop at AAF. It is the standard test that simulators are checked against. To check the double step, start from ADU: three presses give the windows ADV, AEW and BFX.