Type B Cipher Machine

This article is about a World War II era cipher used by the Japanese Foreign Office for diplomatic communications.. For other World War II era diplomatic ciphers, see Japanese army and diplomatic codes.

The codename "Purple" referred to binders used by US cryptanalysts for material produced by various systems; it replaced the Red machine used by the Japanese Foreign Office. The Japanese also used Coral and JADE stepping-switch systems. American forces referred to information gained from decryptions as Magic.

The Imperial Japanese Navy did not cooperate with the Army in pre-war cipher machine development, and that lack of cooperation continued into World War II. The Navy believed the Purple machine was sufficiently difficult to break that it did not attempt to revise it to improve security. This seems to have been on the advice of a mathematician, Teiji Takagi, who lacked a background in cryptanalysis.[citation needed] The Ministry of Foreign Affairs was supplied Red and Purple by the Navy. No one in Japanese authority noticed weak points in both machines.

Just before the end of the war, the Army warned the Navy of a weak point of Purple, but the Navy failed to act on this advice.

The Army developed their own cipher machines on the same principle as Enigma -- 92-shiki injiki, 97-shiki injiki and 1-shiki 1-go injiki -- from 1932 to 1941. The Army judged that these machines had lower security than the Navy's Purple design, so the Army's two cipher machines were less used.

Japanese diplomatic communications at negotiations for the Washington Naval Treaty were broken by the American Black Chamber in 1922, and when this became publicly known, there was considerable pressure to improve their security. In any case, the Japanese Navy had planned to develop their first cipher machine for the following London Naval Treaty. Japanese Navy Captain Risaburo Ito, of Section 10 (cipher & code) of the Japanese Navy General Staff Office, supervised the work.

The development of the machine was the responsibility of the Japanese Navy Institute of Technology, Electric Research Department, Section 6. In 1928, the chief designer Kazuo Tanabe and Navy Commander Genichiro Kakimoto developed a prototype of Red, "Roman-typewriter cipher machine".

The prototype used the same principle as the Kryha cipher machine, having a plug-board, and was used by the Japanese Navy and Ministry of Foreign Affairs at negotiations for the London Naval Treaty in 1930.

The prototype machine was finally completed as "Type 91 Typewriter" in 1931. The year 1931 was year 2591 in the Japanese Imperial calendar. Thus it was prefixed "91-shiki" from the year it was developed.

The 91-shiki injiki Roman-letter model was also used by the Ministry of Foreign Affairs as "Type A Cipher Machine", codenamed "Red" by United States cryptanalysts.

The Red machine was unreliable unless the contacts in its half-rotor switch were cleaned every day. It enciphered vowels (AEIOUY) and consonants separately, perhaps to reduce telegram costs, and this was a significant weak point. The Navy also used the 91-shiki injikiKana-letter model at its bases and on its vessels.

Clearly, the Purple machine was more secure than Blue, but the Navy did not recognize that Red had already been broken. The Purple machine inherited a weakness from the Red machine that six letters of the alphabet were encrypted separately. It differed from RED in that the group of letters was changed and announced every nine days, whereas in RED they were permanently fixed as the Latin vowels 'a', 'e', 'i', 'o', 'u' and 'y'. Thus US Army SIS was able to break the cipher used for the six letters before it was able to break the one used for the 20 others.

An equivalent analog to the Purple machine reconstructed by the US Signals Intelligence Service. A hand-operated Red analog is also visible

In operation, the enciphering machine accepted typewritten input (in the Latin alphabet) and produced ciphertext output, and vice versa when deciphering messages. The result was a potentially excellent cryptosystem. In fact, operational errors, chiefly in key choice, made the system less secure than it could have been; in that way, the Purple code shared the fate of the German Enigma machine. The cipher was broken by a team from the US Army Signals Intelligence Service, then directed by William Friedman in 1940.[2][3] Reconstruction of the Purple machine was based on ideas of Larry Clark. Advances into the understanding of Purple keying procedures were made by Lt Francis A. Raven, USN. Raven discovered that the Japanese had divided the month into three 10-days periods, and, within each period, they used the keys of the first day, with small predictable changes.

The Japanese believed it to be unbreakable throughout the war, and even for some time after the war, even though they had been informed otherwise by the Germans. In April 1941, Hans Thomsen, a diplomat at the German embassy in Washington, D.C., sent a message to Joachim von Ribbentrop, the German foreign minister, informing him that "an absolutely reliable source" had told Thomsen that the Americans had broken the Japanese diplomatic cipher (that is, Purple). That source apparently was Konstantin Umansky, the Soviet ambassador to the US, who had deduced the leak based upon communications from U.S. Undersecretary of State Sumner Welles. The message was duly forwarded to the Japanese; but use of the code continued.[4][5]

The United States obtained portions of a Purple machine from the Japanese Embassy in Germany following Germany's defeat in 1945 (see image above) and discovered that the Japanese had used precisely the same "stepping switch" in its construction that Leo Rosen of SIS had chosen when building a "duplicate" (or Purple analog machine) in Washington in 1939 and 1940. The "stepping switch" was a uniselector; a standard component used in large quantities in automatic telephone exchanges in countries like America, Britain, Canada, Germany and Japan, with extensive dial-telephone systems. Note however that this was not a two-motion or Strowger switch as sometimes claimed: twenty-five Strolger-type (sic) stepper switches ... :[6]

Apparently, all other Purple machines at Japanese embassies and consulates around the world (e.g. in Axis countries, Washington, London, Moscow, and in neutral countries) and in Japan itself, were destroyed and ground into particles[clarification needed] by the Japanese. American occupation troops in Japan in 1945−52 searched for any remaining units.[citation needed]

The Purple machine itself was first used by Japan in June 1938, but U.S. and British cryptanalysts had broken some of its messages well before the attack on Pearl Harbor. U.S. cryptanalysts decrypted and translated Japan's 14-part message to its Washington Embassy breaking off (ominously) negotiations with the United States at 1 p.m. Washington time on 7 December 1941, before the Japanese Embassy in Washington had done so. Decryption and typing difficulties at the Embassy, coupled with ignorance of the importance of it being on time, were major reasons the "Nomura note" was delivered late.

During World War II, the Japanese ambassador to Nazi Germany, General Hiroshi Oshima was well-informed on German military affairs. His reports went to Tokyo in Purple-enciphered radio messages. Examples include a comment that Hitler told him on June 3, 1941 that in every probability war with Russia cannot be avoided. In July and August 1942 he toured the Russian front, and in 1944 the Atlantic Wall fortifications against invasion along the coasts of France and Belgium, and on September 4 that Hitler told him that Germany would strike in the West, probably in November.[7] Since these messages were being read by the Allies, this provided valuable intelligence about German military preparations against the forthcoming invasion of Western Europe. He was described by General George Marshall as "our main basis of information regarding Hitler's intentions in Europe".[8]

The decrypted Purple traffic, and Japanese messages generally, was the subject of acrimonious hearings in Congress post-World War II in connection with an attempt to decide who, if anyone, had allowed the attack at Pearl Harbor to happen and who therefore should be blamed. It was during those hearings that the Japanese learned, for the first time, that the Purple cipher machine had indeed been broken.[citation needed] See the Pearl Harbor advance-knowledge conspiracy theory article for additional detail on the controversy and the investigations.

The Russians also succeeded in breaking into the Purple system in late 1941, and together with reports from Richard Sorge, learned that Japan was not going to attack the Soviet Union. Instead, its targets were southward, toward Southeast Asia and US and UK interests there. This allowed Stalin to move considerable forces from the Far East to Moscow in time to help stop the German push to Moscow in December.[9]

^Kahn, David (1996). The Codebreakers: The Comprehensive History of Secret Communication from Ancient Times to the Internet. Scribner.|access-date= requires |url= (help) Text from excerpt of first chapter on WNYC website Archived 25 January 2008 at the Wayback Machine

Big Machines, by Stephen J. Kelley (Aegean Park Press, Walnut Creek, 2001, ISBN0-89412-290-8) – Contains a lengthy, technically detailed description of the history of the creation of the PURPLE machine, along with its breaking by the US SIS, and an analysis of its cryptographic security and flaws

Budiansky, Stephen (2000). Battle of Wits: The complete story of Codebreaking in World War II. New York: Free Press. pp. 351–353. ISBN0-684-85932-7. - Appendix C: Cryptanalysis of the Purple Machine

Clark, Ronald W. "The Man Who Broke Purple: the Life of Colonel William F. Friedman, Who Deciphered the Japanese Code in World War II", September 1977, Little Brown & Co, ISBN0-316-14595-5.

The Story of Magic: Memoirs of an American Cryptologic Pioneer, by Frank B. Rowlett (Aegean Park Press, Laguna Hills, 1998, ISBN0-89412-273-8) – A first-hand memoir from a lead team member of the team which 'broke' both Red and Purple, it contains detailed descriptions of both 'breaks'