Exhibit 52 of 137 World War II · 1939–1945 Broken (1940) Interactive Demo

Purple (Type 97 jiki-O-bun-In-ji-ki)

Stepping switches instead of rotors — and an analog replica built from inference alone.

Invented1937 (Japanese Foreign Ministry)
InventorImperial Japanese Navy Technical Research Institute
Key TypeStepping-switch banks (6-vowel + 20-consonant split) plus daily key sheet
Keyspace~7×10²⁹ effective settings (per day)
Broken ByFrank Rowlett, Genevieve Grotjan & the US SIS · 20 September 1940
Modern LessonDistinct sub-ciphers per character class create exploitable structure

Why This Matters

Purple was Japan's highest-grade diplomatic cipher from 1939 through the end of World War II. The US Signals Intelligence Service broke it without ever seeing the machine, building an analog replica from intercept traffic alone — one of the most impressive feats in the history of cryptanalysis. The intelligence stream that resulted, codenamed MAGIC, shaped American strategy in the Pacific and exposed the diplomatic moves of Tokyo, Berlin, and Rome to Washington in near real time.

📜Historical Context

Purple replaced the older "Red" machine in 1939 for high-grade Japanese diplomatic traffic. Where Enigma used rotating wheels, the Japanese designers chose stepping switches — telephone-exchange relays that step to a new contact each cycle. Purple split each plaintext character into two streams: the six vowels (A, E, I, O, U, Y) went through one stepping-switch bank, and the twenty consonants went through three more. That asymmetric design was its defining feature and ultimately the structural seam that exposed it.

William Friedman recruited Frank Rowlett to lead the cryptanalytic attack. The team had no machine, no diagram, and no defector — only ciphertext. For 18 months they hunted patterns in stepping cycles. On the afternoon of September 20, 1940, junior cryptanalyst Genevieve Grotjan brought Rowlett a worksheet with a recurring alignment in the consonant alphabet. Within weeks, the SIS had constructed a working analog of Purple from inference alone.

💡

The MAGIC intercepts read Tokyo's instructions to its Washington embassy in the days before Pearl Harbor. The intelligence existed; the failure to act on it was bureaucratic, not cryptanalytic.

⚙️How It Works (Simplified)

The pedagogical demo on this page faithfully reproduces Purple's structural design, not its full electrical wiring. The interactive engine implements:

  1. Split the input alphabet into a 6-letter vowel set and a 20-letter consonant set.
  2. Apply a stepping permutation to each set, advanced by an internal counter.
  3. Re-merge the encrypted vowels and consonants into the output stream in the original positions.
  4. Step the switch positions according to a daily key.

The actual 1940 machine used three stepping switches for the consonant bank wired in series, with carry-over advancement triggered by completed cycles — closer in spirit to a digital odometer than a rotor. The SIS analog used the same partition but standard rotary switches, since stepping relays were scarce in the US.

💀How It Was Broken
Stepping-Switch Cycle Analysis
Complexity: Hard · Frank Rowlett, SIS · 1939–1940

Rowlett's team treated the consonant bank's stepping cycle as the leverage point. By tabulating which ciphertext letters appeared in which positions across many intercepts, they reconstructed the stepping behavior without ever observing the hardware. The vowel bank, with only six letters, fell first — providing partial cribs that constrained the larger consonant problem.

Pattern Recognition (Grotjan's Insight)
Complexity: The single break · Genevieve Grotjan · 20 September 1940

On a worksheet aligning intercept plaintext-ciphertext pairs across repeated daily keys, Grotjan identified a recurring relationship in the consonant alphabet — the alignment that revealed how the consonant bank's stepping switches were wired. Rowlett later called it "one of the great breaks of the war."

⚠️

Why it failed fundamentally: Treating vowels and consonants as separate sub-ciphers halved the effective keyspace and produced statistically distinguishable streams. Any modern design would feed the entire alphabet through a single, uniform permutation precisely to avoid this kind of structural seam.

🔬What It Teaches Modern Cryptography
Concept from PurpleModern Evolution
Stepping-switch keystreamLinear feedback shift register (LFSR) stream ciphers
Per-character-class subcipherCautionary anti-pattern — modern ciphers treat all bits uniformly
Daily key-sheet rotationModern key rotation policies (TLS session keys, signal protocol ratchets)
Reconstruction from traffic aloneModern side-channel and known-ciphertext attack research
🎓

The principle Purple violated — uniform treatment of all input symbols — is enforced explicitly in modern designs like the AES S-box, which applies the same nonlinear transformation to every byte regardless of value or position.

Quick Facts
Exhibit52 of 52
EraWorld War II · 1939–1945
StatusBroken (1940)
InventorJapanese Foreign Ministry (Type 97)
Year1937 (deployed) · 1939 (replaced Red)
Key TypeStepping-switch banks + daily key sheet
Broken ByRowlett, Grotjan & the US SIS
Modern LessonAvoid per-class sub-ciphers
📚References
  • Frank B. Rowlett, The Story of Magic: Memoirs of an American Cryptologic Pioneer (Aegean Park Press, 1998).
  • National Security Agency Center for Cryptologic History, The Friedman Legacy: A Tribute to William and Elizebeth Friedman (NSA, 2006).
  • Stephen Budiansky, Battle of Wits: The Complete Story of Codebreaking in World War II (Free Press, 2000), ch. 5–6 on Purple and MAGIC.
← Previous Red (Type A)