Step 1 of 4
How the Enigma Machine Works
Before you use the simulator, understand what happens electrically with each keypress — and why one seemingly minor design choice made the whole machine breakable.
The Machine
The Enigma was an electromechanical cipher machine. Each keypress sent an electrical signal through a fixed sequence of components and back again. Because of the reflector, the same settings used to encrypt a message could also decrypt it in reverse — meaning the sender and receiver only needed to share one key, not separate encryption and decryption keys, making the Enigma machine cipher symmetrical (self-reciprocal):
The signal passes through the three rotors, bounces off the reflector, and returns through the same rotors (now in reverse) before lighting a lamp. The arrows represent the path of the electrical signal.
Four Key Parts
Keyboard
26 keys (A–Z), no digits, spaces or punctuation. Pressing a key mechanically advances the fast rotor before the electrical signal can propagate — meaning every letter is encrypted differently even if you type the same letter twice.
Lampboard
26 lamps (A–Z) that light up to show the encrypted letter. For example, if you press A and the lamp for G lights, that means A is encrypted as G with the current settings. The lampboard also shows the output of each keypress in real time as the rotors advance.
Rotors (Walzen)
Each rotor is a disk with 26 internal wires connecting the 26 contacts on one face to 26 contacts on the other — a fixed letter-substitution permutation. The Wehrmacht used five rotors (I–V); each daily key specified which three to use and in what order. The ring setting (Ringstellung) rotates the wiring relative to the letter ring, offsetting both the substitution and the turnover notch.
Reflector (Umkehrwalze B)
A fixed disk that pairs up all 26 letters (A↔Y, B↔R, …). It sends the signal back through the rotors in reverse — making Enigma self-reciprocal (same settings decrypt as encrypt). Crucially, no letter can map to itself.
Plugboard (Steckerbrett)
Up to 10 cables swap letter pairs (e.g. A↔F means pressing A routes as if F was pressed, and vice versa). Unpaired letters are unaffected. The plugboard multiplies the number of possible keys by over 150 trillion compared to rotors alone.
The Daily Key — Codebook
Every day, operators would receive a codebook page listing that day's settings: which rotors to use and in what order (Walzenlage), the ring settings (Ringstellung), the plugboard pairs (Steckerverbindungen), and indicator groups (Kenngruppen) used to identify the key in use. Below is a fictional example of one such page.
| Datum | Walzenlage | Ringstellung | Steckerverbindungen | Kenngruppen | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| L | M | R | L | M | R | pairs | groups | |||||||||||||
| 30. | V | I | III | 22 | 04 | 16 | TURQPLSINF XWDZGAYVMB | oabhvsilgwtm | ||||||||||||
| 29. | I | III | II | 02 | 18 | 05 | ARDQLPMFES KTYZHWCOUG | haxoqakpayyt | ||||||||||||
| 28. | II | III | IV | 14 | 25 | 11 | BIXCOFRTMG DVSKJEHLUW | nalcloxazbab | ||||||||||||
| 27. | V | II | I | 17 | 23 | 08 | ZATDWIVROX PQFSCMHYBU | kwqrsuuvtrmw | ||||||||||||
Rotor Stepping
Before each keypress, the rotors advance — making the substitution different every time:
-
RightFast rotor — advances on every single keypress.
-
MiddleMedium rotor — advances when the fast rotor passes its notch position.
-
LeftSlow rotor — advances when the medium rotor passes its notch.
Double-Stepping Anomaly - Sidenote
When the medium rotor is at its own notch position, it steps itself and the slow rotor simultaneously (instead of just the slow). This means some positions cause two consecutive advances of the medium rotor — an unintended mechanical quirk that the Bombe simulation replicates faithfully.
The total number of distinct positions is 26³ = 17,576. The Bombe tests all of them to find which one is consistent with the crib.
The Critical Weakness
The reflector always routes current back on a different path. This means:
A letter can NEVER encrypt to itself.
If you suspect a ciphertext contains the word "WEATHER" and you see the letter W in the ciphertext at that position — that position is immediately impossible. No rotor setting could produce it.
"The Germans regarded this as a strength — you could not accidentally send an unencrypted letter. But for the codebreakers it was the gift that made everything possible."
Enigma UI Walkthrough
Open Settings
Click the Settings button (gear icon) in the Enigma panel. Choose which three rotors (I–V) to use, their order (slow / medium / fast), ring settings (keep at 1/1/1 for Bombe compatibility), and plugboard pairs.
Set Starting Position
Use the ▲ / ▼ buttons next to each rotor window to set the starting letters (e.g. AAA). This is the daily key's ground setting (Grundstellung).
Type Your Message
Click the on-screen keyboard or type on your physical keyboard. Each keypress lights a lamp (ciphertext letter) and the output builds up in the right panel. The rotor windows update after every letter.
Reset
The Reset button (↺) returns the rotors to their starting position and clears the output, without changing any settings. Use this to re-encrypt from the same starting point.
⚠ Keep Ring Settings at 1/1/1
The Bombe in this simulation always assumes ring settings of 1/1/1. If you use non-default ring settings on the Enigma page, the notch positions of the rotors will shift — and the Bombe will find 0 stops because it models the wrong stepping sequence. This is historically accurate: ring settings were resolved separately by Bletchley analysts.