Exhibit 52 of 169 World War II · 1939–1945 Interactive Demo

Purple (97-shiki ōbun injiki)

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

Frank Rowlett, Genevieve Grotjan & the US SIS · 20 September 1940

Invented1937 (Japanese Foreign Ministry)
InventorNavy Technical Research Institute engineers, for the Foreign Ministry
Key TypeStepping-switch banks (6-vowel + 20-consonant split) plus daily key sheet
Keyspace~9.45×10³² settings (26! plugboard × 6 switch arrangements × 25⁴ starting positions)
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 Red for important Japanese diplomatic traffic in 1939. It used telephone-type stepping switches rather than Enigma-style rotors. Its wiring separated six electrical paths from twenty others. With the external alphabet connections, these groups need not correspond to vowels and consonants; “sixes” and “twenties” are the more precise names.

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.

💡

MAGIC revealed diplomatic instructions before Pearl Harbor, including the breakdown in negotiations. Those messages did not disclose the Pearl Harbor attack plan or its target. Reading diplomatic traffic was not the same as reading every Japanese operational order.

How It Works (Simplified)

This pedagogical demo is a simplified split-alphabet stepping model, not a faithful reconstruction of Purple’s wiring, alphabet connections or switch movement. It 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 historical machine used one switch for the sixes and three in series for the twenties. The latter had designated fast, medium and slow roles and an irregular stepping rule. This is not an ordinary odometer, and the widget’s simple counter does not reproduce it.

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."

⚠️

Structural lesson: The sixes/twenties separation gave analysts an important foothold. It does not follow that the effective keyspace was simply halved. Recovering Purple required a combination of traffic, repeated patterns, painstaking analysis and machine reconstruction.

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
🎓

Modern cipher security is assessed through the complete construction and its attack model. Merely applying one substitution to every input byte is insufficient: a fixed substitution still preserves frequency information.

Quick Facts
Exhibit52 of 169
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 JN-25 (Japanese Naval Code)