The design flaws that broke Enigma
Enigma was not broken by brute force. Even the three-rotor army machine had about 1023 possible daily settings, and the M4 has many more. It was broken because its structure leaked information, and because of how it was operated. Every flaw below is reproduced exactly in this simulator. Each one has a live demonstration running on the real cipher engine.
Operating manual
Instructions for the Schlüssel M, Form M4 (“Enigma M4”), introduced by the Kriegsmarine on 1 February 1942 for the U-boat fleet. These instructions follow the order an operator worked through, translated into English.
1. The parts of the machine
- Keyboard Tastatur
- 26 keys in the German QWERTZ order. No numbers, no punctuation and no space bar. Pressing a key first moves the rotors, then closes an electrical circuit.
- Lampboard Glühlampenfeld
- 26 lamps in the same order as the keys. While a key is held down, exactly one lamp lights. It shows the enciphered (or deciphered) letter.
- Plugboard Steckerbrett
- The panel on the front. A cable plugged between two sockets swaps those two letters both on the way into the rotors and on the way out. Sockets with no cable connect a letter to itself.
- Entry wheel Eintrittswalze, ETW
- A fixed disc that connects the plugboard to the rotors. On military machines it is wired straight through: A to A, B to B, and so on.
- Three rotors Walzen
- Chosen from eight (I–VIII). Each one scrambles the alphabet with its internal wiring and turns as you type. Rotors VI, VII and VIII were only issued to the navy.
- The Greek rotor Zusatzwalze
- The thin fourth rotor, Beta (β) or Gamma (γ), sits to the left of the three rotors. It can be set to any position but never turns while you type.
- Reflector Umkehrwalze, UKW
- The thin reflector B or C, at the far left. It sends the current back through the rotors by a different path. It cannot be turned.
- Thumbwheels and windows
- Each rotor has a serrated thumbwheel that sticks up through the inner lid, and a small window that shows the letter it is set to.
2. Setting the daily key
The daily key comes from the key sheet (Schlüsseltafel) for the current month. A typical row looked like this:
| Day | Umkehrwalze | Walzenlage | Ringstellung | Steckerverbindungen |
|---|---|---|---|---|
| 25 | B | β II IV I | 01 01 01 22 | AT BL DF GJ HM NW OP QY RZ VX |
- Reflector. Fit the thin reflector named in the Umkehrwalze column, B or C.
- Rotor order. Open the inner lid. Take the Greek rotor and three rotors named in Walzenlage from the box and put them on the axle, left to right. Each rotor can only be used once.
- Ring settings. Before fitting each rotor, turn its alphabet ring against the wiring core until the dot lines up with the number in Ringstellung (01 = A, 02 = B … 26 = Z). The ring carries the letters and the turnover notch. The core carries the wiring.
- Plugboard. Connect a cable between each pair of letters in Steckerverbindungen. The navy normally used 10 cables, which left 6 letters unplugged.
- Close the inner lid.
3. Setting the message position
Every message starts from its own rotor position (Grundstellung), four letters chosen for that message. Turn the thumbwheels until the four windows show those letters, reading left to right: Greek, left, middle, right.
In service, navy operators did not pick these letters freely. They chose them from a book of indicator groups (Kenngruppenbuch) and disguised them with bigram substitution tables before sending them with the message. The army and air force used a different scheme: a start position sent in the clear, and the real message key enciphered from it. Lesson 5 under How it works walks you through that procedure step by step, as sender and receiver. On the Machine tab you set the position directly.
4. Enciphering
- Write the plaintext in German using the conventions in section 6.
- Press each letter firmly, one at a time. Before the contact closes, the right rotor moves on one place, and sometimes the middle and left rotors move too.
- Read the lamp that lights while the key is held down, and have a second operator write it down.
- Send the ciphertext in groups of four letters, the navy standard.
A lamp never shows the letter of the key you pressed. This is not a fault. It is built into the machine, and it was one of Enigma’s biggest weaknesses (see Design flaws).
5. Deciphering
Set up exactly the same daily key and message position, then type the ciphertext. The plaintext appears on the lamps. There is no “decrypt mode”: because of the reflector, the machine is its own inverse. If A becomes Q at a given position, Q becomes A at that same position.
6. Writing conventions
The keyboard only has 26 letters, so operators spelled everything else out. Typical navy usage:
- X marks a full stop or the end of a sentence. XX was often used as a colon.
- Numbers are spelled out: EINS, ZWO (not ZWEI, so it can’t be confused with DREI), DREI, VIER, FUENF, SECHS, SIEBEN, ACHT, NEUN, NUL/NULL.
- Y separates numbers and groups of figures, for example
DREIYZWO. - J often enclosed proper names, as in
JLOOKSJ(the commander’s name, Looks). - Umlauts were written out: Ä = AE, Ö = OE, Ü = UE, ß = SS.
- Stereotyped openings and weather reports (WETTERVORHERSAGE, KEINEBESONDERENEREIGNISSE) were common. The Allies used them as cribs: guessed plaintext.
7. Talking to three-rotor stations
Shore stations and surface ships still used three-rotor machines. With the Greek rotor Beta at position A, ring A and the thin reflector B, the M4 enciphers exactly like a three-rotor M3 with the standard reflector B. Gamma with thin reflector C matches M3 reflector C in the same way. The same holds for any matching ring and position on the Greek rotor, as long as the two cancel out. You can check this on the Design flaws page.
8. Using this simulator
| Press a key | Type A–Z on your keyboard, or click a key on the 3D machine. Hold the key to keep the lamp lit. Like the real keyboard, only one key works at a time. |
| Turn a rotor | Click its thumbwheel or the letters on its ring (Shift-click or scroll to turn it back), or use ▲ ▼ in the side panel, or type four letters into the position box. |
| Plug a cable | Click one socket on the front plugboard, then another. Click a plugged socket to pull the cable out. Or type the pairs into the Plugboard field. |
| Look inside | “Open lid” swings up the inner cover so you can see the rotors, reflector and entry wheel. Drag to orbit and scroll to zoom. |
| Signal trace | The strip at the bottom of the 3D view follows each key press through the plugboard (Plug), the rotors (R, M, L, then β or γ for the Greek rotor) and the reflector (UKW), then back again. |
| Decrypt it back | Returns the rotors to the start position and types the lamp output back in. The original text reappears. |
9. Exercise: break into a real U-boat message
On 25 November 1942, U-264 under Kapitänleutnant Hartwig Looks sent a report after being forced to dive by an escort. Bletchley Park could not read M4 traffic at the time. The message stayed unbroken until 2006, when the M4 Message Breaking Project solved it with distributed computing.
- On the Machine tab, click Load a real intercept: U-264. This sets UKW-b, β II IV I, rings 01 01 01 22 (A A A V), plugs AT BL DF GJ HM NW OP QY RZ VX, start position VJNA.
- Click Type it on the machine and watch the lamps.
- The tape begins
VONVONJLOOKSJ…: “from from ‘Looks’”, repeated to make sure the sender was read correctly.