Zimmermann Telegram German codes 0075 / 13040 · 1917
A diplomatic codebook cipher, cracked in Room 40, that pulled the United States into the First World War.
Why This Matters
On 16 January 1917 Foreign Secretary Arthur Zimmermann sent the German ambassador in Washington a telegram instructing him, in the event of US entry into the war, to propose to Mexico an alliance against the United States with the promise of help recovering Texas, New Mexico, and Arizona. The cable was relayed via Stockholm and Buenos Aires using cables the British had cut and re-routed through London — every word passed through Room 40 of the Admiralty before reaching its destination.
Two cryptanalysts, Nigel de Grey and the Reverend William Montgomery, partially decoded the telegram within hours. Britain then faced a delicate problem: revealing the contents would also reveal that they were reading German diplomatic traffic, and the Americans might suspect a forgery. The solution was a months-long deception that ended with a copy of the cable being “stolen” from a Mexican post office. The telegram’s publication on 1 March 1917 swung American opinion decisively toward war.
The Zimmermann Telegram was protected by the German diplomatic code 0075: a two-part codebook in which common words and phrases mapped to 4- and 5-digit code groups, and the resulting digit string was super-enciphered by an additive key. By January 1917 the British had recovered enough of 0075 from intercepts and a captured codebook (Magdeburg, 1914) to read most of it.
Because Washington could not receive 0075, the cable was forwarded by the German Embassy from Washington to Mexico City re-encoded in the older diplomatic code 13040, which the British had also broken. The retransmission was a critical operational error: it gave Room 40 a parallel text in two ciphers and let them attribute the leak to Mexican rather than British sources.
The demo above is a faithful but simplified codebook engine: each input word is encoded as a 5-digit group via a fixed 140-word codebook, with super-enciphered additive applied to every group. Words not in the codebook fall through to a per-letter mode marked by sentinel groups — mirroring how operators handled proper nouns and place names.
Room 40 had been collecting German diplomatic traffic since 1914. Repeated codegroup contexts, captured codebooks (notably the SKM and HVB books from sunk warships), and stylised diplomatic boilerplate let analysts gradually map most of the 0075 and 13040 codebooks before the Zimmermann cable arrived.
Admiral Sir William “Blinker” Hall, head of Room 40, used a British agent in Mexico to obtain a copy of the cable from a commercial telegraph office in Mexico City — an entirely real document that allowed the British to share the plaintext with the Americans without revealing they had been reading German cable traffic since 1914.
| Zimmermann lesson | Modern echo |
|---|---|
| Re-encoding the same plaintext in two systems leaks both | Same key, two protocols → cross-protocol attacks (DROWN, ALPACA) |
| Operationally, intercepts depend on owning the wires | BGP hijack, undersea cable taps, lawful intercept architectures |
| The hardest problem is using the intelligence without burning the source | The Bletchley “ULTRA” disclosure problem; modern source protection in SIGINT |
| Diplomatic codebooks are huge symmetric secrets distributed by hand | Why public-key cryptography was a generational leap forward |
| Origin | German Foreign Office (Arthur Zimmermann, State Secretary) |
| Sent | 16 January 1917 |
| Codes | Outer: 0075 (super-enciphered diplomatic code); inner: 13040 (transmission code) |
| Broken by | Nigel de Grey & Reverend William Montgomery, Room 40, January 1917 |
| Outcome | US declares war on Germany, 6 April 1917 |