Enigma, 1932–1939
The cables that did not matter
The Germans fitted Enigma with a panel of cables that multiplied the number of keys by more than a hundred billion. A 27-year-old Polish mathematician, Marian Rejewski, found a measurement the cables could not change. Below are a working Enigma, a real German message from 1941 and Rejewski's attack, run on your own device.
A machine that rewires itself at every letter
Enigma looks like a typewriter with lamps instead of paper. You press one letter and another lights up. Between key and lamp, the current passes through the plugboard, through three rotors with 26 contacts on each face, turns back in a reflector and returns by a different route. With every key press the right-hand rotor moves on one position, so the same letter typed twice usually comes out differently.
The reflector has two consequences. The machine works both ways: anyone who starts from the same position and types the ciphertext gets the plain text back. And no letter can ever be enciphered as itself. Try it: AAAAA with rotors I, II, III, reflector B and everything at A gives BDZGO.
A real machine had one copy of each rotor. Choose three different rotors.
You typed
Lit up
The rotors were the factory's secret. The cables were the day's secret. With six pairs of letters connected, as the German army used in the early 1930s, the plugboard could be wired in 100,391,791,500 ways. With ten pairs, the number reached by 1939, in 150,738,274,937,250 ways. For anyone trying every key in turn, the cables were the wall.

A message from 7 July 1941
The machine above is not an approximation. On 7 July 1941, two weeks after the invasion of the Soviet Union, a radio network of Army Group North sent a message in two parts. That day's key was recovered by Geoff Sullivan and Frode Weierud and published in their study of this army group's Enigma traffic: rotors II, IV, V, rings 02 21 12, reflector B and ten cables. Press the button and your machine decrypts it letter by letter.
What the radio picked up
What lights up (X means a space)
In English
Reconnaissance battalion from Kurtinowa, north-west of Sebezh, on the Fliegerstraße road towards Dubrowki and Opochka. Moved off at 18:30. Attack. Infantry Regiment 3 is advancing slowly but surely. At 17:06, 1st Battalion of Infantry Regiment 3 was on the Fliegerstraße, its start 16 km east of Kamenec.
That was the easy part: with the key in hand, anyone could read it. Rejewski's question, nine years earlier, was how to find the key when you do not have it.
The slip: a key typed twice
Rejewski joined the Polish army's Cipher Bureau on 1 September 1932, with two other mathematicians, Jerzy Różycki and Henryk Zygalski. By the end of the year he had reconstructed the internal wiring of the three rotors and the reflector, helped by documents sold to the French by Hans-Thilo Schmidt, a German official: among them, the daily keys for September and October 1932. With a copy of the machine, Poland still needed each day's key.
The German procedure of the time had a weakness. All operators on a network started from the same position for the day. Each chose three letters for his own message, say KYG, and typed them twice, KYGKYG, to make sure they survived radio interference. The six enciphered letters that came out, such as QZKBLX, went at the start of the message. The operator then turned his rotors to KYG and enciphered the text.
The first and fourth letters of the indicator hide the same plain letter. So do the second and fifth, and the third and sixth. Each intercepted message therefore links one letter to another, and a single case says nothing. Dozens of messages from the same day, all enciphered from the same position, fill in a whole table. Below is a day of traffic invented here, with a key chosen at random and hidden until the end.
The fingerprint the cables cannot touch
Rejewski followed the links like a route. From the day's table: if one indicator has A first and D fourth, and another begins with D and has Q fourth, the chain runs from A to D, then to Q, until it comes back to A. All 26 letters split into such loops. The same is done with places 2 and 5, then 3 and 6. Loops of equal length always come in pairs: a consequence of the reflector.
Then he noticed what mattered. The cables only rename letters, on the way in and on the way out. Renaming changes which letters sit in a loop, not how many there are. The lengths of the loops depend only on the rotor order and their position. The hundred billion possible wirings drop out of the problem. You need not take my word for it: press “Other cables”.
In mathematical language: a product of two permutations, conjugated by the cable permutation, keeps its cycle structure. Rejewski set out the argument in his 1980 paper in Applicationes Mathematicae.
A year's work, a few seconds on your phone
If the fingerprint depends only on the rotors, a list can be made in advance: for each of the 6 rotor orders and each of the 17,576 positions, the lengths of the loops. In all, 105,456 rows. The Poles built a device for it, the cyclometer: two sets of rotors wired together that lit up the loops of a position. They went through every position by hand. The job took more than a year. Once the catalogue was ready, around 1935, finding a day's key took 12–20 minutes.

The catalogue did not hand over the key. I computed all 105,456 rows, with reflector A, in use until 1937, and with the only movement the method assumed: the right-hand rotor. They give 21,225 distinct fingerprints. What the numbers mean depends on what you count. Of the fingerprints, 55% belong to a single setting. Of the settings, only 11% have a fingerprint of their own. If the day's key is any of the 105,456, all equally likely, then on half of all days its fingerprint is shared by at least 20 settings. The most common fingerprint, three pairs of 13-letter loops, belongs to 1,728 settings.
The last step uses the cables. For each candidate, the rotors without cables give loops of their own. The cables must turn those into the day's loops, all three at once, with exactly six pairs. Rejewski's team did this last elimination by hand. The button under the list automates the same condition: find six cables under which every indicator decrypts to three letters repeated twice. In 1,000 simulated days a single candidate survived every time: the day's equivalent rotor position, with the true cables. The ring settings and the window position cannot be told apart at this stage; only their difference matters.
The method had a limit. It assumed that only the right-hand rotor moves during the six letters. Published reconstructions commonly quote about 77%, that is (26 − 6)/26, counting only turnover driven by the right-hand rotor. In the full stepping model used here, the middle rotor can also move by itself at the first key press when it starts on its own notch, taking the left rotor with it. Including that case gives 20/26 × 25/26, about 74%: on roughly one day in four the fingerprint no longer matched the catalogue. The day above is chosen from the other three.
The Germans knew none of this, but they kept changing the procedure. On 1 November 1937 they replaced the reflector, and the whole catalogue had to be recalculated from scratch. On 15 September 1938 they changed how the message key was enciphered, and the fingerprint could no longer be measured. Within two months Rejewski's bomba was ready, six linked Enigmas that found the key in about two hours; six existed by mid-November 1938. Zygalski's perforated sheets came more slowly and were never completed. On 15 December 1938 rotors IV and V arrived, and the possible orders rose from 6 to 60. On 1 January 1939 the cables rose to 7–10 pairs.
In late July 1939, at Pyry near Warsaw, the Poles showed the British and the French everything they had: the methods, the sheets, the bomba. Each delegation then received a copy of the Polish-built machine. Five weeks later the war began.
Through Romania to Paris
The Cipher Bureau was evacuated from Warsaw in early September 1939. On 17 September, the day the Red Army entered Poland from the east, the staff were ordered to cross into Romania, Poland's ally. At the border a Romanian officer confiscated their vehicle and separated the military from the civilians.
Rejewski, Różycki and Zygalski feared internment: they knew German intelligence had informers in the Romanian security police. They left on their own, on the first train south, and after a dozen or so hours reached Bucharest. At the British embassy they were told to come back in a few days. At the French embassy they introduced themselves as “friends of Bolek”, the code name of Gustave Bertrand, head of French radio intelligence. A French colonel arranged their departure. By 20 October 1939 they were at work at PC Bruno, a secret station near Paris; there, on 17 January 1940, they found the first Enigma key broken in France, the one for 28 October 1939.
So three men who knew how to read Enigma passed through Bucharest in the autumn of 1939, in a country where, they believed, Germany had ears. Had they been stopped, there was a real risk that Germany would discover what Poland had learned.

Różycki died on 9 January 1942, when the French ship bringing him back from Algeria sank. Rejewski and Zygalski crossed the Pyrenees in January 1943, were arrested in Spain and reached England in August 1943. By then Enigma had become an exclusively British and American matter; they were kept out of it and set to work on SS hand ciphers. Rejewski returned to Poland in November 1946. For two decades he said nothing about his work, to avoid the attention of the communist government. He died in Warsaw on 13 February 1980.
Sources and method
The machine on the page is an Enigma I built here from the published wiring. It decrypts both parts of the 1941 message letter for letter and gives BDZGO for AAAAA; both checks run on every release, together with a comparison against a second, independent implementation.
The catalogue was computed in full: 6 rotor orders × 17,576 positions, reflector A, only the right rotor moving, as in the cyclometer's model. The result (21,225 fingerprints, 11,578 unique, largest class 1,728) is close to, but not identical with, Alex Kuhl's 2007 reconstruction as cited by Lasry: 21,230, 11,466 and 1,771. Secondary sources even disagree on Kuhl's reflector: Lasry and colleagues say A, Christensen's 2011 review says B. I tried the conventions that might explain the gap: reflector B gives 21,153, reflector C 21,337, real rotor stepping 20,882, while positions and ring settings only renumber the rows and cannot change the counts. None reproduces Kuhl's figures, and the quoted percentages (54.40%, 92.34%) do not follow from his own totals either. The proportions are very close, though: 54.5% of fingerprints are unique, 92.1% correspond to ten positions or fewer. Without Kuhl's own implementation or full paper, the difference remains unresolved.
The last step was simulated on 1,000 days with random keys: catalogue, then solving for the cables for every candidate, with exactly six pairs. Rings were random, so the target is the equivalent rotor position (window minus rings) and the cables; it was found every time and was the only survivor.
Sources differ on the date of the Pyry meeting: 25 July 1939 in Kozaczuk, 26–27 July in Erskine. The page says “late July”.
- Marian Rejewski, “An application of the theory of permutations in breaking the Enigma cipher”, Applicationes Mathematicae 16 (4), 1980, pp. 543–559: the proof that the cables leave the form of the cycles unchanged (p. 554) and the catalogue of 6 · 17,576 = 105,456 positions (p. 556). pldml.icm.edu.pl/pldml/element/bwmeta1.element.desklight-37b8813
- Geoff Sullivan, Frode Weierud, “Breaking German Army Ciphers”, Cryptologia 29 (3), 2005, pp. 193–232: Army Group North's Enigma traffic in 1941. cryptocellar.org/pubs/bgac.pdf
- Frode Weierud, daily keys for July 1941, including 7 July. cryptocellar.org/bgac/e-keys-july-1941.html
- Alex Kuhl, “Rejewski's Catalog”, Cryptologia 31 (4), 2007, pp. 326–331: a reconstruction of the catalogue. doi.org/10.1080/01611190701299487
- George Lasry, Nils Kopal, Arno Wacker, “Cryptanalysis of Enigma double indicators with hill climbing”, Cryptologia 43 (4), 2019; and Lasry's thesis (Kassel, 2018), ch. 10: Kuhl's figures, the 77% assumption and the last step, recovering the cables. kobra.uni-kassel.de/items/74307bf4-bf8c-4db7-8c18-4997db1c5465
- Chris Christensen, “Polish Mathematicians Finding Patterns in Enigma Messages”, Mathematics Magazine 80 (4), 2007: the assumption that the middle and left rotors do not move. matematiksider.dk/enigma/MAA%20article%20about%20Enigma%20.pdf
- Chris Christensen, review of Frank Carter's Bletchley Park Trust reports, Cryptologia 35 (2), 2011: Kuhl's catalogue for reflector B. doi.org/10.1080/01611194.2011.558984
- Wikipedia, “Marian Rejewski” and “Cryptanalysis of the Enigma”, for the chronology (after Władysław Kozaczuk, Enigma, 1984): the Cipher Bureau, the passage through Romania, France, England. en.wikipedia.org/wiki/Marian_Rejewski
- Wikipedia, “Enigma rotor details”: rotor and reflector wiring, the BDZGO test vector (identical to Crypto Museum). en.wikipedia.org/wiki/Enigma_rotor_details
- Franklin Heath, ciphertext and translation of the 7 July 1941 message. wiki.franklinheath.co.uk/index.php/Enigma/Sample_Messages
Images
- An Enigma I machine: Alessandro Nassiri, Wikimedia Commons, CC BY-SA 4.0
- The plugboard on the front of the machine: Bob Lord, Wikimedia Commons, CC BY-SA 3.0
- A reconstruction of Rejewski's cyclometer: Szymon Pilecki, Szymon Dąbrowski, Wikimedia Commons, CC BY-SA 4.0
- Marian Rejewski in Polish Army uniform, 1943–44: photographer unknown, Wikimedia Commons, public domain