British mathematician Alan Turing. Photo The Granger CollectionTopFoto; SSPLGetty Images

What is an Enigma machine?

The Second World War cipher machine was crucial to the German war effort — yet cryptographers at Bletchley Park, led by Alan Turing, cracked its code. We look at the life of the mathematical genius and Enigma’s significance to modern computing

The British mathematician Alan Turing (1912-1954) led the World War II struggle to break the German enciphering machine, the Enigma. This machine, used by all German armed services, encoded the 26 letters of the alphabet in complicated ways determined by the settings of its revolving rotors.

Turing’s name made headlinesn, with the 2014 film The Imitation Game, starring Benedict Cumberbatch. Amidst the fanfare, it is easy to forget that the Enigma was part of a grim and grimy reality of warfare, as shown in the German film, Das Boot (1981) and more recently the TV series of the same name.

The U-boat war depended totally on the radio messages that transmitted orders, positions, and reports between the submarine fleet and its command structure. It was therefore the U-boat Enigma messages that were the most vital, and the special four-rotor M4 Enigma machine played a crucial part in this story.

The war, however, did not start with the M4. By 1939, the German armed forces all used the standard military Enigma, with just three rotors and an extra plugboard. This had been penetrated with remarkable speed by Polish cryptographers.

In 1938, British Intelligence recruited Alan Turing as its first mathematician. Until then, classicists and linguists had dominated. Turing came from Cambridge, where two years earlier he had laid out the theory of modern computing, but had also spent two years at Princeton. His PhD in logic was combined with a serious interest in new machinery. In 1939, Turing was to gain the important advantage of the brilliant mathematical work on the Enigma that the Polish cryptanalysts Marian Rejewski, Jerzy Rszycki and Henryk Zygalski handed over to British Intelligence.

A four-rotor Enigma cipher machine, Heimsoeth & Rinke, with a German Navy telegraph key. November 1941. Serial number M4117, with complete electrical wiring, three aluminum rotors (IV, V & VII), Gamma rotor and B reflector all with matching serial numbers, raised ‘QWERTZ’ keyboard, plugboard in the front with eight patch leads and a previously unknown, probably unique, metal

A four-rotor Enigma cipher machine, Heimsoeth & Rinke, with a German Navy telegraph key. November 1941. Serial number M4117, with complete electrical wiring, three aluminum rotors (IV, V & VII), Gamma rotor and B reflector all with matching serial numbers, raised ‘QWERTZ’ keyboard, plugboard in the front with eight patch leads and a previously unknown, probably unique, metal security screen

Working at Bletchley Park, the wartime centre of British codebreaking operations, Turing and his colleagues rapidly devised a completely new kind of machine. It was a search engine for Enigma settings that used electromagnetic relay technology and was known as the ‘Bombe’, a name derived from an earlier, less powerful Polish machine. Its inspired logic, a joint effort by Turing and fellow Cambridge mathematician Gordon Welchman, could overcome the complexity of the Enigma’s plugboard provided about 25 letters of a message were correctly guessed. By May 1940, the first Bombe was solving German Air Force messages.

The German naval forces, however, used their Enigma machines more carefully than the Luftwaffe. In particular, they added a further level of security through an extra ‘bigram table’, provided to the operators in special papers. In modern terms it might be likened to an extra password that needed to be hacked.

Turing relished this challenge, although he recognised success would be impossible without the capture of code books. In September 1940, Commander Ian Fleming, then of the Naval Intelligence Division, and later the creator of James Bond, was planning just such a capture. When it was cancelled, Turing was described as being ‘in a stew’ by Frank Birch, the intelligence officer who acted as a go-between.

In fact, Turing had to wait several more months. Hugh Alexander (who took over from Turing in 1943) wrote, ‘the capture of the February 1941 keys changed the whole position.’ By this time, Turing had recruited a high-level team of young mathematicians and champion chess-players. Heading ‘Hut 8’ at Bletchley, he developed a highly sophisticated statistical system called Banburismus for extending the breaking of the naval Enigma messages without requiring further captures.

In late 1941, as the United States was drawn into an undeclared Atlantic war, the resulting supply of deciphered Enigma material constituted a major component of what Britain had to offer the new alliance; an alliance that was ultimately sealed by the attack on Pearl Harbor.

This incredible level of success had all been achieved with the 3-rotor Enigma. But this was abruptly terminated on 1 February 1942, when the Atlantic U-boats switched to the new M4 machines. The change was technically a minor upgrade, as the new fourth rotor was not fully independent. Yet even this small adjustment meant that Bombes would take weeks rather than hours to find the settings. Where before there was a supply of hundreds of messages a day, now there was a blank. Germany had regained the advantage.

Alan Turing and colleagues working on the Ferranti Mark 1 Computer in 1951. This was based on a prototype known as the Manchester Mark I, built at Manchester University in 1946. Photo The Granger CollectionTopFoto; SSPLGetty Images

Alan Turing and colleagues working on the Ferranti Mark 1 Computer in 1951. This was based on a prototype known as the Manchester Mark I, built at Manchester University in 1946. Photo: The Granger Collection/TopFoto; SSPL/Getty Images

The response to the M4 crisis involved further daring operations, as fictionalised in another Hollywood film, U571 (2000). But at Bletchley Park, it also led to a desperate quest for extra speed. Electronic technology was tried for the first time, being potentially a thousand times faster. While this did not result in electronic Bombes, the introduction of electronics to Bletchley had an unexpected impact.

Electronic technology was much better suited to the attack on the quite different type of cipher used by Hitler’s high command. So indirectly, the challenge of the M4 stimulated the work that led to the development of the famous Colossus in 1944, the world’s first large-scale digital electronic computer.

The introduction of the M4 also spelt the end of British independence. Meeting its challenge required the industrial resources of the United States. A hundred American Bombes were built at Dayton, Ohio, where the National Cash Register plant had been taken over for the war effort. Turing himself crossed the Atlantic in November 1942 to put top-level technical liaison into effect. He thus set the scene for the BRUSA intelligence agreement, origin of the NSA-GCHQ link of today.

Back at Bletchley, there were occasional breaks into U-boat Enigma, which developed more systematically after November 1942 thanks to captured papers and new ingenious methods. But it was only after June 1943 that regular, industrial-scale production resumed, on the basis of data sharing with the Americans. The result was that as the German U-boat fleet actually grew, it was effectively neutralised.

Few M4 Enigmas survived the war. The reasons for this are that M4 Enigma machines were produced in much smaller quantities than the 3-rotor machines. In addition, multiple M4 Enigmas were deployed with each U-boat and the majority of these were lost when the boats were sunk in combat or scuttled by their crews at the end of the war.

A four-rotor Enigma cipher machine, Olympia Büromaschinenwerke, 1944. Serial number M17176 with electrical wiring, three aluminum rotors, Bakelite gamma rotor and B reflector, raised ‘QWERTZ’ keyboard, green night screen above keyboard, plugboard in the front with ten patch leads. Sold for £347,250 on 16 July 2020 at Christie’s Online

A four-rotor Enigma cipher machine, Olympia Büromaschinenwerke, 1944. Serial number M17176 with electrical wiring, three aluminum rotors, Bakelite gamma rotor and B reflector, raised ‘QWERTZ’ keyboard, green night screen above keyboard, plugboard in the front with ten patch leads. Sold for £347,250 on 16 July 2020 at Christie’s Online

Turing, meanwhile, had been captivated by the speed of digital electronics, and now looked to the future. On 6 June 1944, as the invasion of Europe took advantage of his Enigma work, Turing submitted a report on an advanced electronic speech scrambler, the cumbersome American system needed for Roosevelt and Churchill to converse securely. Turing’s own system, called the Delilah, was small and neat. But he had in mind something much greater: the design of an electronic computer, in the full modern sense. His approach to the Enigma problem had capitalised on the familiarity he'd developed with relay technology in 1937. 

The 1944 speech scrambler gave Turing hands-on experience with electronics, as a warm-up for his detailed computer plan of 1945. This, the Automatic Computing Engine (ACE), was what he called a ‘practical form’ of the concept of the ‘universal machine’ that he'd first discovered in his 1936 work.

It embodied the idea that is now taken for granted, that a computer allows the solution of new problems by the writing of new software, rather than the building of new hardware. This was a revolution, and Turing would have liked to mastermind it in the same way as he had attacked the Enigma.

The National Physical Laboratory backed Turing’s plan, but did not allow him to continue bridging the gap between abstract theory and engineering practice. The Pilot ACE was completed in 1950, but Turing had meanwhile found a different niche at Manchester University where he pioneered not only the building of computers but their application, opening up fields of Artificial Intelligence and the theory of biological growth.

Sign up today

Christie’s Online Magazine delivers our best features, videos, and auction news to your inbox every week

Subscribe

Turing was as unconventional in life as in science. As a homosexual, he was at odds not only with British criminal law as it was (he was prosecuted in 1952) but also the post-war demands of national security (his work for GCHQ was terminated). The M4 had made him the living repository of top Anglo-American secrets which meant his subsequent sex-tourism in Norway and Greece could hardly have been better calculated to arouse the anxiety of security officials.

It is nevertheless a bitter irony that in the post-war world his conquest of the M4 had made possible, Turing was not free to live as he chose. Against this background, his death in June 1954 is not such a surprise. In 2013 the computer pioneer and codebreaker was given a belated posthumous royal pardon for his 1952 conviction for homosexuality. In 2021 the Bank of England, in recognition of his immeasurable contribution to the war effort and computing, released a £50 note featuring his portrait.

Andrew Hodges is author of the biography Alan Turing: The Enigma — The Book That Inspired the Film The Imitation Game, Princeton University Press (2015)