Skip to main content

World War I: Loss of the German Codebook

World War I: Loss of the German Codebook


At the outset of World War I, the science of cryptography assumed a distinctly modern character. New developments, such as the international telegraph system and the telephone left cryptologists grappling with new ways to adapt encryption methods to the new technology. The ultimate goal of cryptologists of the era was to invent a means of transcribing and decoding ciphers without the use of cumbersome codebooks that could easily fall into enemy hands. Wartime experimentation proved impractical, so for most of the war, both sides relied on older-style codebooks. For the Germans, this proved disastrous. Between 1914 and 1918, the German forces lost four codebooks, all of which were recovered by British intelligence services. For much of the war, German communications were intercepted and deciphered by the British intelligence code-breaking unit known as Room Forty, giving Allied forces a decisive strategic advantage.

The first copy of a German codebook to be recovered by British forces was stolen with the help of British-born Austrian spy, Alexander Szek. Szek was a telegraph operator in Belgium. Room Forty picked up strange signals coming from Szek's station, then contacted Szek, along with locating his relatives in London. British agents sent a letter to Szek, urging him to join the British war effort as a spy, or face unforeseen consequences. They further threatened to incarcerate his relatives who lived in London.

Szek agreed to help steal German codes by photographing the German codebook. He was intensely nervous about his espionage role for the beginning of the operation, but became even more unnerved as time progressed. Fearing capture by the Germans, Szek arranged with intelligence officers to flee to Britain after he completed his work photographing the codebook. When Szek delivered the last copies of the codebook to an agent in the Netherlands, however, he was returned to Brussels so as not to appear suspicious to German authorities. If the Germans suspected that Szek had stolen the code, the code would be replaced. His jumpy actions rendered Szek a security risk.

Szek was later found shot to death in his apartment in Brussels. The British government claimed that German agents killed Szek after discovering his espionage activities. Unaware of the theft, the Germans continued to use the code Szek had stolen. Some years later, British Navy captain and intelligence attaché Captain Stephen Roskill, admitted to ordering a hired hit on Szek. The British Admiralty was plagued by Szek's constant nervousness and worried that he might confess his actions to the Germans in order to assuage his sense of guilt. Although the information gained from Szek's work was immensely valuable, its price would soon seem exceedingly steep. A few months after incident with Szek, British divers recovered a box from a sunken German U-boat. The box contained a copy of the German Foreign Office code book, the same code that had been laboriously photographed and smuggled to British intelligence by Szek.

1914 was a providential year for Room Forty. In August, a third German codebook, the naval code, was given to British cryptologists by Russian forces. The German cruiser Magdeburg sank off the coast of Finland, and a Russian vessel picked up survivors of the downed ship. Upon searching the German crew, Russian authorities discovered the codebook in the possession of one of the ship's officers. After analyzing the new codebooks, British intelligence was able to decipher and monitor most German fleet dispatches from 1915 to 1917, after which a variant code was introduced.

Room Forty cryptologists received one final gift in 1915. As British forces closed in on Persia, German consul Wilhelm Wassmus hastily fled his office, leaving behind his copy of the German diplomatic codebook. While the code was less frequently used than others, the recovery of the fourth code book gave Room Forty the mathematical key to the main German encryption system.

With a network of listening stations established in Europe and in the North Sea, Room Forty monitored most German wire traffic throughout the course of the war. The loss of codebooks diminished Germany's capability for surprise attacks at sea, despite the advantage of a technically superior fleet. In 1918, the German company Siemans, under contract with the German government, developed a prototype cipher machine that encoded and decoded messages without need of a codebook.



Gilbert, Martin. The First World War: A Complete History. New York: Henry Holt, 1996.

Khan, David. The Codebreakers: The Story of Secret Writing. New York: Scribner, 1996.


Room 40

Cite this article
Pick a style below, and copy the text for your bibliography.

  • MLA
  • Chicago
  • APA

"World War I: Loss of the German Codebook." Encyclopedia of Espionage, Intelligence, and Security. . 25 Apr. 2019 <>.

"World War I: Loss of the German Codebook." Encyclopedia of Espionage, Intelligence, and Security. . (April 25, 2019).

"World War I: Loss of the German Codebook." Encyclopedia of Espionage, Intelligence, and Security. . Retrieved April 25, 2019 from

Learn more about citation styles

Citation styles gives you the ability to cite reference entries and articles according to common styles from the Modern Language Association (MLA), The Chicago Manual of Style, and the American Psychological Association (APA).

Within the “Cite this article” tool, pick a style to see how all available information looks when formatted according to that style. Then, copy and paste the text into your bibliography or works cited list.

Because each style has its own formatting nuances that evolve over time and not all information is available for every reference entry or article, cannot guarantee each citation it generates. Therefore, it’s best to use citations as a starting point before checking the style against your school or publication’s requirements and the most-recent information available at these sites:

Modern Language Association

The Chicago Manual of Style

American Psychological Association

  • Most online reference entries and articles do not have page numbers. Therefore, that information is unavailable for most content. However, the date of retrieval is often important. Refer to each style’s convention regarding the best way to format page numbers and retrieval dates.
  • In addition to the MLA, Chicago, and APA styles, your school, university, publication, or institution may have its own requirements for citations. Therefore, be sure to refer to those guidelines when editing your bibliography or works cited list.