The "System 97 Typewriter for European Characters" (九七式欧文印字機 kyūnana-shiki ōbun injiki) or "Type B Cipher Machine", codenamed Purple by the United States, was an encryption machine used by the Japanese Foreign Office from February 1939 to the end of World War II. It replaced the Type A Red machine encrypt the most sensitive diplomatic traffic. The Purple was an electromechanical device that used stepping-switches, rather than rotots as other contemporary devices. All messages were written in the 26-letter English alphabet, which was commonly used for telegraphy. Any Japanese text had to be transliterated or coded. The 26-letters were separated using a plug board into two groups, of six and twenty letters respectively. The letters in the sixes group were scrambled using a 6 × 25 substitution table, while letters in the twenties group were more thoroughly scrambled using three successive 20 × 25 substitution tables. The Japanese also used stepping-switches in other systems, codenamed Coral and Jade, that did not divide their alphabets. The sixes and twenties division was familiar to U.S. Army Signals Intelligence Service (SIS) cryptographers from their work on the Type A cipher, and it allowed them to make early progress on the sixes portion of messages. The twenties cipher proved much more difficult, but a breakthrough in September 1940 allowed the Army cryptographers to construct an analogous machine that duplicated the behavior of the Japanese machines, even though no one in the U.S. had any technical description of the originals. American forces referred to information gained from decryptions as Magic.
Development of Japanese cipher machines The Imperial Japanese Navy (IJN) did not fully cooperate with the Army in pre-war cipher machine development, and that lack of cooperation continued into World War II. The Navy believed the IJN's 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. The Ministry of Foreign Affairs was supplied Red and Purple by the Navy. No one in Japanese authority noticed the weak points in both machines.
Prototype of Red
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. The Japanese Navy had already 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 was selected to supervise 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 plugboard, and was used by the Japanese Navy and Ministry of Foreign Affairs at negotiations for the London Naval Treaty in 1930.
Red
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. A significant weak point was that it enciphered vowels (AEIOUY) and consonants separately, perhaps to reduce telegram costs. The Navy also used the 91-shiki injiki Kana-letter model at its bases and on its vessels.
Purple
In 1937, the Japanese completed the next generation "Type 97 Typewriter". The Ministry of Foreign Affairs machine was the "Type B Cipher Machine", codenamed Purple by United States cryptanalysts. The chief designer of Purple was Kazuo Tanabe. His engineers were Masaji Yamamoto and Eikichi Suzuki. Eikichi Suzuki suggested the use of a stepping switch instead of the more troublesome half-rotor switch. Clearly, the Purple machine was more secure than Red, 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 every nine days, whereas in Red they were permanently fixed as the Latin vowels AEIOUY. 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.
Design
The Type B Cipher Machine consisted of several components. As reconstructed by the US Army, there were electric typewriters at either end, similar to those used with the Type A Machine. The Type B was organized for encryption as follows:
An input typewriter An input plugboard that permutes the letters from the typewriter keyboard and separates them into a group of 6 letters and a group of 20 letters A stepping switch with 6 layers wired to select one out of 25 permutations of the letters in the sixes group Three stages of stepping switches (I, II, and III), connected in series. Each stage is effectively a 20 layer switch with 25 outputs on each layer. Each stage selects one out of 25 permutations of the letters in the twenties group. The Japanese used three 7-layer stepping switches geared together to build each stage (see photos). The U.S. SIS used four 6-layer switches per stage in their first analog machine. An output plug board that reverses the input permutation and sends the letters to the output typewriter for printing The output typewriter For decryption, the data flow is reversed. The keyboard on the second typewriter becomes the input and the twenties letters pass through the stepping switch stages in the opposite order.
… excerpt ends here. Continue reading the full article.





