The Enigma machine — a German electro-mechanical cipher device — was believed to produce an unbreakable code. For years, it did. Then mathematics broke it. What followed shortened the war by an estimated two to four years and gave birth to modern computing.
The Enigma machine was invented by Arthur Scherbius (1878–1929), a German electrical engineer born in Frankfurt. Scherbius studied at the Technical University of Munich and later at Hanover, specialising in electrical engineering. He patented the Enigma in 1918 — originally as a commercial product for banks and businesses seeking to protect sensitive communications.
Scherbius co-founded the Cipher Machines Corporation (Chiffriermaschinen AG) in Berlin to sell the device. Early commercial interest was modest, but the German military's attention grew rapidly after World War I demonstrated how devastating the interception of communications could be. By the mid-1920s, the Wehrmacht, Kriegsmarine, and Luftwaffe all adopted progressively more advanced variants.
Scherbius died in 1929 — killed in a horse-carriage accident — just as his machine was becoming indispensable to German military power. He never saw the war it would help define, or the mathematicians who would ultimately defeat it.
What most histories understate is that Enigma was already broken before a single shot of World War II was fired — not by the British, but by three young Polish mathematicians working in near-total secrecy in Warsaw.
In 1929, the Polish Cipher Bureau (Biuro Szyfrów) intercepted a military Enigma machine that had been accidentally sent through customs. Their analysts examined it briefly before German consular staff reclaimed it. That glimpse was enough to confirm what they were facing.
In 1932, the Bureau recruited three exceptional mathematics graduates from Poznań University — Marian Rejewski (aged 28), Jerzy Różycki (23), and Henryk Zygalski (23). They were brought into a secret underground facility in Warsaw and given an impossible task: reconstruct the Enigma's internal wiring and break its cipher — using only intercepted ciphertext and their mathematics.
Rejewski's approach was revolutionary. Using permutation group theory, he analysed structural patterns in the way German operators set up their daily keys, and derived a system of equations that described the Enigma's internal wiring. Without ever seeing inside the machine, he reconstructed the complete rotor wirings from pure mathematics. It was one of the most extraordinary feats in the history of cryptanalysis.
The team then built mechanical devices — called bomba kryptologiczna (cryptological bomb) — to automate the search for valid daily key settings. These were the direct conceptual precursors to Alan Turing's Bombe at Bletchley. For six years, from 1932 to 1939, Poland read German military Enigma traffic. As Germany progressively upgraded the machine — adding rotors, expanding the plugboard, and changing procedures — Poland worked constantly to keep up.
In July 1939, just weeks before Germany invaded Poland, the Cipher Bureau made a fateful decision. At a secret meeting in the Pyry forest outside Warsaw, Polish intelligence shared everything with British and French counterparts: their mathematical techniques, their bomba designs, and two reconstructed working Enigma machines — one for each ally. It was an act of extraordinary generosity made under existential threat.
Poland was overrun two months later. But the gift they handed Britain became the foundation on which Alan Turing built Bletchley Park's entire operation. Without Rejewski's mathematics and the Polish handover, Bletchley would have started from nothing.
The three mathematicians survived the war — escaping through Romania, France, and Spain — but their story remained classified for decades. Rejewski spent years as a bookkeeper in postwar communist Poland, unable to speak of what he had done. Only in the 1970s, when Bletchley's secrets were finally declassified, did the world learn that the men who truly first broke the Enigma were Polish, not British.
The Enigma's most celebrated weakness was also its most elegant mathematical property: a letter could never encrypt to itself. If you pressed A, A would never light up. This was guaranteed by the reflector design — the component that bounced the signal back through the rotors before output.
Alan Turing saw the implication immediately. If a codebreaker had a "crib" — a known or guessed plaintext phrase — they could test any Enigma setting with one simple rule: if any ciphertext character matched the corresponding crib character, that setting was mathematically impossible. The Bombe exploited this to eliminate millions of possibilities per hour.
German operator errors accelerated the break. Using the same message key twice, signing off with predictable phrases, sending weather reports at fixed hours — these habits gave Bletchley the cribs they needed. By mid-war, German naval, army, and air force communications were being read within hours of transmission.
Alan Turing (1912–1954) was a British mathematician whose contributions span the foundations of computer science, artificial intelligence, and wartime cryptography. His 1936 paper introducing the theoretical "Turing Machine" — a conceptual device that reads symbols on a tape and follows rules — defined what computation means, decades before practical computers existed.
At Bletchley Park, Turing designed the Bombe and led Hut 8, responsible for cracking Naval Enigma — the most strategically critical decryption work of the war. His mathematical insight into the Enigma's self-inverse property was the breakthrough that made systematic decryption possible at scale.
Despite his wartime contributions, Turing was prosecuted in 1952 under British laws criminalising homosexuality and subjected to chemical castration as a condition of avoiding prison. He died in 1954 at age 41. A coroner ruled it suicide. He received a posthumous royal pardon in 2013, and in 2021 his face appeared on the British £50 note. The Turing Award — computing's highest honour, equivalent to a Nobel Prize — bears his name.
The Enigma story is about the moment mathematics became a weapon — and about the cost of keeping that weapon secret. The codebreakers of Bletchley could not explain why they knew what they knew. Men died in battles that Bletchley knew were coming. Convoys were rerouted by orders that made no tactical sense. The intelligence advantage was overwhelming — and entirely invisible to the enemy.
The full story was classified until the mid-1970s. Many who worked at Bletchley never spoke of it for the rest of their lives. Alan Turing died without public recognition of what he had done. The machine that was supposed to be unbreakable endures as a symbol of exactly the opposite: no cipher is stronger than its underlying mathematics, and no security is stronger than the humans who operate it.
Today, original Enigma machines are displayed in museums worldwide. The National Museum of Computing at Bletchley Park — in the same buildings where the work was done — has working reconstructions of both the Enigma and the Bombe, open to visitors.