The Code Book
Each day, he would look at the encrypted message keys, the first six letters of all the intercepted messages, and use the information to build his table of relationships. This would allow him to trace the chains, and establish the number of links in each chain. For example, analyzing the 1st and 4th letters might result in four chains with 3, 9, 7 and 7 links. Analyzing the 2nd and 5th letters might also result in four chains, with 2, 3, 9 and 12 links. Analyzing the 3rd and 6th letters might result in five chains with 5, 5, 5, 3 and 8 links. As yet, Rejewski still had no idea of the day key, but he knew that it resulted in 3 sets of chains with the following number of chains and links in each one:
4 chains from the 1st and 4th letters, with 3, 9, 7 and 7 links.
4 chains from the 2nd and 5th letters, with 2, 3, 9 and 12 links.
5 chains from the 3rd and 6th letters, with 5, 5, 5, 3 and 8 links.
Rejewski could now go to his catalogue, which contained every scrambler setting indexed according to the sort of chains it would generate. Having found the catalogue entry that contained the right number of chains with the appropriate number of links in each one, he immediately knew the scrambler settings for that particular day key. The chains were effectively fingerprints, the evidence that betrayed the initial scrambler arrangement and orientations. Rejewski was working just like a detective who might find a fingerprint at the scene of a crime, and then use a database to match it to a suspect.
Although he had identified the scrambler part of the day key, Rejewski still had to establish the plugboard settings. Although there are about a hundred billion possibilities for the plugboard settings, this was a relatively straightforward task. Rejewski would begin by setting the scramblers in his Enigma replica according to the newly established scrambler part of the day key. He would then remove all cables from the plugboard, so that the plugboard had no effect. Finally, he would take a piece of intercepted ciphertext and type it in to the Enigma machine. This would largely result in gibberish, because the plugboard cablings were unknown and missing. However, every so often vaguely recognizable phrases would appear, such as alliveinbelrin—presumably, this should be “arrive in Berlin.” If this assumption is correct, then it would imply that the letters R and L should be connected and swapped by a plugboard cable, while A, I, V, E, B and N should not. By analyzing other phrases it would be possible to identify the other five pairs of letters that had been swapped by the plugboard. Having established the plugboard settings, and having already discovered the scrambler settings, Rejewski had the complete day key, and could then decipher any message sent that day.
Rejewski had vastly simplified the task of finding the day key by divorcing the problem of finding the scrambler settings from the problem of finding the plugboard settings. On their own, both of these problems were solvable. Originally, we estimated that it would take more than the lifetime of the universe to check every possible Enigma key. However, Rejewski had spent only a year compiling his catalogue of chain lengths, and thereafter he could find the day key before the day was out. Once he had the day key, he possessed the same information as the intended receiver and so could decipher messages just as easily.
Following Rejewski’s breakthrough, German communications became transparent. Poland was not at war with Germany, but there was a threat of invasion, and Polish relief at conquering Enigma was nevertheless immense. If they could find out what the German generals had in mind for them, there was a chance that they could defend themselves. The fate of the Polish nation had depended on Rejewski, and he did not disappoint his country. Rejewski’s attack on Enigma is one of the truly great accomplishments of cryptanalysis. I have had to sum up his work in just a few pages, and so have omitted many of the technical details, and all of the dead ends. Enigma is a complicated cipher machine, and breaking it required immense intellectual force. My simplifications should not mislead you into underestimating Rejewski’s extraordinary achievement.
The Polish success in breaking the Enigma cipher can be attributed to three factors: fear, mathematics and espionage. Without the fear of invasion, the Poles would have been discouraged by the apparent invulnerability of the Enigma cipher. Without mathematics, Rejewski would not have been able to analyze the chains. And without Schmidt, codenamed “Asche,” and his documents, the wirings of the scramblers would not have been known, and cryptanalysis could not even have begun. Rejewski did not hesitate to express the debt he owed Schmidt: “Asche’s documents were welcomed like manna from heaven, and all doors were immediately opened.”
The Poles successfully used Rejewski’s technique for several years. When Hermann Göring visited Warsaw in 1934, he was totally unaware of the fact that his communications were being intercepted and deciphered. As he and other German dignitaries laid a wreath at the Tomb of the Unknown Soldier next to the offices of the Biuro Szyfrów, Rejewski could stare down at them from his window, content in the knowledge that he could read their most secret communications.
Even when the Germans made a minor alteration to the way they transmitted messages, Rejewski fought back. His old catalogue of chain lengths was useless, but rather than rewriting the catalogue he devised a mechanized version of his cataloguing system, which could automatically search for the correct scrambler settings. Rejewski’s invention was an adaptation of the Enigma machine, able to rapidly check each of the 17,576 settings until it spotted a match. Because of the six possible scrambler arrangements, it was necessary to have six of Rejewski’s machines working in parallel, each one representing one of the possible arrangements. Together, they formed a unit that was about a meter high, capable of finding the day key in roughly two hours. The units were called bombes, a name that might reflect the ticking noise they made while checking scrambler settings. Alternatively, it is said that Rejewski got his inspiration for the machines while at a cafe eating a bombe, an ice cream shaped into a hemisphere. The bombes effectively mechanized the process of decipherment. It was a natural response to Enigma, which was a mechanization of encipherment.
For most of the 1930s, Rejewski and his colleagues worked tirelessly to uncover the Enigma keys. Month after month, the team would have to deal with the stresses and strains of cryptanalysis, continually having to fix mechanical failures in the bombes, continually having to deal with the never-ending supply of encrypted intercepts. Their lives became dominated by the pursuit of the day key, that vital piece of information that would reveal the meaning of the encrypted messages. However, unknown to the Polish codebreakers, much of their work was unnecessary. The chief of the Biuro, Major Gwido Langer, already had the Enigma day keys, but he kept them hidden, tucked away in his desk.
Langer, via the French, was still receiving information from Schmidt. The German spy’s nefarious activities did not end in 1931 with the delivery of the two documents on the operation of Enigma, but continued for another seven years. He met the French secret agent Rex on twenty occasions, often in secluded alpine chalets where privacy was guaranteed. At every meeting, Schmidt handed over one or more codebooks, each one containing a month’s worth of day keys. These were the codebooks that were distributed to all German Enigma operators, and they contained all the information that was needed to encipher and decipher messages. In total, he provided codebooks that contained 38 months’ worth of day keys. The keys would have saved Rejewski an enormous amount of time and effort, shortcutting the necessity for bombes and sparing manpower that could have been used in other sections of the Biuro. However, the remarkably astute Langer decided not to tell Rejewski that the keys existed. By depriving Rejewski of the keys, Langer believed he was preparing him for the inevitable time when the keys would no longer be available. He knew that if war broke out it would be impossible for Schmidt to continue to attend covert meetings, and Rejewski would then be forced to be self-sufficient. Langer thought that Rejewski should practice self-sufficiency in peacetime, as preparation for what lay ahead.
Rejewski’s skills eventually reached their limit in December 1938, when Germ
an cryptographers increased Enigma’s security. Enigma operators were all given two new scramblers, so that the scrambler arrangement might involve any three of the five available scramblers. Previously there were only three scramblers (labeled 1, 2 and 3) to choose from, and only six ways to arrange them, but now that there were two extra scramblers (labeled 4 and 5) to choose from, the number of arrangements rose to 60, as shown in Table 10. Rejewski’s first challenge was to work out the internal wirings of the two new scramblers. More worryingly, he also had to build ten times as many bombes, each representing a different scrambler arrangement. The sheer cost of building such a battery of bombes was fifteen times the Biuro’s entire annual equipment budget. The following month the situation worsened when the number of plugboard cables increased from six to ten. Instead of twelve letters being swapped before entering the scramblers, there were now twenty swapped letters. The number of possible keys increased to 159,000,000,000,000,000,000.
In 1938 Polish interceptions and decipherments had been at their peak, but by the beginning of 1939 the new scramblers and extra plugboard cables stemmed the flow of intelligence. Rejewski, who had pushed forward the boundaries of cryptanalysis in previous years, was confounded. He had proved that Enigma was not an unbreakable cipher, but without the resources required to check every scrambler setting he could not find the day key, and decipherment was impossible. Under such desperate circumstances Langer might have been tempted to hand over the keys that had been obtained by Schmidt, but the keys were no longer being delivered. Just before the introduction of the new scramblers, Schmidt had broken off contact with agent Rex. For seven years he had supplied keys which were superfluous because of Polish innovation. Now, just when the Poles needed the keys, they were no longer available.
The new invulnerability of Enigma was a devastating blow to Poland, because Enigma was not merely a means of communication, it was at the heart of Hitler’s blitzkrieg strategy. The concept of blitzkrieg (“lightning war”) involved rapid, intense, coordinated attack, which meant that large tank divisions would have to communicate with one another and with infantry and artillery. Furthermore, land forces would be backed up by air support from dive-bombing Stukas, which would rely on effective and secure communication between the front-line troops and the airfields. The ethos of blitzkrieg was “speed of attack through speed of communications.” If the Poles could not break Enigma, they had no hope of stopping the German onslaught, which was clearly only a matter of months away. Germany already occupied the Sudetenland, and on April 27, 1939, it withdrew from its nonaggression treaty with Poland. Hitler’s anti-Polish rhetoric became increasingly vitriolic. Langer was determined that if Poland was invaded, then its cryptanalytic breakthroughs, which had so far been kept secret from the Allies, should not be lost. If Poland could not benefit from Rejewski’s work, then at least the Allies should have the chance to try and build on it. Perhaps Britain and France, with their extra resources, could fully exploit the concept of the bombe.
Table 10 Possible arrangements with five scramblers.
Figure 43 General Heinz Guderian’s command post vehicle. An Enigma machine can be seen in use in the bottom left. (photo credit 4.2)
On June 30, Major Langer telegraphed his French and British counterparts, inviting them to Warsaw to discuss some urgent matters concerning Enigma. On July 24, senior French and British cryptanalysts arrived at the Biuro’s headquarters, not knowing quite what to expect. Langer ushered them into a room in which stood an object covered with a black cloth. He pulled away the cloth, dramatically revealing one of Rejewski’s bombes. The audience were astonished as they heard how Rejewski had been breaking Enigma for years. The Poles were a decade ahead of anybody else in the world. The French were particularly astonished, because the Polish work had been based on the results of French espionage. The French had handed the information from Schmidt to the Poles because they believed it to be of no value, but the Poles had proved them wrong.
As a final surprise, Langer offered the British and French two spare Enigma replicas and blueprints for the bombes, which were to be shipped in diplomatic bags to Paris. From there, on August 16, one of the Enigma machines was forwarded to London. It was smuggled across the Channel as part of the baggage of the playwright Sacha Guitry and his wife, the actress Yvonne Printemps, so as not to arouse the suspicion of German spies who would be monitoring the ports. Two weeks later, on September 1, Hitler invaded Poland and the war began.
The Geese that Never Cackled
For thirteen years the British and the French had assumed that the Enigma cipher was unbreakable, but now there was hope. The Polish revelations had demonstrated that the Enigma cipher was flawed, which boosted the morale of Allied cryptanalysts. Polish progress had ground to a halt on the introduction of the new scramblers and extra plugboard cables, but the fact remained that Enigma was no longer considered a perfect cipher.
The Polish breakthroughs also demonstrated to the Allies the value of employing mathematicians as codebreakers. In Britain, Room 40 had always been dominated by linguists and classicists, but now there was a concerted effort to balance the staff with mathematicians and scientists. They were recruited largely via the old-boy network, with those inside Room 40 contacting their former Oxford and Cambridge colleges. There was also an old-girl network which recruited women undergraduates from places such as Newnham College and Girton College, Cambridge.
The new recruits were not brought to Room 40 in London, but instead went to Bletchley Park, Buckinghamshire, the home of the Government Code and Cypher School (GC&CS), a newly formed codebreaking organization that was taking over from Room 40. Bletchley Park could house a much larger staff, which was important because a deluge of encrypted intercepts was expected as soon as the war started. During the First World War, Germany had transmitted two million words a month, but it was anticipated that the greater availability of radios in the Second World War could result in the transmission of two million words a day.
At the center of Bletchley Park was a large Victorian Tudor-Gothic mansion built by the nineteenth-century financier Sir Herbert Leon. The mansion, with its library, dining hall and ornate ballroom, provided the central administration for the whole of the Bletchley operation. Commander Alastair Denniston, the director of GC&CS, had a ground-floor office overlooking the gardens, a view that was soon spoiled by the erection of numerous huts. These makeshift wooden buildings housed the various codebreaking activities. For example, Hut 6 specialized in attacking the German Army’s Enigma communications. Hut 6 passed its decrypts to Hut 3, where intelligence operatives translated the messages, and attempted to exploit the information. Hut 8 specialized in the naval Enigma, and they passed their decrypts to Hut 4 for translation and intelligence gathering. Initially, Bletchley Park had a staff of only two hundred, but within five years the mansion and the huts would house seven thousand men and women.
Figure 44 In August 1939, Britain’s senior codebreakers visited Bletchley Park to assess its suitability as the site for the new Government Code and Cypher School. To avoid arousing suspicion from locals, they claimed to be part of Captain Ridley’s shooting party. (photo credit 4.3)
During the autumn of 1939, the scientists and mathematicians at Bletchley learned the intricacies of the Enigma cipher and rapidly mastered the Polish techniques. Bletchley had more staff and resources than the Polish Biuro Szyfrów, and were thus able to cope with the larger selection of scramblers and the fact that Enigma was now ten times harder to break. Every twenty-four hours the British codebreakers went through the same routine. At midnight, German Enigma operators would change to a new day key, at which point whatever breakthroughs Bletchley had achieved the previous day could no longer be used to decipher messages. The codebreakers now had to begin the task of trying to identify the new day key. It could take several hours, but as soon as they had discovered the Enigma settings for that day, the Bletchley staff could begin to decipher the German messages that had already accumulated, revealing i
nformation that was invaluable to the war effort.
Surprise is an invaluable weapon for a commander to have at his disposal. But if Bletchley could break into Enigma, German plans would become transparent and the British would be able to read the minds of the German High Command. If the British could pick up news of an imminent attack, they could send reinforcements or take evasive action. If they could decipher German discussions of their own weaknesses, the Allies would be able to focus their offensives. The Bletchley decipherments were of the utmost importance. For example, when Germany invaded Denmark and Norway in April 1940, Bletchley provided a detailed picture of German operations. Similarly, during the Battle of Britain, the cryptanalysts were able to give advance warning of bombing raids, including times and locations. They could also give continual updates on the state of the Luftwaffe, such as the number of planes that had been lost and the speed with which they were being replaced. Bletchley would send all this information to MI6 headquarters, who would forward it to the War Office, the Air Ministry and the Admiralty.
In between influencing the course of the war, the cryptanalysts occasionally found time to relax. According to Malcolm Muggeridge, who served in the secret service and visited Bletchley, rounders, a version of softball, was a favorite pastime:
Every day after luncheon when the weather was propitious the cipher crackers played rounders on the manor-house lawn, assuming the quasi-serious manner dons affect when engaged in activities likely to be regarded as frivolous or insignificant in comparison with their weightier studies. Thus they would dispute some point about the game with the same fervor as they might the question of free will or determinism, or whether the world began with a big bang or a process of continuing creation.