Purple Machine (97-shiki)
Japan’s Type 97 diplomatic cipher machine, codenamed "Purple" by American cryptanalysts.
Unlike rotor-based ciphers, Purple used telephone stepping switches (uniselector switches) to
perform its substitutions. The alphabet was split into a group of 6 ("sixes") and 20 ("twenties"),
each handled by different switch banks.
William Friedman’s SIS team broke Purple in September 1940 — building
a working replica without ever seeing the original machine. This feat, codenamed "MAGIC," gave the
US access to Japanese diplomatic traffic throughout WWII. Friedman suffered a nervous breakdown from
the effort and was hospitalized in January 1941.