close
US

Cracking the Enigma code

By S. K
Fri, 01, 23

The German army adapted the machine for wartime use and considered its encoding system unbreakable....

Cracking the Enigma code

COVER STORY

The Enigma machine was a field unit used in World War II by German field agents to encrypt and decrypt messages and communications. Invented in 1919 by Hugo Koch, a Dutchman, it looked like a typewriter and was originally employed for business purposes. The German army adapted the machine for wartime use and considered its encoding system unbreakable.

The Enigma machine was one of the first mechanized methods of encrypting text using an iterative cipher. It employed a series of rotors that, with some electricity, a light bulb, and a reflector, allowed the operator to either encrypt or decrypt a message. The original position of the rotors, set with each encryption and based on a prearranged pattern that in turn was based on the calendar, allowed the machine to be used even if it was compromised.

When the Enigma was in use, with each subsequent key press, the rotors would change in alignment from their set positions in such a way that a different letter was produced each time. With a message in hand, the operator would enter each character into the machine by pressing a typewriter-like key. The rotors would align and a letter would then illuminate, telling the operator what the letter really was.

Likewise, when enciphering, the operator would press the key and the illuminated letter would be the cipher text. The continually changing internal flow of electricity that caused the rotors to change was not random, but it created a polyalphabetic cipher that could be different each time it was used. Enigma was the Germans’ most sophisticated coding machine, necessary for transmitting secret information. Their seemingly unbreakable encrypted messages would direct army movements, aircraft raids, and the deadly U-boat submarines that terrorized Allied military and civilian ships on both sides of the Atlantic.

Cracking the Enigma machine was key to gaining an advantage in WWII. As Germany’s neighbour, Poland understood the threat Germany presented and began attempting to crack the Enigma’s earlier and simpler versions. Before the war, Poland faced weaker Enigma encryption and shoddier German security practices. However, Poland did not have the resources or information available to make the breakthroughs that their allies did later. Impressively, some of Poland’s greatest breakthroughs came through the power of math and deduction. Polish mathematician Marian Rejewski made accurate deductions about the inner workings of the Enigma based entirely on mathematical analysis. He helped invent the first cryptographic machines designed to crack Enigma messages, and these machines later inspired the British to adopt a similar approach.

Cracking the Enigma code

Polish mathematician Henryk Zygalski’s insights also helped kickstart British cryptography efforts. The Polish mathematicians achieved remarkable results. They proved that the earlier versions of Enigma could be broken and provided the theoretical foundations upon which many of the Brits’ later breakthroughs were built.

In 1939, Germany invaded Poland, beginning World War II. The Polish mathematicians fled through several countries to the UK, where they shared everything they knew with British intelligence. However, they were tasked with solving other cryptographic puzzles – Britain and the US took over Enigma decryption and shrouded it in the highest levels of secrecy.

Cracking the Enigma code

The British and Polish experts had already broken many of the Enigma codes for the Western front. The British had broken their first Enigma code as early as the German invasion of Poland and had intercepted virtually every message sent through the occupation of Holland and France. On July 9, 1941, British cryptologists helped break the secret code used by the German army to direct ground-to-air operations on the Eastern front, but various keys would continue to be broken by the British over the next year, each conveying information of higher secrecy and priority than the next. (For example, a series of decoded messages nicknamed “Weasel” proved extremely important in anticipating German anti-aircraft and antitank strategies against the Allies.) These decoded messages were regularly passed to the Soviet High Command regarding German troop movements and planned offensives, and back to London regarding the mass murder of Russian prisoners and Jewish concentration camp victims.

Over the course of the war, the German army improved its communication procedures and made the machines themselves more secure. They increased the number of rotors and the number of letters that could be paired on the plugboards.

The Allies had more to work with: messages were being sent every day to active military units around the world. With the greater resources at the British government’s disposal, they could analyse vast quantities of encrypted messages to search for patterns, weaknesses and mistakes.

Bletchley Park and the Bombe

Scores of brilliant mathematicians, analysts, and engineers worked at the top-secret facility at Bletchley Park, but Alan Turing and Gordon Welchman are considered the stars of the Enigma effort. They are credited with developing the bombe – the electro-mechanical calculator that helped crack the Enigma and that many call the precursor of the modern computer. With that being said, their contemporaries have said that the contributions of the Polish mathematicians saved Turing and Welchman a year of work.

Alan Mathison Turing OBE FRS was a brilliant English mathematician, computer scientist, logician, cryptanalyst, philosopher and theoretical biologist. Born in London in 1912, he studied at both Cambridge and Princeton universities. He was already working part-time for the British Government’s Code and Cypher School before the Second World War broke out. In 1939, Turing took up a full-time role at Bletchley Park in Buckinghamshire – where top secret work was carried out to decipher the military codes used by Germany and its allies.

Cracking the Enigma code

Enigma and the Bombe

The main focus of Turing’s work at Bletchley was in cracking the ‘Enigma’ code. Turing - along with fellow code-breaker Gordon Welchman – played a key role in inventing a machine known as the Bombe. This device helped to significantly reduce the work of the codebreakers. From mid-1940, German Air Force signals were being read at Bletchley and the intelligence gained from them was helping the war effort.

Turing also worked to decrypt the more complex German naval communications that had defeated many others at Bletchley. German U-boats were inflicting heavy losses on Allied shipping and the need to understand their signals was crucial. With the help of captured Enigma material, and Turing’s work in developing a technique he called ‘Banburismus’, the naval Enigma messages were able to be read from 1941. He headed the ‘Hut 8’ team at Bletchley, which carried out cryptanalysis of all German naval signals. This meant that – apart from during a period in 1942 when the code became unreadable – Allied convoys could be directed away from the U-boat ‘wolf-packs’. Turing’s role was pivotal in helping the Allies during the Battle of the Atlantic.

Turingery and Delilah

In July 1942, Turing developed a complex code-breaking technique he named ‘Turingery’. This method fed into work by others at Bletchley in understanding the ‘Lorenz’ cipher machine. Lorenz enciphered German strategic messages of high importance: the ability of Bletchley to read these contributed greatly to the Allied war effort.

Turing travelled to the United States in December 1942, to advise US military intelligence in the use of Bombe machines and to share his knowledge of Enigma. Whilst there, he also saw the latest American progress on a top-secret speech enciphering system. Turing returned to Bletchley in March 1943, where he continued his work in cryptanalysis. Later in the war, he developed a speech scrambling device which he named ‘Delilah’. In 1945, Turing was awarded an OBE for his wartime work.

The Universal Turing Machine

In 1936, Turing had invented a hypothetical computing device that came to be known as the ‘universal Turing machine’. After the Second World War ended, he continued his research in this area, building on his earlier work and incorporating all he’d learnt during the war. Whilst working for the National Physical Laboratory (NPL), Turing published a design for the ACE (Automatic Computing Engine), which was arguably the forerunner to the modern computer. The ACE project was not taken forward, however, and he later left the NPL.

Cracking the Enigma code

In 1952, Alan Turing was arrested for homosexuality – which was then illegal in Britain. He was found guilty of ‘gross indecency’ (this conviction was overturned in 2013) but avoided a prison sentence. In 1954, he was found dead from cyanide poisoning. An inquest ruled that it was suicide. The legacy of Alan Turing’s life and work did not fully come to light until long after his death. His impact on computer science has been widely acknowledged: the annual ‘Turing Award’ has been the highest accolade in that industry since 1966. But the work of Bletchley Park – and Turing’s role there in cracking the Enigma code – was kept secret until the 1970s, and the full story was not known until the 1990s. It has been estimated that the efforts of Turing and his fellow code-breakers shortened the war by several years. What is certain is that they saved countless lives and helped to determine the course and outcome of the conflict.

The war was won by more than just the breaking of the Enigma, but uncovering the enemy’s operational secrets no doubt played a pivotal role. For those interested in the history of WWII, a must watch movies is The Imitation Game, a 2014 American historical drama film directed by Morten Tyldum and written by Graham Moore, based on the 1983 biography Alan Turing: The Enigma by Andrew Hodges. The film stars Benedict Cumberbatch as Turing, who decrypted German intelligence messages for the British government during World War II. Keira Knightley, Matthew Goode, Rory Kinnear, Charles Dance, and Mark Strong appear in supporting roles.

Compiled by SK