by Simon Singh
Turing had constructed his electrical circuit in such a way as to nullify the effect of the plugboard, thereby allowing him to ignore the billions of plugboard settings. Figure 49 shows that the first Enigma has the electric current entering the scramblers and emerging at some unknown letter, which we shall call L1. The current then flows through the plugboard, which transforms L1 into E. This letter E is connected via a wire to the letter e in the second Enigma, and as the current flows through the second plugboard it is transformed back to L1. In other words, the two plugboards cancel each other out. Similarly, the current emerging from the scramblers in the second Enigma enters the plugboard at L2 before being transformed into T. This letter T is connected via a wire to the letter t in the third Enigma, and as the current flows through the third plugboard it is transformed back to L2. In short, the plugboards cancel themselves out throughout the whole circuit, so Turing could ignore them completely.
Turing needed only to connect the output of the first set of scramblers, L1, directly to the input of the second set of scramblers, also L1, and so on. Unfortunately, he did not know the value of the letter L1, so he had to connect all 26 outputs of the first set of scramblers to all 26 corresponding inputs in the second set of scramblers, and so on. In effect, there were now 26 electrical loops, and each one would have a lightbulb to signal the completion of an electrical circuit. The three sets of scramblers could then simply check each of the 17,576 orientations, with the second set of scramblers always one step ahead of the first set, and the third set of scramblers two steps ahead of the second set. Eventually, when the correct scrambler orientations had been found, one of the circuits would be completed and the bulb would be illuminated. If the scramblers changed orientation every second, it would take just five hours to check all the orientations.
Only two problems remained. First, it could be that the three machines are running with the wrong scrambler arrangement, because the Enigma machine operates with any three of the five available scramblers, placed in any order, giving sixty possible arrangements. Hence, if all 17,576 orientations have been checked, and the lamp has not been illuminated, it is then necessary to try another of the sixty scrambler arrangements, and to keep on trying other arrangements until the circuit is completed. Alternatively, the cryptanalyst could have sixty sets of three Enigmas running in parallel.
The second problem involved finding the plugboard cablings, once the scrambler arrangement and orientations had been established. This is relatively simple. Using an Enigma machine with the correct scrambler arrangement and orientations, the cryptanalyst types in the ciphertext and looks at the emerging plaintext. If the result is tewwer rather than wetter, then it is clear that plugboard cables should be inserted so as to swap w and t. Typing in other bits of ciphertext would reveal other plugboard cablings.
The combination of crib, loops and electrically connected machines resulted in a remarkable piece of cryptanalysis, and only Turing, with his unique background in mathematical machines, could ever have come up with it. His musings on the imaginary Turing machines were intended to answer esoteric questions about mathematical undecidability, but this purely academic research had put him in the right frame of mind for designing a practical machine capable of solving very real problems.
Bletchley was able to find £100,000 to turn Turing’s idea into working devices, which were dubbed bombes because their mechanical approach bore a passing resemblance to Rejewski’s bombe. Each of Turing’s bombes was to consist of twelve sets of electrically linked Enigma scramblers, and would thus be able to cope with much longer loops of letters. The complete unit would be about two meters tall, two meters long and a meter wide. Turing finalized the design at the beginning of 1940, and the job of construction was given to the British Tabulating Machinery factory at Letchworth.
Figure 49 The loop in the crib can be paralleled by an electrical loop. Three Enigma machines are set up in identical ways, except that the second one has its first scrambler moved forward one place (setting S + 1), and the third has its scrambler moved forward two further places (setting S + 3). The output of each Enigma is then connected to the input of the next one. The three sets of scramblers then click around in unison until the circuit is complete and the light illuminates. At this point the correct setting has been found. In the diagram above, the circuit is complete, corresponding to the correct setting.
While waiting for the bombes to be delivered, Turing continued his day-to-day work at Bletchley. News of his breakthrough soon spread among the other senior cryptanalysts, who recognized that he was a singularly gifted codebreaker. According to Peter Hilton, a fellow Bletchley codebreaker, “Alan Turing was obviously a genius, but he was an approachable, friendly genius. He was always willing to take time and trouble to explain his ideas; but he was no narrow specialist, so that his versatile thought ranged over a vast area of the exact sciences.”
However, everything at the Government Code and Cypher School was top secret, so nobody outside of Bletchley Park was aware of Turing’s remarkable achievement. For example, his parents had absolutely no idea that Alan was even a codebreaker, let alone Britain’s foremost cryptanalyst. He had once told his mother that he was involved in some form of military research, but he did not elaborate. She was merely disappointed that this had not resulted in a more respectable haircut for her scruffy son. Although Bletchley was run by the military, they had conceded that they would have to tolerate the scruffiness and eccentricities of these “professor types.” Turing rarely bothered to shave, his nails were stuffed with dirt, and his clothes were a mass of creases. Whether the military would also have tolerated his homosexuality remains unknown. Jack Good, a veteran of Bletchley, commented: “Fortunately the authorities did not know that Turing was a homosexual. Otherwise we might have lost the war.”
The first prototype bombe, christened Victory, arrived at Bletchley on March 14, 1940. The machine was put into operation immediately, but the initial results were less than satisfactory. The machine turned out to be much slower than expected, taking up to a week to find a particular key. There was a concerted effort to increase the bombe’s efficiency, and a modified design was submitted a few weeks later. It would take four more months to build the upgraded bombe. In the meantime, the cryptanalysts had to cope with the calamity they had anticipated. On May 1, 1940, the Germans changed their key exchange protocol. They no longer repeated the message key, and thereupon the number of successful Enigma decipherments dropped dramatically. The information blackout lasted until August 8, when the new bombe arrived. Christened Agnus Dei, or Agnes for short, this machine was to fulfill all Turing’s expectations.
Within eighteen months there were fifteen more bombes in operation, exploiting cribs, checking scrambler settings and revealing keys, each one clattering like a million knitting needles. If everything was going well, a bombe might find an Enigma key within an hour. Once the plugboard cablings and the scrambler settings (the message key) had been established for a particular message, it was easy to deduce the day key. All the other messages sent that same day could then be deciphered.
Even though the bombes represented a vital breakthrough in cryptanalysis, decipherment had not become a formality. There were many hurdles to overcome before the bombes could even begin to look for a key. For example, to operate a bombe you first needed a crib. The senior codebreakers would give cribs to the bombe operators, but there was no guarantee that the codebreakers had guessed the correct meaning of the ciphertext. And even if they did have the right crib, it might be in the wrong place—the cryptanalysts might have guessed that an encrypted message contained a certain phrase, but associated that phrase with the wrong piece of the ciphertext. However, there was a neat trick for checking whether a crib was in the correct position.
In the following crib, the cryptanalyst is confident that the plaintext is right, but he is not sure if he has matched it with the correct letters in the ciphertext.
One of the features of the Enigma machi
ne was its inability to encipher a letter as itself, which was a consequence of the reflector. The letter a could never be enciphered as A, the letter b could never be enciphered as B, and so on. The particular crib above must therefore be misaligned, because the first e in wetter is matched with an E in the ciphertext. To find the correct alignment, we simply slide the plaintext and the ciphertext relative to each other until no letter is paired with itself. If we shift the plaintext one place to the left, the match still fails because this time the first s in sechs is matched with S in the ciphertext. However, if we shift the plaintext one place to the right there are no illegal encipherments. This crib is therefore likely to be in the right place, and could be used as the basis for a bombe decipherment:
The intelligence gathered at Bletchley was passed on to only the most senior military figures and selected members of the war cabinet. Winston Churchill was fully aware of the importance of the Bletchley decipherments, and on September 6, 1941, he visited the codebreakers. On meeting some of the cryptanalysts, he was surprised by the bizarre mixture of people who were providing him with such valuable information; in addition to the mathematicians and linguists, there was an authority on porcelain, a curator from the Prague Museum, the British chess champion and numerous bridge experts. Churchill muttered to Sir Stewart Menzies, head of the Secret Intelligence Service, “I told you to leave no stone unturned, but I didn’t expect you to take me so literally.” Despite the comment, he had a great fondness for the motley crew, calling them “the geese who laid golden eggs and never cackled.”
Figure 50 A bombe in action. (photo credit 4.5)
The visit was intended to boost the morale of the codebreakers by showing them that their work was appreciated at the very highest level. It also had the effect of giving Turing and his colleagues the confidence to approach Churchill directly when a crisis loomed. To make the most of the bombes, Turing needed more staff, but his requests had been blocked by Commander Edward Travis, who had taken over as Director of Bletchley, and who felt that he could not justify recruiting more people. On October 21, 1941, the cryptanalysts took the insubordinate step of ignoring Travis and writing directly to Churchill.
Dear Prime Minister,
Some weeks ago you paid us the honor of a visit, and we believe that you regard our work as important. You will have seen that, thanks largely to the energy and foresight of Commander Travis, we have been well supplied with the “bombes” for the breaking of the German Enigma codes. We think, however, that you ought to know that this work is being held up, and in some cases is not being done at all, principally because we cannot get sufficient staff to deal with it. Our reason for writing to you direct is that for months we have done everything that we possibly can through the normal channels, and that we despair of any early improvement without your intervention …
We are, Sir, Your obedient servants,
A.M. Turing
W.G. Welchman
C.H.O’D. Alexander
P.S. Milner-Barry
Churchill had no hesitation in responding. He immediately issued a memorandum to his principal staff officer:
ACTION THIS DAY
Make sure they have all they want on extreme priority and report to me that this has been done.
Figure 51 The Daily Telegraph crossword used as a test to recruit new codebreakers (the solution is in Appendix H). (photo credit 4.6)
Henceforth there were to be no more barriers to recruitment or materials. By the end of 1942 there were 49 bombes, and a new bombe station was opened at Gayhurst Manor, just north of Bletchley. As part of the recruitment drive, the Government Code and Cypher School placed a letter in the Daily Telegraph. They issued an anonymous challenge to its readers, asking if anybody could solve the newspaper’s crossword (Figure 51) in under 12 minutes. It was felt that crossword experts might also be good codebreakers, complementing the scientific minds that were already at Bletchley—but of course, none of this was mentioned in the newspaper. The 25 readers who replied were invited to Fleet Street to take a crossword test. Five of them completed the crossword within the allotted time, and another had only one word missing when the 12 minutes had expired. A few weeks later, all six were interviewed by military intelligence and recruited as codebreakers at Bletchley Park.
Kidnapping Codebooks
So far in this chapter, the Enigma traffic has been treated as one giant communications system, but in fact there were several distinct networks. The German Army in North Africa, for instance, had its own separate network, and their Enigma operators had codebooks that were different from those used in Europe. Hence, if Bletchley succeeded in identifying the North African day key, it would be able to decipher all the German messages sent from North Africa that day, but the North African day key would be of no use in cracking the messages being transmitted in Europe. Similarly, the Luftwaffe had its own communications network, and so in order to decipher all Luftwaffe traffic, Bletchley would have to unravel the Luftwaffe day key.
Some networks were harder to break into than others. The Kriegsmarine network was the hardest of all, because the German Navy operated a more sophisticated version of the Enigma machine. For example, the Naval Enigma operators had a choice of eight scramblers, not just five, which meant that there were almost six times as many scrambler arrangements, and therefore almost six times as many keys for Bletchley to check. The other difference in the Naval Enigma concerned the reflector, which was responsible for sending the electrical signal back through the scramblers. In the standard Enigma the reflector was always fixed in one particular orientation, but in the Naval Enigma the reflector could be fixed in any one of 26 orientations. Hence the number of possible keys was further increased by a factor of 26.
Cryptanalysis of the Naval Enigma was made even harder by the Naval operators, who were careful not to send stereotypical messages, thus depriving Bletchley of cribs. Furthermore, the Kriegsmarine also instituted a more secure system for selecting and transmitting message keys. Extra scramblers, a variable reflector, nonstereotypical messages and a new system for exchanging message keys all contributed to making German Naval communications impenetrable.
Bletchley’s failure to crack the Naval Enigma meant that the Kriegsmarine were steadily gaining the upper hand in the Battle of the Atlantic. Admiral Karl Dönitz had developed a highly effective two-stage strategy for naval warfare, which began with his U-boats spreading out and scouring the Atlantic in search of Allied convoys. As soon as one of them spotted a target, it would initiate the next stage of the strategy by calling the other U-boats to the scene. The attack would commence only when a large pack of U-boats had been assembled. For this strategy of coordinated attack to succeed, it was essential that the Kriegsmarine had access to secure communication. The Naval Enigma provided such communication, and the U-boat attacks had a devastating impact on the Allied shipping that was supplying Britain with much-needed food and armaments.
As long as U-boat communications remained secure, the Allies had no idea of the locations of the U-boats, and could not plan safe routes for the convoys. It seemed as if the Admiralty’s only strategy for pinpointing the location of U-boats was by looking at the sites of sunken British ships. Between June 1940 and June 1941 the Allies lost an average of 50 ships each month, and they were in danger of not being able to build new ships quickly enough to replace them. Besides the intolerable destruction of ships, there was also a terrible human cost-50,000 Allied seamen died during the war. Unless these losses could be drastically reduced, Britain was in danger of losing the Battle of the Atlantic, which would have meant losing the war. Churchill would later write, “Amid the torrent of violent events one anxiety reigned supreme. Battles might be won or lost, enterprises might succeed or miscarry, territories might be gained or quitted, but dominating all our power to carry on war, or even keep ourselves alive, lay our mastery of the ocean routes and the free approach and entry to our ports.”
The Polish experience and the case of Hans-Thilo Schmidt h
ad taught Bletchley Park that if intellectual endeavor fails to break a cipher, then it is necessary to rely on espionage, infiltration and theft in order to obtain the enemy keys. Occasionally, Bletchley would make a breakthrough against the Naval Enigma, thanks to a clever ploy by the RAF. British planes would lay mines in a particular location, provoking German vessels to send out warnings to other craft. These Enigma encrypted warnings would inevitably contain a map reference, but crucially this map reference would already be known by the British, so it could be used as a crib. In other words, Bletchley knew that a particular piece of ciphertext represented a particular set of coordinates. Sowing mines to obtain cribs, known as “gardening,” required the RAF to fly special missions, so this could not be done on a regular basis. Bletchley had to find another way of breaking the Naval Enigma.
An alternative strategy for cracking the Naval Enigma depended on stealing keys. One of the most intrepid plans for stealing keys was concocted by Ian Fleming, creator of James Bond and a member of Naval Intelligence during the war. He suggested crashing a captured German bomber in the English Channel, close to a German ship. The German sailors would then approach the plane to rescue their comrades, whereupon the aircrew, British pilots pretending to be German, would board the ship and capture its codebooks. These German codebooks contained the information that was required for establishing the encryption key, and because ships were often away from base for long periods, the codebooks would be valid for at least a month. By capturing such codebooks, Bletchley would be able to decipher the Naval Enigma for an entire month.