Enigma · Volume 7

Enigma — Volume 7 — The First Break: The Polish Cipher Bureau

How three young mathematicians in Warsaw read a machine they had never seen

About This Volume

There is a version of the Enigma story that begins at Bletchley Park in 1939, with Alan Turing and the wooden huts and the great electromechanical Bombe. It is a true story, and a magnificent one, but it is not the beginning. The beginning is in Poland, seven years earlier, in a cramped office of the General Staff in Warsaw, where a twenty-seven-year-old mathematician named Marian Rejewski sat alone with a stack of intercepted German radio traffic and a problem that the codebreaking establishments of three great powers had already declared impossible.

This is the chapter that the popular history forgot for half a century, partly because the men who lived it spent the war in exile and the decades after it under a regime that had little interest in their fame, and partly because Britain kept the whole affair secret until the 1970s. It is the most important single chapter in the entire saga, because everything that followed — the Bombes, the convoy battles won, the U-boats hunted, the shortening of the war that historians measure in years and lives in millions — rests on a foundation that three Poles laid first. They did not merely help. They broke military Enigma from nothing, reconstructed the wiring of a machine they had never physically held, mechanised the attack, and then, on the eve of catastrophe, handed the whole achievement to their allies. This volume is the story of how they did it, and why it deserves to be remembered as one of the great intellectual feats of the twentieth century.

Figure 1 — Marian Rejewski, the mathematician who first broke into military Enigma in late 1932. File:Marian Rejewski.jpg by No photographer mentioned in either source. License: Public domain. Via …
Figure 1 — Marian Rejewski, the mathematician who first broke into military Enigma in late 1932. File:Marian Rejewski.jpg by No photographer mentioned in either source. License: Public domain. Via Wikimedia Commons (https://commons.wikimedia.org/wiki/File%3AMarian%20Rejewski.jpg).

A Bureau That Bet on Mathematicians

To understand the Polish achievement you have to understand the Polish predicament. Poland in the 1920s was a nation freshly reconstituted after more than a century of partition, wedged between a resentful Germany to the west and the Soviet Union to the east, both of which regarded its existence as temporary. For a country in that position, signals intelligence was not an academic luxury; it was a matter of survival. The Polish Cipher Bureau — the Biuro Szyfrów — had already proven its worth in the Polish–Soviet War of 1920, when its codebreakers read Red Army traffic during the decisive Battle of Warsaw.

But by the late 1920s the Bureau ran into a wall. The Germans had begun using a machine. The commercial Enigma had appeared in the early 1920s, and the German military had adopted and modified it, adding the Steckerbrett — the plugboard — that gave their version its formidable strength (Vol 3). When the Bureau’s veteran linguist-cryptanalysts, men who had cut their teeth on hand ciphers, looked at intercepted Enigma traffic, they got nowhere. The old skills — frequency counts, guessing at probable words, the patient teasing-apart of a substitution alphabet — simply did not bite on a cipher where the substitution changed with every single letter and the machine generated astronomically many keys.

The Bureau’s leadership drew a radical conclusion. A machine cipher, they reasoned, was at bottom a mathematical object, and to break it they would need not linguists but mathematicians — people fluent in the abstract structures, in permutations and groups, that the machine’s wiring embodied. This was a genuinely visionary insight for 1929, when cryptanalysis everywhere else was still regarded as a craft of clever wordsmiths.

So in January 1929 the Bureau organised a secret course in cryptology at the University of Poznań, supervised by the mathematics professor Zdzisław Krygowski and taught after hours by Bureau officers. Poznań was chosen deliberately: it lay in the formerly German-ruled west of Poland, so its students had grown up speaking fluent German. The most gifted of them were quietly invited to take the course. Three names emerged who would change history: Marian Rejewski, Jerzy Różycki, and Henryk Zygalski. By 1932 all three had been brought into the Bureau, and in time into a small, secret cell working on nothing but the German machine. The bet on mathematicians was about to pay off beyond anyone’s imagining.

Rejewski Alone With the Permutations

In late 1932, Rejewski was given the German military Enigma problem to work on in a separate room, kept apart even from his colleagues. What he accomplished over the following weeks is, by the assessment of many later cryptologists, one of the supreme feats of pure cryptanalysis ever performed.

His way in was a flaw not in the machine but in how the Germans used it — the doubled-indicator procedure described in Volume 4. To begin a message, an operator chose a three-letter message key, and the standing instructions told him to encipher it twice, back to back, at the start of the transmission. So the first six enciphered letters of every message of the day were the same three-letter key, encrypted once and then immediately encrypted again. The German cryptographers had introduced the repetition as a guard against garbling. They had instead handed Rejewski a structural gift.

Here is the essence of what Rejewski saw, and it is worth following slowly because it is the heart of the whole volume. Enigma, at any given keypress, performs a permutation of the 26 letters — a complete reshuffling of the alphabet onto itself. Because the rotors step forward with each keystroke, the permutation is different at position 1, position 2, position 3, and so on. Call those daily permutations A, B, C, D, E, F for the six positions of the indicator. Now, the doubling means that letter 1 and letter 4 of the indicator are the same underlying plaintext letter, sent through A and then through D respectively. The same is true for positions 2 and 5 (B and E) and positions 3 and 6 (C and F).

Figure 2 — An Enigma rotor showing the internal cross-wiring that scrambles one letter to another; reconstructing this wiring without ever seeing a military machine was Rejewski's landmark achievem…
Figure 2 — An Enigma rotor showing the internal cross-wiring that scrambles one letter to another; reconstructing this wiring without ever seeing a military machine was Rejewski's landmark achievement. File:Enigma rotor wiring.png by RadioFan (talk). License: CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0). Via Wikimedia Commons (https://commons.wikimedia.org/wiki/File%3AEnigma%20rotor%20wiring.png).

By collecting many message openings from a single day — sixty or so were enough — Rejewski could tabulate, for the whole alphabet, which first letter went with which fourth letter. That table is the product permutation AD: the combined effect of “encrypt at position 1, undo, encrypt at position 4.” Likewise he could build BE and CF. He now had three permutations that he could read straight off the day’s traffic, without knowing a single setting of the machine.

The decisive move came from group theory. Rejewski applied a theorem about permutations so central to his attack that later writers, only half in jest, called it “the theorem that won World War II.” Its key consequences are two. First, the cycle structure of a permutation — the way it breaks the alphabet into closed loops, say one cycle of 13 letters, another of 13, or perhaps loops of 4, 4, 3, 3, and so on — is an invariant fingerprint of the daily setting. Second, and this is the load-bearing fact, when you form a product like AD, the lengths of its cycles carry information about the underlying machine, while the plugboard’s effect on that product is constrained in a way the mathematics could isolate. Because the plugboard is itself a permutation that swaps letters in pairs, and because of how conjugation works in a permutation group — conjugate permutations always share the same cycle structure — Rejewski could show that the lengths of the cycles in AD, BE, and CF were unchanged by the plugboard. The plugboard scrambled which letters sat in the cycles, but it could not alter the pattern of cycle lengths.

That was the wedge that split the problem in two. The cycle-length pattern depended only on the rotors and their positions, not on the plugboard. Rejewski named this set of cycle lengths the characteristic of the day. He had found a property of the day’s key that he could read directly from intercepts and that ignored the very component — the plugboard — that the Germans believed made their machine unbreakable.

The Documents That Lit the Path — and the Math That Walked It

What Rejewski had at this point was a method for recognising settings. What he still lacked was the physical secret at the machine’s core: the internal wiring of the rotors and of the Eintrittswalze, the entry drum. Without knowing how each rotor mapped its 26 input contacts to its 26 output contacts, he could classify days but he could not reconstruct the machine and read messages. This is where the human-intelligence assist enters the story, and it must be told precisely, because it is so often told wrong.

Across the border, a German named Hans-Thilo Schmidt — codename Asché — worked in the Reichswehr’s cipher office, the very agency that handled Enigma keys. Embittered and short of money, he offered in 1931 to sell secrets to the French. The offer was taken up by Captain (later General) Gustave Bertrand of French military intelligence. At meetings beginning in 1931 — the first in Verviers, Belgium — Schmidt handed over photographs of genuine Enigma documents: operating instructions, setting procedures, and, crucially, actual tables of daily keys for specific months.

The French and the British both examined this material and concluded it was not enough to break the machine. Bertrand, working under an agreement of intelligence cooperation, passed the documents to the Poles in December 1932. And in Polish hands — in Rejewski’s hands — the same papers became the bootstrap that completed the reconstruction.

It is essential to be exact about what the documents did and did not do. They did not reveal the rotor wiring; Schmidt never supplied that. What the key tables gave Rejewski were the actual plugboard settings and ring settings for a couple of months. Knowing the plugboard for those days let him strip its effect out of his equations, turning his characteristic relations into a system in which the only remaining unknowns were the rotor wirings themselves. He then set up and solved that system of permutation equations. The mathematics did the reconstruction; the documents removed enough unknowns to make the mathematics solvable in reasonable time. As Rejewski himself later took care to note, a fortunate German procedural habit — leaving the rotors in alphabetical order ABC at certain moments — further simplified the system. The recovered wiring of the rightmost rotor emerged from the equations with a clarity that he described as one of the great moments of his life.

The proper way to state it is this: Bertrand and Schmidt handed the Poles a lit match; Rejewski built the fire. Three nations had the same intelligence. Only the one that had bet on mathematicians could use it.

Reconstructing a Machine Never Seen

The result deserves to be stated plainly because it is so easily underestimated. By the end of 1932, working from radio intercepts and a few months of stolen key tables, Marian Rejewski had reconstructed the complete internal wiring of all the rotors and the reflector of the German military Enigma — a machine that he and his colleagues had never seen, never touched, never opened. They knew the commercial Enigma existed, but the military version’s wiring was a closely guarded state secret, and the entry-disc wiring in particular was something the British had wrongly guessed and the Poles had to deduce.

With the wiring known, the Bureau’s engineering partner, the AVA Radio Manufacturing Company in Warsaw, could build working replicas — “Polish Enigma doubles.” For the first time anywhere outside Germany, intelligence officers could feed in the day’s settings and read German Army messages as fluently as the intended recipients. From 1933 onward, through most of the decade, the Poles read a large and steady stream of Wehrmacht Enigma traffic. They watched the German military reorganise, re-arm, and rehearse. They did it in silence, and they did it years before anyone in London or Paris believed it could be done at all.

Building the Machinery of the Break

Reconstructing the machine solved the first half of the problem. The second half was relentless and daily: every twenty-four hours the Germans changed the settings, and the codebreakers had to recover the new daily key afresh. To turn a one-time triumph into an industrial process, Rejewski, Różycki, and Zygalski built a succession of ingenious tools, each answering a particular German habit.

The first was the grill (ruszt) method — a sheet of celluloid printed with the permutation patterns of the rightmost rotor, slid over a tabulation of the day’s characteristic until the patterns lined up, peeling off the rotor’s contribution by hand. It was clever but laborious, and it grew unreliable as the Germans increased the number of plugboard connections.

Figure 3 — Henryk Zygalski's perforated sheets. Stacked on a light table, the holes that lined up through all the layers revealed candidate daily settings. File:Zygalski sheets (perforated sheets).…
Figure 3 — Henryk Zygalski's perforated sheets. Stacked on a light table, the holes that lined up through all the layers revealed candidate daily settings. File:Zygalski sheets (perforated sheets).jpg by Toby Oxborrow. License: CC BY-SA 2.0 (https://creativecommons.org/licenses/by-sa/2.0). Via Wikimedia Commons (https://commons.wikimedia.org/wiki/File%3AZygalski%20sheets%20(perforated%20sheets).jpg).

Rejewski’s next contribution was the cyclometer, built around 1934–35: a device of two coupled Enigma rotor-sets, wired so that for any rotor order and starting position it lit up the number of letters in the cycles of the characteristic. With it the Bureau spent more than a year compiling an exhaustive card catalogue of characteristics — a reference covering all 6 rotor orders and all 17,576 starting positions, 105,456 entries in all. Once the catalogue was complete, recovering a day’s key could be a matter of looking up its cycle-length signature and reading off the rotor order and positions in perhaps fifteen minutes. The catalogue mechanised insight: the hard thinking was front-loaded once, and the daily work became fast lookup.

Jerzy Różycki contributed the clock method (metoda zegara), a technique for determining which rotor sat in the fast right-hand position on a given day by exploiting the moment at which the middle rotor stepped — a small, elegant economy that narrowed the search before the heavier machinery was brought to bear.

And Henryk Zygalski devised what became the most enduring of the hand methods: the perforated sheets that bear his name. For each of the rotor orders he prepared a set of 26 large sheets, ruled into a 26-by-26 grid and punched with holes wherever a particular structural feature — a “female,” a place where a letter enciphered to itself across the doubled indicator — could occur. Stacked on a light table in the right relative offsets, the sheets let light shine through only where holes coincided in every layer. The surviving apertures pointed to the day’s settings. It was, in effect, an analogue computer made of cardboard and lamplight, and crucially it was independent of the plugboard — exactly the property that would let it survive German changes that broke the other methods.

The Bomba

By 1937 the Germans had tightened their procedures, and in September 1938 they made a change that defeated the catalogue and the grill at a stroke: operators were now to choose the starting position for enciphering the indicator freely for each message, rather than using a single fixed daily ground setting. The characteristic, in its old form, dissolved.

Figure 4 — A reconstruction of the bomba kryptologiczna, the electromechanical aggregate of six linked Enigma replicas that searched for the daily key. File:Cryptology Bomb.jpg by Szymon Pilecki, S…
Figure 4 — A reconstruction of the bomba kryptologiczna, the electromechanical aggregate of six linked Enigma replicas that searched for the daily key. File:Cryptology Bomb.jpg by Szymon Pilecki, Szymon Dąbrowski. License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0). Via Wikimedia Commons (https://commons.wikimedia.org/wiki/File%3ACryptology%20Bomb.jpg).

The Poles answered with machinery. In October–November 1938, to Rejewski’s design, AVA built the bomba kryptologiczna — the “cryptologic bomb.” Each bomba was an aggregate of six Enigma rotor-sets ganged together and driven by an electric motor, the six sets corresponding to the six possible positions of the doubled indicator’s repeats. The German operators still doubled their message keys, and the bomba exploited the surviving regularities of that doubling. Six bombas were built, one for each of the six possible rotor orders, and run in parallel. Turning through all 17,576 rotor positions, a bomba would automatically halt when it detected a configuration consistent with the day’s intercepts. A full search took about two hours. The daily key, which had been a day’s hand labour, fell out of a humming cabinet before lunch.

The origin of the name is genuinely debated, and the honest answer is that no one is certain. One often-repeated account holds that the device was named for the ticking, clock-like sound it made as it ran, or for the dropping of a weight when a stop was found; another, attributed to Różycki, claims the three were eating a round ice-cream dessert called a bomba when the idea or the name came up. The pleasant truth is that the inventors left no definitive explanation, and the story has acquired more certainty in the retelling than the evidence supports.

Whatever the etymology, the significance is not in doubt. The bomba was the first time anyone built a special-purpose machine to search a cryptographic key-space automatically. It is the direct conceptual ancestor of the British Bombe that Turing and Gordon Welchman would design at Bletchley (Vol 10) — a different machine answering a different German weakness, but descended in idea and even in name from the Warsaw original.

Outrun by Resources, Not by Intellect

The bomba’s reign was short, and its ending is the hinge on which this volume turns toward the next.

On 15 December 1938 the German Army issued each operator two additional rotors, IV and V. Until then, three rotors were chosen from a fixed set of three, giving 6 possible rotor orders. Now three were chosen from five, giving 60 possible orders — a tenfold jump. The bomba park and the Zygalski-sheet sets had each been built for 6 orders; overnight the codebreakers would have needed sixty bombas, or sixty complete sets of perforated sheets, to keep pace. Soon afterward, around the start of 1939, the Germans also increased the number of plugboard cables in routine use, from a handful to ten, which broke the remaining methods that depended on the plugboard being lightly used.

The crucial point — and the Poles were always insistent on it — is that they were not out-thought; they were out-resourced. Every new German measure had a known mathematical answer. The Zygalski sheets, being independent of the plugboard, still worked perfectly against the five-rotor machine; the team simply needed sixty sets of sheets instead of six, an enormous but purely manufacturing problem. They had reconstructed the wiring of rotors IV and V within weeks of their introduction, because German signal-school traffic obligingly enciphered training messages with the new rotors in ways the Poles could exploit. The intellectual victory held. What gave out was the budget and the workforce of a single, modest bureau in a country that, in the summer of 1939, had a few months left before it would be invaded from two directions at once.

Figure 5 — Memorial plaque at Bletchley Park honouring Rejewski, Różycki, and Zygalski, "who first broke the Enigma code." File:Bp-polish-codebreakers-plaque.jpg by unknown author. License: CC BY-S…
Figure 5 — Memorial plaque at Bletchley Park honouring Rejewski, Różycki, and Zygalski, "who first broke the Enigma code." File:Bp-polish-codebreakers-plaque.jpg by unknown author. License: CC BY-SA 2.0 (https://creativecommons.org/licenses/by-sa/2.0). Via Wikimedia Commons (https://commons.wikimedia.org/wiki/File%3ABp-polish-codebreakers-plaque.jpg).

Faced with the arithmetic of sixty rotor orders and an army massing on the frontier, the Cipher Bureau made the decision that would shape the rest of the war. If Poland could not exploit its own breakthrough at the scale now required, its allies — with their deeper resources — could. In late July 1939 the Poles summoned French and British representatives to a meeting in the Kabaty Woods near Pyry, south of Warsaw, and gave them everything: the reconstructed wiring, the methods, the sheets, the design of the bomba, and a working replica Enigma to take home. It was an act of extraordinary scientific generosity at the edge of national extinction.

Figure 6 — Monument to the three Polish cryptologists Rejewski, Różycki, and Zygalski, whose work the world did not learn of until decades after the war. File:2023-06-15 Cryptologist Monument Zygal…
Figure 6 — Monument to the three Polish cryptologists Rejewski, Różycki, and Zygalski, whose work the world did not learn of until decades after the war. File:2023-06-15 Cryptologist Monument Zygalski.JPG by Bärbel Miemietz. License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0). Via Wikimedia Commons (https://commons.wikimedia.org/wiki/File%3A2023-06-15%20Cryptologist%20Monument%20Zygalski.JPG).

The Measure of What They Did

Step back and weigh it. Three men, none yet thirty when they began, working in secrecy on a shoestring, took a cipher that the professional cryptanalysts of Britain and France had pronounced unbreakable and broke it — not by luck, not chiefly by espionage, but by importing into cryptology a kind of mathematics no one had thought to apply to it. They reconstructed a machine they never saw. They built the world’s first cryptanalytic search engine. They read the secret traffic of a rearming Germany for the better part of seven years while the world slept. And when their own resources failed, they did not hoard their achievement; they pressed it into the hands of the allies who would carry it forward.

For decades almost no one knew. Rejewski survived the war as a refugee and returned to a Poland where he worked as an unremarkable clerk, his greatest accomplishment a state secret he could not tell. Różycki drowned in 1942 when the ship carrying him back from Algiers was lost. Zygalski lived out his years teaching in England. Only with the lifting of British secrecy in the mid-1970s did the world begin to learn that the road to Bletchley ran first through Warsaw.

The handover in the Pyry forest — what the Poles gave, how the astonished British and French reacted, and how it transformed the coming war — is the subject of the next volume.

Next — Volume 8: The Handover — Pyry Forest, 1939.