Indicators
PodcastsNeutral

How the Enigma code was broken: the machine, Bletchley Park and Alan Turing

The Veritasium video explains how the Enigma encryption machine worked, which human errors and technical weaknesses the Bletchley Park codebreakers exploited, and how Alan Turing and his colleagues built the Bombe to read German messages every day.

How the Enigma code was broken: the machine, Bletchley Park and Alan Turing
Photo: Veritasium

Key points

  • Enigma was not invented by the Nazis; Arthur Scherbius patented it in 1918 for banking and business use.
  • The military version added adjustable rings and a plugboard, increasing the keyspace to more than 7×10^18.
  • Polish mathematicians led by Marian Rejewski reconstructed the wiring of the military Enigma by 1933 without ever having seen a machine.
  • Operators’ human errors, such as “cillies” and the “Herivel tip,” provided daily clues to the settings.
  • Alan Turing turned codebreaking into a logical test using loops and built the Bombe, which operated like 36 Enigma machines in parallel.
  • Gordon Welchman’s diagonal board reduced false stops from about 100 to 4, making the Bombe practical.
  • The decryptions helped in the Battle of Britain, at El Alamein and in Normandy, and historians estimate that they shortened the war by up to two years.
  • Dermot Turing argues that Alan Turing’s postwar years were not solely a period of decline, but included major technological projects.

The Veritasium video begins with an authentic Enigma machine used by the Nazis in the Second World War. The presenter types the word “Veritasium” and sees different letters light up, explaining that decrypting the message requires a second machine with exactly the same settings. If even one rotor or cable is in the wrong position, the encryption remains unbroken. German command relied on precisely this complexity, changing the settings of all the machines every midnight.

Enigma was not a Nazi invention. It was patented in 1918 by German inventor Arthur Scherbius, who wanted to encrypt messages for banks and businesses. As Dermot Turing, Alan Turing’s nephew, explains, the company sold the machines openly: Poland, Britain and Russia bought their own. What made Enigma superior was that the substitution changed with every keystroke, unlike older codes with fixed substitutions.

Inside were three rotors with 26 contacts each, wired in a scrambled arrangement. The current passed through the first, second and third rotors, reached the reflector and returned along a different path to light a lamp. After each keystroke, the right-hand rotor turned one position; the second turned after 26 turns of the first, and the third even less often. The operator could place the rotors in six arrangements and choose their starting positions, creating more than 100,000 settings in the commercial version.

An Enigma machine
An Enigma machine · Robert-brook · Wikimedia Commons, CC0

The German military added two major upgrades: adjustable rings and a plugboard. The rings shifted the relationship between the letters and the internal wiring and changed the turnover point. The plugboard allowed pairs of letters to be swapped before and after the rotors. In the late 1930s, the Nazis typically swapped six pairs, bringing the total keyspace to more than 7×10^18. The Germans also distributed daily key sheets so that all machines on a network would have the same settings each morning.

British counterintelligence brought about 150 people together at a mansion in Bletchley Park: chess players, crossword solvers, academics and hundreds of women from the Royal Navy, known as the Wrens. Secrecy rules were strict: they were forbidden to discuss their work even at home. The plan was to intercept German radio messages, analyze them for patterns and weaknesses, and then test possible settings. But the British did not have a military Enigma, and its rotor wiring differed from that of the commercial model.

The solution came from Poland. In 1931, an employee of the German cipher office sold secrets to the French, who shared them with the Poles. Mathematician Marian Rejewski recognized the problem as one of permutation theory and, by 1933, reconstructed the wiring of the military Enigma without ever having seen a machine. When the Germans added two more rotors and ten plugboard pairs in 1939, the keyspace increased to more than 10^23. The Poles urgently invited the British and French in July 1939 and revealed what they knew, shortly before the invasion.

Even with the right machine, Bletchley Park also relied on human errors. Operators were supposed to choose three random letters, but often picked names such as CIL (Cillie) or continued words such as BER-LIN. Codebreaker John Herivel noticed that many operators moved the rotors only one or two positions from the daily settings, so the initial letters clustered around particular values. This became known as the “Herivel tip” and could reveal the day’s ring settings.

Alan Turing arrived at Bletchley Park already known for his theoretical “Turing machine.” According to his nephew, he had a sharp sense of humor and was indifferent to football but excited by ideas such as a machine that could play chess. Turing realized that Enigma had a fundamental weakness: a letter could never be encrypted as itself. This allowed codebreakers to guess phrases such as “WETTERVORHERSAGE BISKAYA” in weather messages and slide them along the encrypted text until no letter matched itself. This guess was called a crib.

Using the cribs, Turing devised a logical test. He considered three copies of Enigma with the right-hand rotor in different positions and looked for loops: for example, R becoming Y, Y becoming S and S returning to R. If the settings were wrong, the loop almost never closed. Because the plugboards in successive machines canceled each other out, the test could isolate the rotors alone. If an assumption about a letter’s connection led to a contradiction, a large portion of the 150 trillion possible connections could be rejected without testing them all.

With the help of engineer Harold Keen, Turing implemented this logic in the “Bombe,” inspired by the Polish “Bomba.” The first prototype was ready in March 1940, which Dermot Turing considers impressive given how quickly it was approved and funded. The Bombe was essentially 36 Enigma machines operating in parallel, checking 26×26×26, or 17,576 combinations, in about 13 minutes. However, it produced many false solutions that required manual checking.

Mathematician Gordon Welchman added the “diagonal board,” exploiting the fact that if R is connected to Y, then Y is also connected to R. This allowed each test to rule out more possibilities and reduced false stops from about 100 to 4, making the Bombe practical. The improved version was ready in August 1940, by which time France, Norway and Denmark had already fallen and Britain was under air attack.

Intelligence from Enigma influenced the Battle of Britain, Bernard Montgomery’s attack at El Alamein in 1942 and the Normandy landings in 1944. For naval Enigma, the Germans added a fourth rotor, requiring new statistical methods, captured key sheets and even mines laid in specific locations so that German messages would reveal positions. In 1943, when Britain mastered the U-boat Enigma, sinkings of Allied ships fell sharply. Historians estimate that breaking the code shortened the war by up to two years.

Dermot Turing insists that Alan Turing’s postwar life should not be viewed solely through its tragic ending. From 1945 to 1950, he worked on some of the country’s most exciting technological projects, writing programs for computers that had not yet been built, and achieved a great deal despite delays. The video ends with a hint about an even more complex German encryption machine used by Adolf Hitler, kept classified for decades, and a naval Enigma message that remains unsolved.

Watch the video

Did you find this article useful?

Reader score: 0 · your votes help us choose what to cover next

Articles are written with the help of AI, only from the texts of the sources credited. Images marked “AI” are also made with AI.

⚑ Report an error

Spotted a mistake in this article (a fact, the translation, a typo)? Tell us and we will fix it.

Comments

Το Jumpship λειτουργεί προσωρινά μόνο για ανάγνωση. Ψήφοι, σχόλια και σύνδεση επανέρχονται σε λίγα λεπτά.