On this page
In the early 1930s, the German military believed their Enigma cipher machine was unbreakable. With 105,456 possible rotor settings and a plugboard adding billions of further combinations, brute-force decryption was impossible for the technology of the time 1. But in late 1932, a Polish mathematician achieved what was thought impossible without seeing a stolen military machine.
Marian Rejewski successfully reconstructed the Enigma's internal wiring by treating the cipher not as a linguistic puzzle, but as a system of mathematical permutations 1.
What was the Enigma machine?
The Enigma was an electromechanical rotor machine. When an operator pressed a letter on the keyboard, an electrical current passed through a series of components to light up a different letter on a lampboard. The key components were:
The plugboard: Swapped pairs of letters before they entered the rotors.
Three rotating rotors: Scrambled the letters further, with the rightmost rotor stepping after every keystroke.
The reflector: Sent the current back through the rotors by a different path.
Because the rotors moved, the substitution alphabet changed with every letter. Pressing 'A' three times might output 'G', 'X', and 'L'.
How did Marian Rejewski break Enigma permutations?
Before May 1940, German operators made a procedural error. To tell the receiver how to set their rotors for a specific message, the sender would choose a random 3-letter "message key" (like `KYG`) and transmit it twice (`KYGKYG`) at the start of the message 2.
Rejewski realised that the 1st and 4th letters of this 6-letter indicator were encryptions of the same plaintext letter. The same was true for the 2nd and 5th, and the 3rd and 6th 1.
He defined the machine's transformation at the first six rotor positions as permutations A, B, C, D, E, and F. The relationship between the 1st and 4th letters could be expressed mathematically as a composite permutation, AD.
How did group theory solve the plugboard problem?
The plugboard introduced billions of possible combinations, masking the rotor wiring. Rejewski needed a way to separate the effect of the plugboard from the rotors.
He relied on a fundamental theorem of permutation group theory: the cycle structure of a permutation is invariant under conjugation.
When Rejewski broke down the composite permutation AD, he proved it was mathematically conjugate to the transformations of the rotors alone, without the plugboard. This meant that while the plugboard changed *which* letters were swapped, it did not change the *length* of the permutation cycles.
By analysing enough intercepted indicators in a single day, Rejewski could reconstruct these cycles (for instance, finding that the day's setting produced two cycles of length 4 and two of length 3). This invariant cycle structure gave him equations he could solve to reveal the wiring. In December 1932, aided by two months of daily keys provided by French intelligence on 8–10 December, Rejewski solved these equations and mapped the internal wiring of all three rotors by the end of the year 2.
Why didn't the British solve it first?
Before the Polish Cipher Bureau shared their methods in 1939, British and French intelligence had made no progress on the military Enigma.
The British approach was historically rooted in linguistics and traditional cryptanalysis—looking for frequency patterns and linguistic tells. Enigma's changing substitution alphabet destroyed these patterns. Rejewski succeeded because he brought abstract algebra to a field that had not yet embraced it.
His work laid the foundation for the electro-mechanical codebreaking machines (the Polish *Bomba* and later the British *Bombe*) that would eventually read German communications on an industrial scale, shortening World War II.
The lesson for students: Theory before mechanics
Rejewski didn't break Enigma by endlessly guessing settings; he modelled the machine's physical reality using abstract algebra. This ability to connect pure theory to real-world problems is a hallmark of strong mathematical thinking, useful whether you are breaking codes or studying for exams.
If you are struggling with combinatorics or abstract concepts, building a structured understanding is better than rote learning. For example, mastering topics like arrangements with letters together or selection problems with combinations requires you to think in terms of sets and groups, much like Rejewski did.
The Fermi Concept Library is designed to map out every core idea in mathematics, showing you how abstract theorems connect to practical applications. And when you are stuck on a difficult problem that feels as unbreakable as a cipher, the Fermi Problem Library will walk you through the logical steps, explaining the reasoning rather than just printing an answer. Learning to think in frameworks, rather than facts, is how you crack the hardest problems.



