Rotors step
Before any current flows, the right rotor advances one notch. When a notch lines up, it also carries the next rotor along — an odometer with a famous quirk.
Chiffriermaschine · 1918 – 1945
The cipher machine that kept a war’s secrets — rebuilt to the last wire. Type on it. Watch the current race through rotors, reflector and plugboard. Then take it apart.
01 · The machine
Use your keyboard or tap the keys. Every press turns the rotors first, then sends current on its journey — so the same letter never gives the same answer twice in a row.
02 · Inside the machine
This is the same machine, cut open. Press any letter: the rotors step, then current flows in through the plugboard and all three rotors, bounces off the reflector, and runs back out by a different route to light a lamp.
Before any current flows, the right rotor advances one notch. When a notch lines up, it also carries the next rotor along — an odometer with a famous quirk.
Up to ten cables swap pairs of letters. A cable between A and T turns every A into T (and T into A) — on the way in and on the way out.
Each rotor is a scrambled substitution wired inside a disc. Current passes right → middle → left, and because the discs turn, the substitution changes with every letter.
A fixed plate pairs the 26 letters and sends the current back through the rotors on a different path. It makes Enigma reversible — and forbids a letter from becoming itself.
The return trip (left → middle → right, then the plugboard again) ends at a lamp. The operator reads it off and writes it down. Press → lamp: about a blink.
03 · Rotors & stepping
A rotor is a disc with 26 contacts on each face, joined by 26 scrambled wires. Turn the disc and the same contact leads somewhere new. Pick a rotor, turn it, and follow one contact.
Outer letters are fixed contact positions on the right face; inner letters are positions on the left face. The bright wire is the one currently carrying a signal that enters at A (click any outer letter to change it). Turn the rotor and watch the answer change.
Only the right rotor moves on every keypress. Notches cut into the alphabet rings let pawls push the neighbouring rotor along. Because the middle rotor’s pawl also pushes the middle rotor itself, it steps twice in a row once in a while.
04 · How an operator used it
An Enigma is only as secret as its settings. The machine itself was assumed to be known to the enemy — what mattered was the key. Here’s the routine, in six steps.
Every network had a monthly sheet listing, for each day, the rotor order (Walzenlage), ring settings (Ringstellung) and plugboard pairs (Steckerverbindungen). Everyone on the net used the same day key.
Three of the five (later eight) rotors go on the spindle in the listed order. The ring (alphabet ring) is rotated relative to the wiring core and locked — it moves the turnover point without changing the start letter you see.
Ten cables go into the Steckerbrett on the front, each joining two letters. Six letters stay unplugged. This single step multiplies the number of possible keys by about 150 trillion.
The operator picks three random letters as the Grundstellung, turns the rotors to them, then invents a random message key and types it once. The three lamp letters are the encrypted message key (the indicator).
Rotors go to the message key letters, and the message is typed one letter at a time while a second person writes each lamp. Spaces were usually sent as X.
The ciphertext goes out in Morse with the ground setting and encrypted message key in front. The receiver sets the same day key, reverses steps 4–5, and reads plaintext. That’s the whole trick: same machine, same key.
settings for three of five rotors and ten cables — before counting ring settings. Nobody could try them all, by hand or by 1940s machinery.
With three rotors the substitution alphabet repeats only after 16,900 letters (26×25×26, because of the double step). Short messages never repeat — no frequency analysis.
05 · How it was broken
The reflector that made Enigma convenient also made it impossible for any letter to encrypt to itself. Codebreakers turned that one tiny rule into a weapon.
Hold down the same key for a thousand presses. The machine will scramble it however it likes — except into itself.
Bletchley Park often knew (or guessed) a fragment of plaintext — a crib — because messages started the same way (WETTERBERICHT, “weather report”) or ended with the same phrase. Slide the crib along the ciphertext: any position where a crib letter sits above the same cipher letter is impossible. That cuts the search before a Bombe even starts.
Polish mathematician Marian Rejewski reconstructs the wiring of the Army Enigma using permutation theory and a few leaked documents.
Weeks before war, the Poles hand their replicas and methods to French and British intelligence at Pyry, near Warsaw.
At Bletchley Park Alan Turing and Gordon Welchman build the electromechanical Bombe, which tests rotor settings against a crib at speed.
06 · A short history
Engineer Arthur Scherbius patents the idea; commercial Enigmas follow in the early 1920s, sold to banks and businesses.
The German Navy (1926) and Army (1928) adopt Enigma. A plugboard is added, and the three-rotor Enigma I becomes the standard Wehrmacht machine.
Marian Rejewski, Jerzy Różycki and Henryk Zygalski of the Polish Cipher Bureau read Enigma traffic, building on documents supplied through French intelligence.
With invasion looming, the Poles reveal their methods and replicas to British and French delegations.
Turing and Welchman develop the Bombe. The first one, Victory, is running in March 1940. Hundreds follow.
U-boats switch to a four-rotor “M4” Enigma. Bletchley goes dark on naval traffic for about ten months before breaking it again.
Allied use of “Ultra” intelligence stays classified for decades; it became public only in the 1970s.
This simulator implements the Wehrmacht Enigma I with rotors I–VIII, reflectors B and C, ring settings, the plugboard and the real stepping mechanism including the double step. It reproduces standard published test vectors (for example, rotors I-II-III, reflector B, all at A, turns AAAAA into BDZGO). The four-rotor naval M4 is not modelled.