Hall VI · Military WWI · January 1917 Broken (Room 40)

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.

OriginGerman Foreign Office (Arthur Zimmermann, State Secretary)
Sent16 January 1917
CodesOuter: 0075 (super-enciphered diplomatic code); inner: 13040 (transmission code)
Broken byNigel de Grey & Reverend William Montgomery, Room 40, January 1917
OutcomeUS declares war on Germany, 6 April 1917

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.

⚙️How It Works

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.

💀How It Was Broken
Codebook recovery from depth (1914–1917)
Complexity: Years of patient analysis

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.

Hall’s deception operation
Complexity: Statecraft, not cryptanalysis

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.

🔬What It Teaches Modern Cryptography
Zimmermann lessonModern echo
Re-encoding the same plaintext in two systems leaks bothSame key, two protocols → cross-protocol attacks (DROWN, ALPACA)
Operationally, intercepts depend on owning the wiresBGP hijack, undersea cable taps, lawful intercept architectures
The hardest problem is using the intelligence without burning the sourceThe Bletchley “ULTRA” disclosure problem; modern source protection in SIGINT
Diplomatic codebooks are huge symmetric secrets distributed by handWhy public-key cryptography was a generational leap forward
Quick Facts
OriginGerman Foreign Office (Arthur Zimmermann, State Secretary)
Sent16 January 1917
CodesOuter: 0075 (super-enciphered diplomatic code); inner: 13040 (transmission code)
Broken byNigel de Grey & Reverend William Montgomery, Room 40, January 1917
OutcomeUS declares war on Germany, 6 April 1917
← Previous Chinese Telegraph Code