How the Polish Cipher Bureau broke Enigma: from the first decryption at the end of 1932 to handing the results to the French and the British at Pyry at the end of July 1939. The path has sixteen steps in five acts. Each act begins with a German change that defeats the previous method, and each step is something you do yourself. No prior knowledge is needed.
The day number chooses the key you solve. It travels in the address from page to page, so you work on the same day along the whole path.
Enigma in the classroom: a 45- and 90-minute lesson plan, three worksheets with answer keys and printable Zygalski sheets.
On 15 December 1938 rotors IV and V were added to the box. Three rotors still went into the machine, but chosen from five, so instead of 6 rotor orders there were 60. Two weeks later, on 1 January 1939, the number of plugboard pairs rose from 5–8 to 7–10. The Cipher Bureau's methods still worked, but the work grew tenfold. See how much.
The numbers of orders, sheets and positions follow from simple arithmetic. The bomba working time is calculated from accounts of a full run taking one and a half to two hours, not a historical record. By 15 December 1938 two sets of sheets were ready, that is 52 of the planned 156.
| Date | Change | Effect on the methods |
|---|---|---|
| 1 Oct 1936 | 5–8 plugboard pairs instead of 6 | more variable plugboard |
| 2 Nov 1937* | reflector B instead of A | the catalogue has to be compiled again |
| 15 Sep 1938 | the operator chooses his own starting position | the catalogue stops working; the sheets and the bomba are invented |
| 15 Dec 1938 | rotors IV and V, 60 orders | ten times more work |
| 1 Jan 1939 | 7–10 plugboard pairs | fewer letters off the plugboard, worse conditions for the bomba |
| 1 May 1940 | message key enciphered once | females disappear; the sheets and the bomba lose their basis |
Applies to the army and air force networks; the navy and the SD changed their procedures differently. * Some literature gives 1 November.
The Cipher Bureau could not quickly make sheets for 60 orders or multiply the bomba work tenfold, and war was coming closer. At the end of July 1939, at the Bureau's centre in Pyry near Warsaw, the Poles showed the French and the British everything: the reconstructed Enigma, the methods, the sheets and the bomba. Walk the road from the first decryption to that meeting.
Bletchley Park started from Polish knowledge: the machine's wiring, the Enigma double, the sheets and the principle of the bomba. The British sheets for all 60 orders were made by the Polish method at the turn of 1939 and 1940.
The exact days of the meeting are disputed: the accounts of Bertrand and Rejewski point to 25–26 July, Denniston's pocket diary to 26–27 July. Sources: GCHQ, The Pyry Forest Meeting; R. Erskine, Cryptologia 2006; P. Kołakowski 2021; E. J. Haire 2014; M. Rejewski 1980.
Before the cyclometer existed, one had to know which rotor sat on the right. Between 1933 and 1935 Jerzy Różycki devised a method based on statistics. Take two messages from the same day with known keys that differ only in the third letter. The second starts where the first will be after a few letters, so once shifted, both pass through the same machine positions. Unless, within those few letters, the right-hand rotor has turned the middle one.
Two German texts enciphered with the same sequence of substitutions have roughly twice as many matching letters as texts enciphered with different ones. Rejewski showed this with two sentences of 26 letters:
Matches at positions 2 and 17. With a shared sequence of substitutions one expects about two in 26 letters, with different ones about one, so longer samples are needed, around 260 characters (Rejewski 1980, p. 19).
Each rotor turns the middle one at a different letter: I at Q, II at E, III at V. For each pair of messages, many matches mean “the notch lies outside the letter interval”, few mean “inside it”. Pick a rotor and see whether its notch fits all the pairs.
| Keys | Interval | Matches | Observed | Predicted |
|---|
Teaching model: reflector A, six plugboard pairs, fragments of 260 letters, threshold halfway between 1/26 and 2/26. The result is statistical and can be ambiguous; the Cipher Bureau confirmed it with further pairs. The method was still in use in 1939 on the SD network.
In autumn 1932 Rejewski knew how Enigma worked from the commercial machine, but not how the contacts inside the military rotors were connected. In December he received, through French intelligence, material from a German informant: instructions and daily key tables for two months, including the plugboard for each day. From the indicators and the habits of operators who liked keys such as AAA, he could already determine six permutations A–F, that is, how the machine enciphered a letter in places 1 to 6 at the day's ground setting. Now he had equations in which the only real unknown was the right-hand rotor.
Over six letters only the right-hand rotor turns, so the rest of the machine (the middle and left rotors and the reflector) stays fixed. Once the plugboard is removed and we move into the rotor's frame, each permutation is the previous one renamed by the same unknown transformation X. It is enough to guess where X sends one letter; the equations determine the rest, or a contradiction appears.
The calculation follows the appendix to Rejewski's account (1980) and his article in the Annals of the History of Computing (1981); here it is computed at once, Rejewski did it in pencil. The emulator takes the six permutations straight from the machine, because reading them from indicators is shown in step 2. Rejewski first assumed the entry wheel of the commercial Enigma and the equations would not close; his guess that in the military version the contacts follow alphabetical order proved right. The tables for two months, with different rotors in the right-hand position, gave two rotors, and from them the third and the reflector. The twenty-six possibilities left at the end he settled by trial on a text.
The military Enigma with every setting available, without the path or tasks. Useful in class: students encipher for each other and check that the same setting deciphers. Letters outside the Latin alphabet are skipped, and Polish letters are replaced with Latin ones.
Test setting: order II I III, reflector A, rings XMV, start position FOL, plugboard AM FI NV PS TU WZ. The text ABLABL gives PKPJXI. The same core computes in every page of the series.