Using it
Type a message and the Enigma output appears in groups of five letters, as operators wrote it down. Set the machine with the boxes above. Rotors takes three names from I to VIII, left to right, such as I IV III; for the four-rotor naval M4, put Beta or Gamma first and pick a thin reflector. Rings and Start take three letters, or numbers from 01 to 26 as the Army's key sheets printed them. Plugboard takes up to 13 pairs, such as AD CN ET.
To decrypt, keep the same settings and type the ciphertext: Enigma is its own inverse, so the same machine turns the ciphertext back into the message. The page opens on the day key from German Wikipedia's worked example, rotors I IV III, rings 16 26 08 and ten plugboard pairs, so you can follow along with it.
How it works
Each key press first turns the rotors, then sends a current through the plugboard, which swaps letters in pairs; through the three rotors, each a wired disc that scrambles the alphabet; into the reflector, which sends it back; through the rotors again by a different route; and through the plugboard once more to light a lamp. Because the rightmost rotor turns with every key, and the others turn like an odometer's wheels, the scrambling changes with every letter.
The reflector is what makes the machine its own inverse, so one machine could both encrypt and decrypt. It also means a letter can never come out as itself, a flaw the codebreakers used: a guessed word could be ruled out at any position where one of its letters matched the ciphertext.
The double step
Rotors don't turn quite like an odometer. When the middle rotor reaches its own notch, it steps again on the next key press, taking the left rotor with it. Starting from ADU with rotors I II III, the windows read ADV, AEW, then BFX: the middle rotor moved twice in a row. This simulator reproduces that, which is why its output matches the real machines'.
The rotors
| Rotor | Wiring (A to Z goes to) | Turnover |
|---|---|---|
| I | EKMFLGDQVZNTOWYHXUSPAIBRCJ | Q to R |
| II | AJDKSIRUXBLHWTMCQGZNPYFVOE | E to F |
| III | BDFHJLCPRTXVZNYEIWGAKMUSQO | V to W |
| IV | ESOVPZJAYQUIRHXLNFTGKDCMWB | J to K |
| V | VZBRGITYUPSDNHLXAWMJQOFECK | Z to A |
| VI | JPGVOUMFYQBENHZRDKASXLICTW | Z to A and M to N |
| VII | NZJHGRCXMYSWBOUFAIVLPEKQDT | Z to A and M to N |
| VIII | FKQHTLXOCBJSPDZRAMEWNIUYGV | Z to A and M to N |
| Beta (M4) | LEYJVCNIXWPBQMDRTAKZGFUHOS | doesn't turn |
| Gamma (M4) | FSOKANUERHMBTIYCWLQPZXVGJD | doesn't turn |
Breaking it
Arthur Scherbius invented Enigma at the end of the First World War, and his firm began selling it in 1923. Around December 1932, Marian Rejewski of the Polish Cipher Bureau used the mathematics of permutations, and flaws in how the Germans sent their message keys, to break the military machine. In July 1939, weeks before the war, the Poles shared their methods and equipment with the British and French.
At Bletchley Park, Alan Turing designed the British bombe in 1939, building on the Polish bomba, and Gordon Welchman added an important improvement in 1940. The intelligence from Enigma and other ciphers, codenamed Ultra, is widely believed to have shortened the war.
Questions
How many settings did Enigma have?
With three rotors chosen from five, the ring settings and ten plugboard pairs, the Army machine had about 159 quintillion (158,962,555,217,826,360,000) settings.
Why does the output skip my numbers and spaces?
Enigma had keys for A to Z only. Operators spelled numbers out and used X for punctuation.
Can I decode a real wartime message here?
Yes, if you know its settings: the rotors, reflector, rings, plugboard and start position.
Sources
- Wikipedia: Enigma rotor details
- Wikipedia (German): Enigma (Maschine), the worked message
- Wikipedia: Enigma machine
- Wikipedia: Bombe
Added . What's new



