Skip to content

Codename PURPLE: The Cipher America Broke — and Why It Didn’t Stop Pearl Harbor

On December 7, 1941, the U.S. Army’s Signal Intelligence Service (SIS) in Washington was already reading the 14-part message Tokyo had sent to its embassy in Washington, along with an instruction to deliver it, a notice breaking off negotiations, to the U.S. government at 1 p.m. Washington time. While the embassy staff struggled to decrypt and type it, the Americans had decrypted and translated the same document first (Wikipedia). That edge came from breaking the Japanese Foreign Ministry cipher machine the United States called “PURPLE.” Yet on that very day, Pearl Harbor in Hawaii was hit by a surprise attack from Japanese carrier aircraft. Why could a nation reading its rival’s deepest diplomatic cipher not stop the attack? The answer lies in what PURPLE carried, and what it did not.

Watch the explainer video

Watch on YouTube

Background — A Machine Built by the Navy, Used by the Foreign Ministry

The machine’s Japanese name was the “Type 97 Typewriter for European Characters” (九七式欧文印字機), a Type 97 printer for Roman letters. “97” stands for the Japanese imperial year 2597, or 1937, when it was completed, and the Foreign Ministry called it the “Type B Cipher Machine.” It was developed not by the Foreign Ministry but by the Japanese Navy. Kazuo Tanabe of the Navy’s technical research institute led the design, and engineer Eikichi Suzuki proposed replacing the troublesome half-rotor switch of the earlier machine with a telephone-exchange stepping switch. The Foreign Ministry used the machine the Navy supplied (Wikipedia).

The name PURPLE came from the Americans, not the Japanese. U.S. analysts called the earlier Type A machine RED and gave its Type B successor the name PURPLE. In late 1938 the Americans read, in a Japanese message they had decrypted, the notice that the new B cipher would replace the A cipher from February 1939. As announced, Type B messages began to appear in February 1939 (George C. Marshall Foundation; Wikipedia).

PURPLE inherited one weakness straight from RED. RED enciphered six of the alphabet’s 26 letters, the vowels A, E, I, O, U, and Y, separately from the twenty consonants. It seems to have been designed to cut telegram costs, and it made those six letters much easier to break. PURPLE also split the 26 letters into a group of six and a group of twenty. The difference was that the six were no longer fixed as vowels but changed every nine days (Wikipedia).

A machine fragment with switches and colored wires in a metal frame, displayed in a glass case on a stand labeled 'PURPLE'
A fragment of a Type 97 machine (PURPLE) at the U.S. National Cryptologic Museum. Recovered from the Japanese embassy in Berlin in 1945, it is the largest piece known to survive.
Photo: United States Government · Public domain · Wikimedia Commons

How It Worked — A Cipher Machine Made from Telephone-Exchange Parts

Most cipher machines of the day, including Germany’s Enigma, changed letters by turning rotors. PURPLE was different. It used stepping switches, the parts that connected calls in telephone exchanges. A stepping switch moves its contact arm one position each time it receives an electrical pulse, and PURPLE’s switches cycled through 25 positions (Wikipedia).

Here is the path a letter took. A letter typed on the keyboard was first scrambled on a plugboard and sorted into the group of six or the group of twenty. The six passed through a single switch and were changed by one of 25 substitutions. The twenty passed through three stages of switches in turn and were changed three times. The three stages moved fast, medium, and slow, and a number at the start of each message, the indicator, set which stage moved at which speed and where the switches started. The plugboard arrangement changed every day (Wikipedia).

The Japanese machine built each twenties stage from three 7-level stepping switches; the analog the Americans later built did the same job with four 6-level switches. The Americans never saw a Japanese machine, yet when they obtained a fragment after the war, the Japanese switches turned out to be almost identical to the part the American team had chosen for its analog (Wikipedia).

The Break — Eighteen Months of Darkness and September 20, 1940

The new cipher stopped American analysts cold. Japanese diplomatic messages they had read for years through RED suddenly could not be read. Major General Joseph Mauborgne, the Army’s Chief Signal Officer, told William Friedman to “drop everything” and take charge of the problem (George C. Marshall Foundation). Friedman took over the team attacking the B system in August 1939 (Wikipedia).

The six letters fell relatively quickly. By charting every day how six letters appeared more often than the other twenty, the team recovered all of the sixes substitutions by April 1939. Knowing only the six letters scattered through a message was enough to reveal its skeleton (George C. Marshall Foundation; Wikipedia).

The twenty were another matter. In his report, Friedman marveled that the repetitions in this ciphertext were fewer than you would expect if the letters had been “drawn at random out of a hat” (George C. Marshall Foundation). Still, there were footholds. Some messages carried texts such as letters from the U.S. government to the Japanese government, whose English originals could be obtained, and posts that did not yet have a Type B machine sometimes received the same message in the already broken RED. Stock phrases in official messages helped too. These pieces of matching plaintext became the foothold for attacking the twenties (Wikipedia). So it is not accurate to say PURPLE was broken from ciphertext alone. More precisely, it was broken without the machine or any blueprint.

The day-to-day work was led by Frank Rowlett, with Robert Ferner, Genevieve Grotjan, Leo Rosen, and Albert Small. Rosen, a recent MIT graduate, devised a mechanism to speed up recovering the sixes (INSCOM Command Historian). Out of more than a thousand messages, the team found six that used the same indicator, and it converted messages from different days so they could be compared as if sent on the same day (George C. Marshall Foundation; Wikipedia).

On the afternoon of September 20, 1940, Grotjan, a 27-year-old statistician who had come from the Railroad Retirement Board only a year earlier, quietly approached Rowlett and asked whether she could show him what she had found. She pointed to repeating sequences in the twenties ciphertext. Her colleagues cheered and ran around the room. A week later, on September 27, Rowlett handed Friedman two completely decrypted PURPLE messages (INSCOM Command Historian). By coincidence, that was the day Japan signed the Tripartite Pact with Germany and Italy (Wikipedia).

Black-and-white portrait of a smiling middle-aged man with a moustache and bow tie
William F. Friedman, who led the U.S. Army Signal Intelligence Service (SIS) effort against PURPLE.
Photo: Unknown author · Public domain · Wikimedia Commons

In his report that October, Friedman called the achievement the culmination of “18 months of intensive study” and wrote that “the name of no one person can be selected as deserving of the major portion of credit” (George C. Marshall Foundation).

The next task was the machine. By the end of 1940, without ever seeing a Japanese machine, SIS had built an analog that reproduced the logic it had deduced (George C. Marshall Foundation). A second analog went to the Navy, and a third crossed to Britain in January 1941, carried by four American cryptanalysts from the Army and Navy, who received information on British successes against German ciphers in return. That machine later moved to Singapore and then India. A fourth went to the Philippines, and a fifth stayed with SIS. A sixth, meant for Hawaii, also ended up in Britain (Wikipedia). Pearl Harbor had no PURPLE analog.

A wooden case holding rows of stepping switches and wiring, displayed on a museum stand
The first PURPLE analog built by the U.S. Army Signal Intelligence Service, made from the deduced logic alone, without anyone having seen a Japanese machine.
Photo: Mark Pellegrini · CC BY-SA 2.5 · Wikimedia Commons

What Did PURPLE Reveal About Pearl Harbor?

This is the part most often misread. PURPLE carried only diplomatic traffic between the Foreign Ministry in Tokyo and missions abroad such as Washington and Berlin. The Japanese Navy used entirely different ciphers, including JN-25 (Wikipedia). Journalist Steve Twomey summed it up: the United States “could read only some of the diplomatic ciphers, and none of the military communications” (American Institute of Physics, Inside Science).

The strike force that left a base in Japan’s far north on November 26 crossed the North Pacific with six aircraft carriers carrying 353 planes. It kept radio silence the whole way. In Twomey’s words, “Purple heard nothing” (American Institute of Physics, Inside Science).

That does not mean PURPLE revealed nothing. On December 6, Washington read Tokyo’s orders telling the embassy and the Honolulu consulate to get ready to burn documents and destroy their cipher machines, a sure sign that war was close. The question was where. American expectations centered on the southwestern Pacific: the Philippines, Singapore, the Dutch East Indies, and French Indochina (American Institute of Physics, Inside Science).

A typed document of five-letter cipher groups in rows, with handwritten number calculations at the upper right
PURPLE ciphertext of the first part of the 14-part message Japan delivered to the U.S. government on December 7, 1941. The handwriting at upper right works out the switch starting positions and stepping order from the message indicator.
Document: U.S. Government · Public domain · Wikimedia Commons

The 14-part message was no different. It was a diplomatic notice ending negotiations and severing relations; it named no target such as Pearl Harbor and no time of attack (George C. Marshall Foundation). The embassy, struggling with decryption and typing, delivered it later than instructed (Wikipedia). On top of that, very few people saw PURPLE intelligence. According to Twomey, only ten offices received it, including the President’s, and the military command in Hawaii was not among them (American Institute of Physics, Inside Science).

George Marshall, the Army Chief of Staff at the time, testified before the Army Pearl Harbor Board in August 1944: “We anticipated, beyond a doubt, a Japanese movement in Indo-China and the Gulf of Siam, and against the Malay Peninsula. We anticipated also an assault on the Philippines. We did not, so far as I recall, anticipate an attack on Hawaii.” The reason, he said, was the belief that Hawaii’s defenses would make such an attack “extremely hazardous” for Japan (George C. Marshall Foundation). Robert Hanyok, a retired National Security Agency historian, says that even in hindsight there was no way to predict an attack on Hawaii from what the codebreakers uncovered (American Institute of Physics, Inside Science). That the United States broke PURPLE is true. It does not mean the United States knew in advance about the attack on Pearl Harbor.

Black-and-white photograph of a battleship listing and burning under thick black smoke
The battleship Arizona burning after the attack on December 7, 1941. On this ship alone, 1,177 sailors and Marines were killed.
Photo: U.S. National Archives · Public domain · Wikimedia Commons

How Is MAGIC Different from PURPLE?

A name that often appears alongside PURPLE is MAGIC. They are not the same thing. PURPLE is the name the Americans gave to the Japanese Foreign Ministry’s Type B machine and its cipher. MAGIC is the codename for the intelligence obtained by breaking ciphers. As early as 1934, the U.S. Army called its work deciphering Japanese diplomatic codes MAGIC (George C. Marshall Foundation). One is the machine; the other is what was learned from it.

The name MAGIC later came to cover naval decrypts as well. So crediting every “thanks to MAGIC” story to PURPLE is wrong. The best-known example is the April 1943 operation that shot down the plane carrying Admiral Isoroku Yamamoto, commander of Japan’s Combined Fleet. The intelligence behind it came not from the diplomatic PURPLE cipher but from breaking the Japanese naval cipher JN-25 (Wikipedia).

Black-and-white photograph of two women working at typewriters and a box-shaped machine in an office
Women of the Signal Intelligence Service at work with a PURPLE analog during World War II.
Photo: U.S. Army photographer · Public domain · Wikimedia Commons

Legacy — Reports from Berlin

PURPLE’s real value showed most clearly after Pearl Harbor. Hiroshi Oshima, Japan’s ambassador to Germany, was well informed on German military affairs and reported what he learned to Tokyo in PURPLE. On June 3, 1941, he relayed Hitler’s remark that “in every probability war with Russia cannot be avoided,” and in 1944 he toured the Atlantic Wall along the coasts of France and Belgium and reported on it. The Allies read those messages. Marshall called Oshima “our main basis of information regarding Hitler’s intentions in Europe” (Wikipedia).

Black-and-white photograph of an Asian man in a suit shaking hands with a man in military uniform, with uniformed officers behind
Hiroshi Oshima, Japan’s ambassador to Germany (left), shaking hands with Hitler in 1942. His reports to Tokyo went out in PURPLE, and the Allies read them.
Photo: German press photographer · Public domain · Wikimedia Commons

It is often said that Japan never realized PURPLE had been broken, but it was not without warning. In April 1941, Hans Thomsen, a German diplomat in Washington, told Foreign Minister Ribbentrop that “an absolutely reliable source” had said the Americans had broken the Japanese diplomatic cipher, and the warning was passed on to Japan. Japan kept using the Type B machine anyway, and the Americans read Japanese messages throughout the war. Japan first learned that PURPLE had been broken through the U.S. congressional hearings on Pearl Harbor after the war (Wikipedia).

Even so, concluding that “Japan let its guard down, and that is why Pearl Harbor happened” reverses cause and effect. As we have seen, Japan’s plans for the attack were never sent over PURPLE in the first place. A cipher being broken and a surprise attack succeeding happened on different levels.

In 1945, as the war ended, the United States recovered fragments of a PURPLE machine from the Japanese embassy in Berlin. The other machines at Japanese missions around the world had been smashed beyond recognition by the Japanese (Wikipedia). That fragment is now at the U.S. National Cryptologic Museum. Rebuilding a machine made from telephone-exchange parts instead of rotors, without the machine or a blueprint, from ciphertext and a handful of clues, remains one of the outstanding achievements in the history of codebreaking.

Close-up of a machine interior with masses of wires densely tangled between terminal boards
Wiring of the improved PURPLE analog of 1944 at the U.S. National Cryptologic Museum. This tangle of wires carried out the scrambling of the twenty letters.
Photo: ArnoldReinhold · CC BY-SA 4.0 · Wikimedia Commons

The lesson of this story runs deeper than technology. Reading a rival’s most secret diplomatic documents is not the same as knowing its military’s next move. Through PURPLE, the United States heard what the Foreign Ministry in Tokyo was thinking, but the fleet bound for Pearl Harbor never said a word on that line.

References

Watch the 1-minute Short

Watch the Short on YouTube

Leave a Reply

Trade name SouthmanRepresentative In NamBusiness registration no. 106-11-72375 VerifyMail-order business report no. 2026-Hwaseong Dongtan-3378Address 301, 361-dong, 6-59 Dongtangongwon-ro 1-gil, Dongtan-gu, Hwaseong-si, Gyeonggi-do, Republic of KoreaPhone +82-10-9184-2385Email south-man@daum.netHosting Oracle Cloud (Chuncheon, Korea)