AlanTuring.net Reference Articles on Turing

Alan Turing, Codebreaker and Computer Pioneer

By Jack Copeland and Diane Proudfoot

© Copyright B.J. Copeland, D. Proudfoot May 2004

In 1936, at the University of Cambridge, the young mathematician Alan Turing dreamed up the fundamental principle of the modern computer – the idea of controlling the computer's operations by means of a program of coded instructions stored in memory. This abstract idea was not turned into a reality until after Turing's vital contribution to the Allied victory in World War II. Some months before the start of war Turing turned to the problem of breaking Enigma. The German Navy had adopted Enigma in 1926, followed by the German Army in 1928 and the German Air Force in 1935. The plugboard visible in the photograph of the Enigma machine (at the front, below the keyboard) was added in 1930 to enhance security; it provided an astronomical increase in complexity.

The operator of the Enigma machine typed the plain German message at the keyboard. Each time he pressed a key, a letter on a 26-bulb lampboard lit up. These letters constituted the enciphered form of the message. Each time the operator pressed a key, the internal wiring of the machine altered, thanks to three rotating wheels which formed the heart of the machine; the result was that if the operator repeatedly keyed A (for example) a succession of different letters would light up. The enciphered message was transmitted to the intended recipient. At the receiving end, the cipher text was typed into an Enigma machine set up in exactly the same way as the sender's, and the letters of the plain text lit at the lampboard.

In 1932 the Polish Cipher Bureau broke Enigma and read German military traffic regularly. From 1938 the Poles used an electro-mechanical apparatus called a 'bomba', forerunner of the Bletchley Park bombe. The bomba took no account of the Enigma's plugboard, and when, on 1 January 1939, the Germans increased the role of the plugboard, the effectiveness of the bomba was severely compromised. In July 1939 the Poles invited members of the British and French intelligence services to a meeting near Warsaw. The Poles 'told everything that we knew and showed everything that we had', including a replica Enigma and the bomba. For several months in 1940 the British and the Poles collaborated. The latter recalled: 'We treated [Turing] as a younger colleague who had specialized in mathematical logic and was just starting out in cryptology'. Little did they know that Turing had already devised the brilliant method of dealing with the plugboard on which the British bombe was based.

Unlike the bomba, Turing's bombe attacked the message text by means of a 'crib' – words thought likely to occur in the message. Cribs resulted both from the stereotyped nature of the messages sent by the Germans and from the thoughtlessly insecure habits of some operators. For example, weather stations regularly sent messages beginning 'WETTER FUER DIE NACHT' ('Weather for the night'). Harold 'Doc' Keen at the British Tabulating Machine Company handled the engineering side of the design of the bombe. In its mature form, the bombe contained thirty-six replica Enigma machines, with ten miles of wire and one million soldered connections. The prototype, named 'Victory', was installed in March 1940 at Britain's codebreaking HQ, Bletchley Park (B.P.). An improved form, which included Gordon Welchman's ingenious diagonal board, went into operation in August 1940. By November 1941 there were fifteen bombes: at the end of the war there were several hundred. 1942 saw B.P. decoding about 39,000 Enigma messages each month, rising to approximately 84,000 each month by the autumn of 1943.

During 1940 German Air Force traffic was read in large quantities by B.P., but Naval traffic – including the all-important messages to and from the wolf-packs of U-boats in the North Atlantic – remained cloaked. If this traffic could be broken, the positions of the wolf-packs would be known and the convoys bringing food, raw materials, and other supplies across the Atlantic from North America could be routed around them. When Turing took up residence at B.P. in September 1939 no work was being done on Naval Enigma, which was generally considered unbreakable. According to Alexander (whose history of the attack on Naval Enigma was written at the end of the war but kept secret by the British Government until very recently): 'Turing first got interested in the problem for the typical reason that "no one else was doing anything about it and I could have it to myself"'.

This crucial traffic was so difficult to break because the sender enciphered the message setting – the trio of letters denoting the positions of the Enigma machine's three wheels at the start of the message – by two different methods, before broadcasting it to the sender. The message setting was enciphered once by means of the Enigma machine itself, as was usual, and once by hand, using a table of letter-pairings issued to the operators. Called 'bigram tables' at B.P., these changed on a regular basis. By the end of 1939, Turing had figured out how this complicated system worked – a remarkable piece of cryptanalysis. However, his discovery could not be used to read Naval traffic until the bigram tables were known. Here the codebreakers depended on the Royal Navy. Several 'pinches' of material from German vessels enabled Turing's 'Hut 8' slowly to gain control of the code during 1940 and 1941. Hut 8's ability to break the U-boat messages had an immediate effect. During June 1941, when the traffic was read currently for the first time, reroutings based on Hut 8 decrypts were reportedly so successful that the North Atlantic U-boats did not sight a single convoy for the first twenty-three days of the month. Although Hut 8's battle with the U-boats was to see-saw – for eleven months in 1942 improvements to Enigma meant that Hut 8 could not read the North Atlantic U-boat traffic – the intelligence from Naval Enigma decrypts played a crucial role in the struggle for supremacy in the North Atlantic.

During 1942 Turing worked with B.P.'s Research Section on the new problem of 'Tunny', the machine used by the German Army to encrypt teleprinter messages. Tunny messages were first intercepted in June 1941. It was not until mid-1942 that up-to-date Tunny traffic was read, using a method invented by Turing and known simply as 'Turingery'. Tunny was used in preference to Enigma for the encryption of high-level signals, for example messages from Hitler and members of the German High Command. Building on Turing's success, other members of the Research Section designed the methods of attacking Tunny that were eventually implemented in Colossus, the first electronic computer. (Colossus was installed at B.P. two years before the first comparable US machine, the ENIAC, was operational.) Designed by the telephone engineer Thomas Flowers, Colossus was used from February 1944 to read the priceless Tunny traffic. The timing of the D-day landings was based on intelligence produced by Colossus.

Colossus was not like a modern computer: to set the machine up for a new job, it was necessary to change some of the machine's wiring manually, by means of switches and plugs. The key idea of storing programs of instructions in memory, now almost as familiar to us as the wheel, was Turing's. Flowers said that, once Colossus was in operation (proving for the first time that large-scale digital electronic computing machinery was feasible), it was just a matter of Turing's waiting for the opportunity to put his idea into practice. In 1945, at the National Physical Laboratory, Turing drew up a groundbreaking design for an electronic stored-program computer, to be called the 'Automatic Computing Engine' (ACE). Others who knew about Turing's research of 1936 also made the connection between electronics and the stored-program idea. The post-war race between Turing's group in London and the Manchester group led by his friend and ex-Bletchley colleague Max Newman ended in 1948 ­ on 21 June the prototype electronic stored-program digital computer built by Newman's group ran its first program. It was the start of a new era.