Turing and Enigma A story of revolution and war

Table Of Contents

Introduction

A lot of people always argue that wars have a significant role in human development, those people provide examples from modern history such as the Cold War and how it contributed hugely to the development of satellites, GPS, and other technologies that we can’t live without nowadays, and the story of computers isn’t different from that. In this article we are going to discuss how the Allies eagerness in WW2 to decode Germany’s enigma helped in one way or another in developing a machine we call today the “computer”. A machine that changed the world we know probably forever. But hold on, who is Turing anyway?

Alan Turing was an English mathematician, logician, and cryptanalyst and is often thought to be one of the key founders of modern fields such as computer science and artificial intelligence. He was once asked if computers could ever have the ability to think and be as clever as humans and he simply answered that the question of whether machines can think is itself “too meaningless”.

Figure 1 - Alan Turing

Alan Turing is also best known for what he called the “imitation game”, a test we call today the Turing test that is used to test whether a machine was truly intelligent. The basic premise of the Turing Test is that a human judge would be placed in isolation and have two conversations — one with a computer and one with another person — except the judge wouldn’t be told which was which. If the computer could fool the judge and carry on a conversation that is indistinguishable from that of the human, the computer is said to have passed the Turing Test. Even though no computer has fully passed the Turing test, in 2014 an AI chatbot program called Eugene had a 5-minute conversation with 30 human judges and surprisingly convinced 10 of them that it was a 13-year-old Ukrainian boy.

Figure 2 - Turing Test

But what all this have to do with WW2 and Enigma? And hold on, shall we ask what is Enigma?

What is Enigma and how does it work?

Enigma is a machine initially developed by the Dutch to communicate banking secrets. Later on, the Germans bought the patent in 1923 for intelligence purposes. And in WW2 it was used as a cipher machine and a tool to produce nearly unbreakable codes for sending messages and communications. It was used to deliver all of Germany’s military information and on-field movements. Enigma’s settings offered approx. 158,000,000,000,000,000,000 possible solutions!

The machines had a typewriter keyboard to input the messages and a light board that would spell out the encrypted version. Each Enigma operator had a book of codes – a different one for each day – which instructed them on how to set up the machine for that day. When a message is encrypted by Enigma machine it would be sent using Morse code to another Enigma operator somewhere else to get use of the information delivered. That operator would use the same key code for that day to set up their machine in the same way, and they could then simply input the cyphered text on the keyboard. The light board would display the actual message, which would be copied down by the operator. The machine had at least three rotors that would rotate every time a key was pressed to make sure that a different result was generated each time – even if the same key was pressed twice. In addition to that Enigma had a plug board, which allowed the operator to add an extra layer of encryption. The Army and Air Force Enigmas chose three wheels from a set of five, whereas the Naval Enigmas chose from a set of eight wheels.

The mission of decoding Enigma was more than critical, as each encrypted message held classified military information. Information that if decoded would save thousands of lives and resources. Especially in the Atlantic battle as supplies from Canada and America kept Britain standing and able to continue, but the problem for the Allies was that the German Submarines would do their best to make these supplies sink into the oceans. And exactly here the importance of decoding Enigma becomes clear, as the encrypted messages include Germany’s submarine and Airforce locations.

Figure 3 - Engima Machine

Figure 4 - one of Enigma rotors

How was the impossible mission accomplished?

Surprisingly Turing and the British were not the first to successfully decode Enigma, indeed Polish cryptanalysts were the first to completely decode messages produced by Enigma’s initial versions in 1932 using a replica machine that could emulate the way ENIGMA worked! However, as WW2 started in 1939 the Germans improved Enigma's security by changing the cipher system daily and also increased its encryption layers. This made the task of understanding messages produced by Enigma much harder. Even before Poland was overrun by Germany the Polish shared everything they knew about the decryption of messages from the German ENIGMA machine including “the Bombe,” an electromechanical device that could find ENIGMA keys by testing tens of thousands of possible combinations. After Poland was under German occupation it was now all Turing’s and his team at Bletchley Park (Britain’s code-breaking headquarters) duty to decrypt Enigma’s advanced version. At Bletchley Park Turing worked with mathematicians and also recruited linguists and chess champions, and attracted talent by approaching winners of a complex crossword puzzle tournament held by The Daily Telegraph

Figure 5 - Bletchley Park - Buckinghamshire

Technically Turing's attack was based on logic and the use of ‘cribs’ (comparing patterns of the encrypted message and a known portion of plain text) to break the key. This approach was aided by the fact that no letter on the Enigma could be represented by itself in an enciphered message. Turing realized that his approach was capable of being mechanized, and thus he started working on the Bombe together with Gordon Welchman's diagonal board, (which dramatically reduced the number of invalid stops - false positives). The first Turing-Welchman Bombe-based machine, known as Agnes became operational in August 1940. The construction and engineering of the original Bombes was the work of the British Tabulating Machine Company.

Turing’s bombe tested different configurations of rotor settings by assuming plausible plaintexts. This approach involved simulating the electrical pathways of the Enigma rotors and then checking if these

Figure 6 - Turing's Bombe

pathways aligned with assumed plaintexts. The machine would test all possible settings and eliminate those that did not produce the expected results, this method helped in drastically reducing the number of potential settings that needed to be verified manually.

The operational mechanics of the Bombe involved a series of rotors and electrical circuits working in reverse of the Enigma's configurations. Each Bombe machine was equipped with thirty-six sets of rotors, corresponding to the Enigma's three rotors, and the top drum spun at about 100 rpm due to an additional motor circuit. The machine tested configurations by running electrical currents through its circuits and observing if they formed complete paths. If a correct configuration was identified, the Bombe would "stop," indicating a potential solution. Although setting up each run was labor-intensive, with ten minutes for wheel adjustments and up to fifty minutes for configuring connections, the Bombe's ability to rapidly test and identify potential rotor settings was a game-changer in cryptanalysis, contributing significantly to the Allied victory

Figure 7 - Bombe near and colored

Figure 8 - Bombe Wires

However, it was human understanding that enabled the noticeable breakthroughs. The Bletchley Park team made educated guesses at certain words messages could contain. For example, they knew that every day the German forces sent out a ‘weather report’, so an intercepted coded message would almost certainly contain the German word for ‘weather’.

Severe challenges like wars always show how human minds can innovate with no limits, it is true that wars are human-made catastrophes, that unfortunately destroy the lives of thousands of innocent people, but it is also true that some ideas and inventions become real game changers in such eras. The bombe and its logic-based results are somehow considered the initial trials to invent a machine that can produce independent results based on logic and with better performance, the same method that the device you are probably reading this article uses!