Alan Turing: The Genius Who Cracked the Enigma Code

Here’s the tale of Alan Turing and the codebreakers who changed the Second World War.

Apr 4, 2024By Jacob Wilkins, BA History

alan turing genious enigma code

 

The Second World War featured a variety of heroes, with millions of soldiers fighting to defeat the Axis Powers. But heroism wasn’t limited to the front lines. There were some people who made a huge difference without firing a single bullet, and Alan Turing is a good example.

 

This ingenious mathematician made a vital contribution to the war by cracking a German cipher device known as the Enigma machine. He accomplished this feat by mechanizing intelligence, which in turn laid the foundation for the future of computer technology.

 

Alan Turing’s Time at Boarding School

alan turing childhood sherborne school
A photograph of Alan Turing aged fifteen at Sherborne School, c. 1927. Source: BBC

 

Alan Turing was born on June 23, 1912 in Paddington, London. As a child, he was educated at Hazelhurst Preparatory School in Sussex before moving to Sherborne School in Dorset at the age of thirteen.

 

Turing struggled to adapt to boarding school at first. He was a clumsy child, frequently making a mess with fountain pens and letting down his teammates during gym lessons. His appearance wasn’t ideal, either. With forward-falling hair and a scruffy approach to school uniform, Turing found himself being mocked by the other boys. This did nothing to improve his shy and hesitant personality.

Get the latest articles delivered to your inbox

Sign up to our Free Weekly Newsletter

 

However, even as a youngster, Turing demonstrated a knack for mathematics. He managed to solve complex problems without studying elementary calculus. He also tackled subjects like relativity on his own, moving beyond the official syllabus with the help of books like The Nature of the Physical World (1928) by Arthur Eddington.

 

Though Turing was not a popular pupil, he did become friends with a boy named Christopher Morcom. The boys bonded over their love of science, and they would devise mathematical problems for each other and try to solve them. Morcom was the more practical of the two friends. As well as being a piano player, he showed Turing how to make a wireless receiver using basic materials.

 

But this friendship ended in tragedy when Morcom died of tuberculous peritonitis on February 13, 1930 at a nursing home in London. Though he had lived with the disease for many years, Morcom never told Turing about his condition.

 

The University Years

alan turing cambridge boat team
A photograph of the King’s College Boating Team (Alan Turing is the second from the left on the back row), 1935. Source: Hear The Boat Sing

 

Alan Turing studied mathematics at King’s College, Cambridge, from 1931 to 1934, gaining a degree with first-class honors. The transition to Cambridge wasn’t difficult for Turing. The architecture wasn’t dissimilar to Sherborne, and most other undergraduates also came from prestigious public schools.

 

Most importantly, Turing was now at the center of the scientific world. The Cambridge course put a particular emphasis on the interface between mathematics and physics. In addition to the aforementioned Arthur Eddington, other mathematicians like Paul A.M. Dirac (who became Professor of Mathematics at Cambridge in 1932) formed a vital part of Turing’s higher education.

 

By the end of his undergraduate studies, Turing had become less subdued and more sociable. He regularly exercised as a member of the Cambridge Boat Club and enjoyed playing Bridge with other students. He was also more open about his homosexuality, owning plenty of magazines with an emphasis on the male sex appeal.

 

After gaining his master’s degree, Turing wrote an influential paper called “On Computable Numbers, with an Application to the Entscheidungsproblem.” The paper demonstrated how a Turing Machine (a hypothetical machine developed by Turing) could perform computations and store data.

 

Turing continued his education at the University of Princeton in New Jersey. His doctoral thesis discussed a system that could formalize mathematical proofs and check them mechanically. After gaining his PhD in 1938, Turing returned to the United Kingdom.

 

The Enigma Machine

enigma machine national museum of computing
A modern photograph of the enigma machine. Source: National Museum of Computing, Bletchley

 

During Alan Turing’s university years, the Nazis came to power and imposed their ideology on German society. Driven by far-right, racist principles, the Nazis turned Germany into an anti-democratic, totalitarian state. They imposed anti-Semitic laws, brainwashed the younger generation, and suppressed their political opponents.

 

In September 1939, Germany invaded Poland and started the Second World War. During the conflict, the Germans used a device called the Enigma machine, which was invented by Arthur Scherbius shortly after World War I. The Enigma machine resembled a typewriter; it used a series of rotors to scramble plaintext messages into incoherent ciphers.

 

Given there were 159 quintillion combinations (and these settings changed once every twenty-four hours), the Germans thought Enigma was uncrackable. But they were wrong. It was crackable, and the British had the perfect man for the job.

 

Bletchley Park & the Polish Influence

bletchley park codebreakers
A modern photograph of Bletchley Park. Source: The Times

 

In 1938, the British Secret Intelligence Service acquired Bletchley Park, a large house in the English county of Buckinghamshire. Throughout the Second World War, a group of codebreakers known as the Government Code and Cypher School worked at Bletchley Park.

 

Extra staff were recruited to increase the size of the team, including twenty-four academics from Cambridge University. Alan Turing, along with the other recruits, underwent a training course to learn about coding. To begin with, there were only a couple hundred people at Bletchley Park, but the number grew throughout the war, peaking at approximately 10,000. More and more buildings had to be built to accommodate this increase.

 

The British were not the first to tackle the Enigma code. Polish mathematician Marian Rejewski – part of the Cipher Bureau of the Polish Defense Ministry – made significant progress in the 1930s. His work became the foundation for the operations carried out by the codebreakers at Bletchley Park.

 

Cracking the Code 

gordon welchman mathematician
A photograph of Gordon Welchman, date unknown. Source: Evening Standard

 

With the help of many other mathematicians like Hugh O’Donel Alexander, Gordon Welchman, and Joan Clarke, Alan Turing developed a machine known as the bombe.

 

The bombe was inspired by a similar machine designed by the Polish called the bomba. Turing’s device, in simple terms, was a bank of thirty-six Enigma machines that moved synchronously, using rotors and a plugboard to decipher the encrypted messages. However, the defect of Turing’s original design was that it depended on the identification of closed loops. Welchman (one of the aforementioned mathematicians) addressed this issue by introducing a diagonal board. This reduced the number of times the bombe stopped for a solution that was not valid.

 

The Turing-Welchman bombe became a key part of the war effort. The staff at Bletchley Park decoded the German messages, gaining vital intelligence. In 1941, for example, they located the German battleship Bismark, and in 1944, the intelligence they obtained helped the Allies prepare for the German defenses during the Normandy landings.

 

alan turing 1951 mathematician
A photograph of Alan Turing, 1951. Source: Royal British Legion

 

But there was a problem. The Allies didn’t want the Germans to know they had cracked the code. If the Germans discovered the truth, they would stop using the Enigma machine, depriving the Allies of their secret advantage. In other words, the Allies couldn’t respond to every piece of decrypted code. They had to be cautious, selecting when to make a move and when not to.

 

In 1942, Turing developed another codebreaking technique called Turingery. This became the blueprint for cracking a more complex cipher device known as the Lorenz machine. English mathematician W. T. Tutte – who also worked at Bletchley Park – managed to figure out the architecture of the Lorenz machine, helping the Allies read messages from the German High Command.

 

It’s impossible to calculate the exact influence of the codebreakers at Bletchley Park. But historians believe they shortened the war by two to four years and saved millions of lives.

 

The Final Years

ace computer pilot model
A photograph of the pilot model of the ACE computer, 1950. Source: National Geographic

 

By the end of 1945, Alan Turing had developed a plan for a general-purpose computer. It was known as the Automatic Computing Engine (ACE). However, delays in the construction of the machine frustrated Turing, prompting him to leave the National Physical Laboratory in 1948.

 

Turing became obsessed with the concept of machines thinking like humans. He explored this theme in essays like “Intelligent Machinery” (1948) and “Computing Machinery and Intelligence” (1950). Turing wondered whether it would be possible for a machine to act in such a way that it could fool someone into thinking they were communicating with a fellow human, not a computer. Nowadays, this is referred to as the Turing Test.

 

In 1952, while working at the University of Manchester, Turing was arrested for having a relationship with a nineteen-year-old male student (homosexuality in Britain was illegal at this time). Turing pleaded guilty to the charge of public indecency. He then had to choose between prison and chemical castration, ultimately opting for the latter.

 

On the 7th of June 1954, Turing committed suicide by eating an apple containing cyanide. He was forty-two years old.

 

Alan Turing’s Legacy

alan turing 1951 legacy
A photograph of Alan Turing, 1951. Source: The New York Times

 

Alan Turing was ahead of his time. By mechanizing intelligence, he cemented his place in history as an integral figure in the field of computer science.

 

As a gay man convicted of public indecency, Turing is also a tragic example of the persecution of homosexuals throughout history. It wasn’t until 1967 that the British Parliament made homosexuality legal with the Sexual Offences Act. In 2013, Turing received a posthumous royal pardon for his mistreatment.

 

In addition to the awards Turing received during his lifetime (which included being made an Officer of the British Empire), the Bank of England honored the great mathematician by adding his face to the new fifty-pound note in 2021.

 

This, in conjunction with the 2014 film The Imitation Game, has led to a renewed interest in Turing’s story, especially in Britain. He is no longer an obscure mathematician known only to those passionate about computer science. Rather, Turing now stands alongside the other great heroes of the Second World War.

Author Image

By Jacob WilkinsBA HistoryJacob has a First Class degree from Royal Holloway (University of London). As well as being a freelance writer, he runs an independent publishing business on Amazon. When he’s not working, he enjoys reading books, watching tennis, and running up hills.