The Purple machine
The Japanese diplomats’ code, broken without anyone ever seeing the machine

Mark Pellegrini — CC BY-SA 2.5 — Wikimedia Commons
In brief
From 1939, Japan encrypted its most secret diplomatic messages with a machine the Americans nicknamed “Purple”. In September 1940, a US Army team led by William Friedman and Frank Rowlett managed to reconstruct it using nothing but intercepted messages.
The story
The Japanese machine did not use rotors like Enigma, but multi-position telephone stepping switches. The Americans, who had already broken an earlier code nicknamed “Red”, gave this one the name of the next colour in their system. After months of calculations, the mathematician Genevieve Grotjan found, on 20 September 1940, the repetitions that revealed how the machine worked.
The team then built a copy without ever having seen the original. The decrypted messages, called “Magic”, kept American leaders informed of Japanese intentions. On 7 December 1941, the long message breaking off negotiations with the United States was decrypted even before the Japanese embassy delivered it, but it did not say that Pearl Harbor was about to be attacked. Only a few pieces of a real machine were found, in 1945, in the ruins of the Japanese embassy in Berlin.
Did you know?
William Friedman was so exhausted by this work that he had to be hospitalised a few months later.
Sources: D. Kahn, The Codebreakers, 1967 (rev. ed. 1996); S. Singh, The Code Book, 1999; F. L. Bauer, Decrypted Secrets, 4th ed., 2007; C. P. Bauer, Secret History: The Story of Cryptology, 2nd ed., 2021; texts written for this site.
The Jefferson wheel cipher
The Enigma machine
Hagelin’s machines
The Turing Bombe
The Lorenz cipher machine
SIGABA
Colossus
The Moscow–Washington hotline