Seizing the Enigma: The Race to Break the German U-Boat Codes, 1933-1945
Page 5
Room 40 was one of the Admiralty’s deepest secrets. This secrecy, combined with the great human capacity for denial, worked its woes upon the Germans during the first year or so of the war. They refused to believe that their codes had been jeopardized and their communications compromised. Neither direct evidence nor circumstantial persuaded them.
In reporting on the Magdeburg disaster, the admiral commanding the squadron in which the cruiser had served never mentioned that the codebook might have been lost. He restricted himself to the much less damaging statement that “the encipherment key to the codebook [was] not destroyed with certainty.” The naval staff could not shut its eyes so tightly to the possible survival of the code, but it took the hint proffered by the admiral and concluded that “no serious consequences are feared here from the possible loss of the codebook.” It merely ordered the printing of a new encipherment key.
A special investigation into the disposal of the Magdeburg’s secret documents likewise led to no overhaul of naval cryptography. The probe was ordered by the commander of the Baltic naval force, Prince Heinrich of Prussia, the kaiser’s bearded younger brother. Heinrich had been viewed before the war as unqualified for high command, but in pursuit of code security, at least, he proved dogged and imaginative.
His investigation reached the disturbing judgment that the Russians had probably fished up some of the German charts from the sea, and “in the same way the Russians probably also got their hands on the cipher key that was lost in the water, and finally the possibility must also be considered that the Russians, by diving, got one of the codebooks out of the shallow, clear water.” Heinrich proposed a new codebook and even urged mechanical encipherment. His proposals were ignored. In March 1915, a letter from a German naval officer who was a prisoner of war said in a veiled way that Britain possessed the German code. And in August the Germans captured and interrogated the very man, Lieutenant Galibin, who had found the codebook aboard the Magdeburg and heard from his lips that their enemy had their main code. The naval staff ignored it.
Meanwhile the navy determined that “the Handelsschiffsverkehrsbuch has fallen into enemy hands, probably by the seizure of the auxiliary hospital ship Ophelia.” The reason was wrong—the HVB code had been taken in Australia—but the conclusion was right.
The reaction of the naval staff to all these indications of a serious problem was that of many another bureaucracy: tokenism. A new superencipherment key was put into effect on October 20, 1914, and was replaced three months and six months later, on January 20 and March 20. But the original codebooks continued in service.
The strong circumstantial logic of events should also have told the Germans that their coded messages were being read. In December 1914, when a German naval squadron raced for home after bombarding some English coastal towns, it encountered some British cruisers athwart its path and escaped only with the help of fortuitous fog and rain squalls. The following month, when another German force sallied from its North Sea ports on a sweep to find and destroy isolated warships or freighters, it met British battle cruisers. This time the Germans weren’t so lucky. In a long-range heavy-gun battle that became known as the Battle of the Dogger Bank, the British sank one capital ship and greatly damaged two others. In March 1915, the new commander of the German High Seas Fleet planned a drive southward on the sixteenth but abandoned the plan when the weather grew bad. Nevertheless, German submarines and patrol ships reported that the British fleet had gone to sea on the sixteenth. On the twenty-ninth of that month German forces again left their harbors—and so did British. In the middle of April the British Grand Fleet sailed from Scapa Flow even before the Germans executed their planned sortie from their harbors—and returned to Scapa the day the Germans went home. On April 21, the two enemy forces again steamed out at the same time, as they did on May 17 and May 29.
By that time it had become clear to the high German commanders that the British knew in advance of all major German movements. They looked frantically for the cause, but they could think only of betrayal, of some hidden observer, of enemy submarines. They found nothing. The commander of the High Seas Fleet flatly rejected the possibility that the enemy was solving German naval messages.
As a consequence, tokenism triumphed again. The commander directed that superencipherment should not take place in the presence of subordinate personnel, who, being less trustworthy than officers, might betray it for money. He also instituted a new superencipherment. Still the codes were not changed.
What could possibly have engendered so self-destructive a denial of the evidence and enforced so dangerous an inertia? One probable reason was that few beliefs are as widespread or as firmly held as the belief in the unbreakability of one’s own codes. In Germany this attitude may have been intensified by arrogance: were the codes not German? Second, the naval staff may have wanted to avoid the consequences of the enemy’s possession of the codes. The staff would have to tell fellow officers that they had failed and would be transferred. Plans would have to be changed. Tactics and organizations, feared exposed, would have to be revised. And new codes would have to be compiled, printed, and distributed. Such a vast, costly, labor-intensive undertaking seemed out of the question for the Signalbuch der Kaiserlichen Marine, which measured 12 inches by 15 inches, was 6 inches thick, and had been issued so recently—in 1913.
A third likely reason was that the naval staff did not understand the capabilities of codebreaking. Such ignorance was not exclusive to Germany before World War I; Britain suffered from it as well For years codebreaking had not provided information of any great value to either government. The isolated solutions of the Franco-Prussian and the Boer wars did not publicize the activity, and the lessons of Britain’s eighteenth-century Decyphering Branch and of the Hanoverian, Saxon, and Prussian black chambers, all of which had closed three-quarters of a century before, had long been forgotten. Those allies of each country that had codebreaking units—Austria-Hungary on the one hand, France and Russia on the other—were reluctant at first to share this hard-won, easily lost source. The prewar German naval communicators, concentrating on getting their own messages through with the new technology of radio and congratulating themselves when they succeeded over ever greater distances, never dreamed that someone other than the person to whom they were sending might be hearing those messages. So far was such a consideration from their minds that when they themselves overheard Royal Navy transmissions, probably accidentally at first and later deliberately, they concerned themselves only with range, frequency, and call signs, not with content.
The fluctuations in reception seem to have led the Germans to believe that interception was too undependable for reliable intelligence. Regulations for the conduct of maneuvers even forbade gaining intelligence of the opposing forces by listening to their radio transmissions.
The situation began to change late in 1914, after the western front had calcified into a continuous line of trenches. Field telephones were used for communication, and the operators of the German Sixth Army’s main radio station in Roubaix, in northern France some fifteen miles behind the front, found themselves with little to do. So they were assigned to listen to British radio communications, most of them naval, since neither army relied on radio very much. Most of the intercepts were in code or cipher, and some of these, using the simple system in which one letter invariantly replaces another, had been solved by some of the station’s personnel Many were messages from British minesweepers, and the Germans put some of their solutions to practical use. When a British minesweeper reported a particular channel swept clear, the Germans would send a U-boat to lay new mines, and sometimes the codebreakers would soon thereafter read a message that a trawler in that channel had been blown up.
Successes like these led the navy to set up its own intercept posts and eventually a main controlling unit at Neumünster in northern Germany. Wooden towers, 150 feet tall, jutted above the pine woods to snare British messages for the new B- and E-Dienst (Beobachtungs-und Entzi
fferungs-Dienst, or Observation and Cryptanalytic Service), under the command of Lieutenant Martin Braune, the founder and soul of German naval communications intelligence.
Their solutions of British cryptosystems eventually persuaded the Germans that their own systems could be broken. Gradually the naval staff began to improve its practices. It speeded up the changes in the superencipherment key for the Signalbuch and began preparing a replacement for the HVB. In practice, these steps proved inadequate. Another attempt, the Allgemeines Funkspruchbuch (General Radio Message Book), or AFB, much better constructed, went into service May 1, 1917. And a little while later a new code finally replaced the Signalbuch, From the time it first had reason to fear the loss of its main code, the navy had delayed three years in making that fundamental change. This delay ranked as one of the greatest communications security failures in history.
Until then.
3
THE MAN, THE MACHINE, THE CHOICE
ON MONDAY, APRIL 15, 1918, GERMANY’S FORCES ON THE WESTERN front plunged forward in a supreme offensive intended to defeat France and Britain before America’s strength could be brought to bear. “Great success” screamed a headline in a special edition of the Berliner Lokal-Anzeiger. And on that day a thirty-nine-year-old resident of the capital, writing from Hildegardstrasse 17, addressed a letter to the Imperial Germany Navy:
Under file number Sch 52638 IX/42n I have applied for a patent for a cipher machine. The commercial exploitation is at present assigned to Certified Engineer E. Richard Ritter & Co. as representative. The firm takes the liberty of submitting the enclosed further details about the apparatus, which in my view may be of interest.
The machine, the writer pointed out,
would avoid any repetition of the sequence of letters when the same letter is struck millions of times…. The solution of a telegram is also impossible if a machine falls into unauthorized hands, since it requires a prearranged key system.
The writer was Arthur Scherbius, an electrical engineer, who had invented a wholly new system of cryptography. He had done so independently of three other men in the United States, the Netherlands, and Sweden, who had conceived the same principle at about the same time. This was the principle of the rotor.
A rotor is a wired codewheel. Its body is a disk about the size of a hockey puck made of a nonconducting material such as hard rubber or bakelite. Evenly spaced around the circumference of the disk on both sides are electrical contacts, usually twenty-six, usually of brass. The contacts on one side are connected by wires through the body of the rotor to contacts of the opposite face in a random arrangement. If each contact represents a letter, the rotor embodies a cipher alphabet. An electrical impulse fired into the rotor at the input contact representing a given plaintext letter, say a, will emerge at an output contact representing a ciphertext letter, say, Q. The wiring is the heart, the basic secret, of the machine.
Electrical encipherment was, however, not revolutionary. What distinguished this system was the ability of the wired codewheel to rotate. Imagine one rotor placed between two fixed plates. Each plate has a circle of contacts spaced like those on the rotor. In Scherbius’s machine, each contact on the input plate was connected to a key on a typewriter keyboard. Each contact on the output plate was connected to a flashlight bulb that illuminated a letter on a glass screen. Batteries provided the current.
Enciphering with a rotor machine consists of pressing the typewriter keys corresponding to the letters of the plaintext and noting the successive lit-up letters. These form the ciphertext. As each letter is enciphered, the electrical current passes through the input plate contact for that letter, enters the rotor at the rotor contact opposite, winds through the rotor, emerges at a different position on the other face, passes into the output plate, and goes to the bulb underneath the ciphertext letter.
If the rotor did not turn, each plaintext letter would always have the same ciphertext letter. But the pressing of a typewriter key pushes the rotor forward one space, 1/26th of a revolution, which gives each plaintext letter a different internal rotor path and thus a different ciphertext letter. For example, if a plaintext includes a double letter r, the first r might be replaced with Z and the second with M.
Suppose a plaintext consists solely of the letter a. The first 26 a’s will all have different ciphertext replacements as the rotor revolves. But the 27th will have the same ciphertext as the first because the rotor will have returned to its first position. So short a period—26 letters—is a cryptographic weakness. However, the period can be lengthened, and the cipher simultaneously made more complex, by placing a second rotor, with wiring different from the first, next to the first and having it turn one space each time the first wheel completes a revolution. The continually varying positions of the two rotors will create different internal combined wiring until the first wheel has revolved 26 times, when the second rotor returns to its original position. The first wheel’s 26 revolutions of 26 letters each means that 26 × 26, or 676 letters, will be enciphered through a different wiring maze. Only at the 677th will the internal maze be the same as for the first letter. (The alphabet, of course, has only 26 letters, and many of these will repeat in the ciphertext. But if the plaintext consisted only of a’s, the sequence of ciphertext letters would start to repeat only at the 677th a.)
Using the same principle, more rotors can be added, each one lengthening the period by a factor of 26. Four rotors produce a period of 456,976 letters; five rotors, a period of 11,881,376.
To decipher a message in such a machine, the cipher clerk obviously needs to know the starting positions of the rotors. This crucial information, called the key, must be agreed upon by sender and receiver in advance of any communication between them. Often a key takes the form of a list of starting positions for each day in a month; the sheets of paper bearing this list are distributed by couriers to all the radio or telegraph stations that will encipher or decipher their communications with the same machine. A key can encompass other elements as well. If, for example, the rotors are removable, so that they can be inserted into the machine in varying orders, the key will specify the order of the rotors from left to right. Without the key the decipherer would not be able to read the message except by playing codebreaker.
The mechanism that Scherbius offered the navy in the spring of 1918 was a sample multirotor machine. His memorandum explained the rotor principle and then his chief point: the impracticability of the enemy’s solving a message even if he had the machine:
The key variation is so great that, without knowledge of the key, even with an available plaintext and ciphertext and with the possession of a machine, the key cannot be found, since it is impossible to run through 6 billion (seven rotors) or 100 trillion (thirteen rotors) keys [rotor starting positions]. If the examination of each telegram takes half a minute in a 24-hour workday, this would require 5.8 years with a simultaneous employment of 100 machines of seven rotors and 14.5 years for 1,000 machines of eight rotors.
He noted, correctly, that “it would only make sense to search for a key in this way when it is known that unknown cryptograms have the same key. And when the same key is maintained for a long time.”
The naval staff examined Scherbius’s machine and found that it afforded “good security, even if compromised.” But it decided not to buy it “because with the present kind of naval cipher traffic, the use of machines is not worthwhile.” Instead it recommended that the Foreign Office examine the machine to see if it were suitable for diplomatic correspondence. The price of a ten-rotor machine, measuring 12 by 5½ by 4¾ inches, with an attached typewriter to print the output, was 4,000 to 5,000 marks, or $1,600 to $2,000 (about $14,400 to $18,000 in 1991 dollars), and delivery time was eight weeks. This price, Scherbius said, could be reduced to 1,400 to 1,800 marks, or $560 to $720 ($5,000 to $6,500 in 1991 dollars), if a thousand machines were bought.
But the Foreign Office was not interested either. This may have discouraged Scherbius, but it did not def
eat him. The cryptography bug had bitten him.
Scherbius was born on October 20, 1878, in Frankfurt-am-Main, the son of a small businessman. He graduated from that city’s Ober-realschule, a type of secondary school that emphasized mathematics, natural sciences, and modern languages; most of its graduates went into engineering. After studying electricity for the 1901–02 winter semester at the Technical College in Munich, Scherbius matriculated May 13, 1902, at the Technical College in Hanover. He studied one or two courses at a time for several months, among them Electrical Installations and Factory Installations, and completed his studies in March 1903. The following year he finished his dissertation, “Proposal for the Construction of an Indirect Water Turbine Governor,” which was accepted. At the age of twenty-five, he was granted a doctorate in engineering.
Scherbius worked for several of Germany’s major electrical firms and for a large Swiss electrical firm. He made his first invention, a high-voltage drive motor designed to handle sudden changes of stress, for the Swiss company. In 1918, he and E. Richard Ritter, the certified engineer mentioned in his first letter to the navy, founded the firm of Scherbius & Ritter. As a partner in it, he continued to invent (electric pillows, ceramic heating parts, and asynchronous motors, among others), research (problems of high-tension direct current and temperature control), and publish. He wrote articles on such subjects as a shunt phase compensator and a ninety-one-page pamphlet on magnetic induction in closed coils. His name became enshrined in the field with the Scherbius principle for asynchronous motors.