When we think of the cracking of the Enigma code, popular culture almost exclusively points to Bletchley Park and the brilliant mind of Alan Turing. However, the true foundational breakthrough—the mathematical key that unlocked the German military’s „unbreakable” cipher—was forged years earlier in Warsaw by a quiet, remarkably gifted Polish mathematician named Marian Rejewski.
Without Rejewski’s paradigm-shifting approach to cryptography, the Allied codebreaking efforts would have been delayed by years, potentially altering the outcome of World War II.
The Shift from Linguistics to Pure Math
For centuries, cryptography and codebreaking were the domains of linguists. Codebreakers looked for language patterns, letter frequencies, and structural repetitions. But the German Enigma machine rendered linguistic analysis entirely obsolete.
Enigma used an electromechanical system of rotating scramblers (rotors) and a plugboard. Every time an operator pressed a key on the keyboard, the rotors advanced, meaning the electrical pathway changed continuously. If you pressed the letter „A” three times, it might be encrypted as „X”, then „G”, then „K”. There were approximately 1.59×1020 possible daily settings.
Realizing that language experts were hitting a brick wall, the Polish Cipher Bureau (Biuro Szyfrów) made a highly unconventional decision in 1932: they hired pure mathematicians from Poznań University. Among them were Marian Rejewski, Jerzy Różycki, and Henryk Zygalski.
Cracking the Permutations
Rejewski noticed a critical procedural flaw in how the German operators used the machine. To ensure the receiving operator knew the starting position of the rotors for a specific message, the sender would transmit a three-letter „message key” twice at the very beginning of the transmission (for example, typing „WQV” twice, which might encrypt to „RTX JKM”).
Because the rotors only moved one step at a time during these six keystrokes, Rejewski realized that the first and fourth letters, the second and fifth letters, and the third and sixth letters were mathematically linked.
He abandoned linguistics entirely and turned to the abstract algebraic theory of permutation groups. He modeled the encryption of the six letters as unknown permutations, let’s say A,B,C,D,E, and F. Rejewski deduced that by looking at the composite permutations A∘D, B∘E, and C∘F, he could isolate the behavior of the rotors from the staggeringly complex plugboard settings. He wrote down a set of brilliant equations that allowed him to deduce the internal wiring of the Enigma rotors—a feat the Germans believed was mathematically impossible without physically stealing a machine.
The Cyclometer and the Bomba
Solving the mathematics was only half the battle. The daily settings of the Enigma machine still had to be found quickly enough for the intercepted messages to be tactically useful. Human calculation was too slow, so Rejewski decided that a machine was needed to defeat a machine.
First, he invented a device called the cyclometer, which consisted of two sets of Enigma rotors and was used to catalog the cycle lengths of the permutations. This allowed the Poles to create a massive card catalog of all 105,456 possible rotor starting positions.
When the Germans upgraded their operating procedures and the catalog became useless, Rejewski designed something even more revolutionary: the bomba kryptologiczna (cryptologic bomb). This electromechanical machine was essentially six Enigma machines wired together. Powered by an electric motor, it rapidly ticked through thousands of rotor positions, stopping automatically when it found a valid setup that matched the daily keys.
The Gift to the Allies
By July 1939, the geopolitical situation was incredibly dire. Germany was preparing to invade Poland, and the German military had recently increased the complexity of the Enigma machines by adding more rotors, outstripping the Polish Cipher Bureau’s financial resources to build enough new bomby.
In a secret meeting in the Pyry forest near Warsaw, Rejewski and his colleagues met with astonished British and French intelligence officers. The Poles handed over everything: their mathematical proofs, reconstructed Enigma machines, and the engineering blueprints for Rejewski’s bomba.
This unprecedented sharing of intelligence provided the exact foundation that Alan Turing and the teams at Bletchley Park needed. Turing adapted and scaled up Rejewski’s electromechanical concept to build the British „Bombe,” which industrialized the decryption process. Rejewski’s mathematical genius didn’t just crack a code; it saved countless lives by giving the Allies the tools to see into the mind of the enemy.
