Technology · 2026-10-04 · 7 MIN
A Parcel at Warsaw Customs
The Enigma story is usually told from Bletchley Park. It starts seven years earlier in Warsaw, with a parcel a German firm wanted back very badly, a course for mathematics students that only three people finished, and a 27-year-old who worked out the wiring of a machine he had never seen. In July 1939 the Poles gave everything they had to the British and French.
Most people know the Enigma story from The Imitation Game, in which Alan Turing and a team at Bletchley Park build a machine and break the unbreakable German cipher. The film gets the place and the decade roughly right. It leaves out that the cipher had already been broken, seven years before the war, by a young mathematician in Warsaw.
The story starts with a parcel.
The parcel
At the end of 1927, or possibly early in 1928, a box arrived from Germany at the customs house in Warsaw. It was declared as radio equipment. It had been sent by mistake, and a representative of the German firm turned up demanding, very insistently, that it be returned before it cleared customs.
That was the mistake. The customs officers grew suspicious and called the Polish General Staff's Cipher Bureau. It was a Saturday afternoon, so, as Marian Rejewski later recalled, the bureau's people "had time to study the matter at leisure." They opened the box carefully. Inside was not a radio but a cipher machine, the commercial version of the Enigma. They examined it and closed it up again.
On 15 July 1928 the first machine-enciphered messages from a German military station went out over the air, and Polish listening stations began picking them up. The bureau's German section tried to break them, and failed.
Three students
The Poles drew a conclusion that turned out to matter more than anything else they did. A cipher machine was a mathematical object, so the people to attack it would be mathematicians.
From January to May 1929 the Cipher Bureau ran a secret cryptology course in Poznan, according to the history published by Poland's own foreign intelligence agency. Twenty-three students were selected. Only three completed it: Marian Rejewski, Jerzy Różycki and Henryk Zygalski. By 1 September 1932 all three were working in the bureau's German cipher section in Warsaw.
A spy in Berlin
At the same time, in another country, a German civil servant was selling secrets. In November 1931 Hans-Thilo Schmidt, who worked in the German defence ministry's cipher office, walked into the French embassy in Berlin and offered documents for sale. On 8 November he met a French agent at a hotel in Verviers, in Belgium. The French officer in charge, Gustave Bertrand, paid to photograph two manuals explaining how the military Enigma was operated.
The French concluded the documents were of limited use. As a Lancaster University account of the episode puts it, they "would enable them to encipher messages using Enigma, but not to decipher them." The manuals said how to use the machine. They did not say how its rotors were wired, and without the wiring nothing could be read. Bertrand passed the material to the Poles anyway, along with Schmidt's later handover of the daily key settings for September and October 1932.
What Rejewski saw
An Enigma had three rotors, each a disc with 26 contacts on each side and the wires inside crossing in a fixed, secret pattern. Every key press sent current through all three rotors, off a reflector and back, and then the right-hand rotor stepped on one place, so the next letter went down a different path. A plugboard at the front swapped pairs of letters before and after. The number of possible settings was enormous.
The weakness was in the procedure, not the machine. Each operator picked a three-letter key for his message, set the rotors to it, and typed it twice at the start of the message to guard against errors. So if he chose ABC, he typed ABCABC, and six enciphered letters went out over the air. The first and fourth letters were both encipherments of the same letter, A. So were the second and fifth, and the third and sixth.
That gave Rejewski a pattern to work with. With enough messages from a single day, every one starting with a doubled key, he could link the first letter to the fourth across all of them, and build up a chain of letters that eventually looped back to where it started. The lengths of those loops were fixed by the rotor settings of the day. As the mathematician Bill Casselman explains for the American Mathematical Society, Rejewski then used a theorem about what happens when two permutations of a particular kind are combined. The cycles always come in pairs of the same length. That cut the possibilities enough for algebra to take over.
Using the September and October keys from Schmidt as a check, he set up equations for the unknown wiring of the rotors and solved them. In December 1932, working with Różycki and Zygalski, he reconstructed the military Enigma. He had never seen one.
Keeping up
For the next six years the bureau read German army traffic, and kept having to rebuild its methods as the Germans changed theirs. Rejewski built a device called the cyclometer to catalogue the loop patterns for every rotor position, more than 100,000 of them. Zygalski invented sheets of perforated card, stacked over a light box, whose aligned holes picked out the likely settings. When the Germans changed their procedure on 15 September 1938, the Poles responded within weeks, and by November they had built six electromechanical machines called bomby to search through rotor positions automatically.
Then on 15 December 1938 the Germans changed things again. The work now needed far more machines and far more sheets than a small bureau in Warsaw could produce.
The meeting at Pyry
On 25 and 26 July 1939, five weeks before Germany invaded Poland, Polish, French and British codebreakers met at Pyry, in the woods outside Warsaw. Britain sent Alastair Denniston, the head of the Government Code and Cypher School, and Dilly Knox, its leading Enigma specialist.
The Poles told them everything. They explained their methods and their bomba, and handed a replica Enigma to each delegation. "The knowledge gained in Poland transformed GC&CS's approach to Enigma cryptanalysis," a later director of GCHQ, Sir Iain Lobban, said at the 75th anniversary. Bletchley Park's own history calls the Polish research "of paramount importance to the British code breaking effort in the early days of the war". Zygalski's perforated sheets, known at Bletchley as the Netz, were the basis of the first successful British attack on Enigma, in January 1940.
Turing's bombe, which went on to break Enigma at industrial scale, worked on different principles from the Polish bomba, and it needed to, because the Germans kept making the problem harder. But it was built by people who knew, from Warsaw, that the problem could be solved.
Afterwards
The three men left Poland when it fell and carried on working for the Allies abroad. Różycki died on 9 January 1942, when the passenger ship Lamoricière sank in the Mediterranean near the Balearic Islands.
For decades the work stayed secret, and when the story of Enigma finally came out it was told as a British one. The Polish government's own account of the three men now says, plainly, that they broke the code in December 1932.
The Germans at the Warsaw customs house wanted their parcel back without anyone looking inside it. They got it back. The bureau had already looked.
Sources
- Marian Rejewski, "How Polish Mathematicians Deciphered the Enigma", Annals of the History of Computing, vol. 3, no. 3, July 1981, translated from the Polish original of 1980 (the parcel at Warsaw customs at the end of 1927 or early 1928; the insistent German representative; the Saturday afternoon examination; the commercial Enigma; the first machine-enciphered messages on 15 July 1928 and the failed early attempt).
- Agencja Wywiadu (Polish Foreign Intelligence Agency), "To oni złamali Enigmę" (the Poznan course of January to May 1929, its 23 students and three graduates; the three joining the bureau by 1 September 1932; the break in December 1932 with French cooperation; the cyclometer and Zygalski's sheets; the replicas handed over at Pyry; Różycki's death on the Lamoricière on 9 January 1942).
- Lancaster University, "Case S01E14: Enigma, part 2 of 3", En Clair, 2019 (Schmidt at the French embassy in November 1931 and at Verviers on 8 November; Bertrand and the photographed manuals that allowed encipherment but not decipherment; the September and October 1932 keys; the doubled message key; the catalogue of settings; the change of 15 September 1938; six bomby by November 1938; the change of 15 December 1938).
- Bill Casselman, "Marian Rejewski and the First Break into Enigma", American Mathematical Society Feature Column (the doubled indicator, with the first and fourth, second and fifth, third and sixth letters enciphering the same input, and Rejewski's theorem on products of permutations, whose cycles come in matching pairs).
- GCHQ, "Director GCHQ commemorates crucial pre-war Enigma information-sharing meeting in Poland", July 2014 (the Pyry meeting on 25 and 26 July 1939; Denniston and Knox; the Polish bomba; Sir Iain Lobban's remarks).
- Bletchley Park, "Early Days" (the importance of the Polish research to Bletchley; Zygalski's Netz method as the basis of the British attack on Enigma in January 1940).