Type A Cipher Machine
# Type A Cipher Machine

In the history of cryptography, 91-shiki ōbun injiki (九一式欧文印字機, "System 91 Typewriter for European Characters") or Angōki Taipu-A (暗号機 タイプA, "Type A Cipher Machine"), codenamed Red by the United States, was a diplomatic cryptographic machine used by the Japanese Foreign Office before and during World War II. A relatively simple device, it was quickly broken by western cryptographers. The Red cipher was succeeded by the Type B "Purple" machine (九七式印字機, 97-shiki ōbun injiki, "System 97 Typewriter for European Characters") which used some of the same principles. Parallel usage of the two systems assisted in the breaking of the Purple system.

The Red cipher should not be confused with the Red naval code, which was used by the Imperial Japanese Navy between the wars. The latter was a codebook system, not a cipher.

## Operation

The Red machine encrypted and decrypted texts written in Latin characters (alphabetic only) for transmission through the cable services. These services charged a lower rate for texts that could be pronounced than for random strings of characters; therefore the machine produced telegraph code by enciphering the vowels separately from the consonants, so that the text remained a series of syllables. (The letter "Y" was treated as a vowel.) Per International Telegraph Union regulations at the time, pronounceable words in telegrams were charged a lower rate than unpronounceable code $groups.^{:842–849}$ The "sixes and twenties" effect (as American analysts referred to it) was a major weakness which the Japanese continued in the Purple system.

Encryption itself was provided through a single half-rotor; input contacts were through slip rings, each of which connected to a single output contact on the rotor. Since both the vowels and consonants were passed through the same rotor, it had sixty contacts (the least common multiple of six and twenty); wiring ensured that the two groups were kept separate. The slip rings were connected to the input keyboard through a plugboard; again this was organized to keep the vowels and consonants separate.

The rotor turned at least one step after each letter. The amount of rotation was controlled by the break wheel, which was connected to the rotor, and which had up to forty-seven pins in it. Up to eleven of these pins (in a predetermined set of positions) were removable; in practice, from four to six pins were removed. Rotation of the wheel stopped when the next pin was reached; therefore, if the next pin were removed, the rotor would advance two places instead of one. The irregular pattern of rotation produced an Alberti cipher.

## History

The vulnerability of Japanese code systems was made public in 1931 when Herbert Yardley published The American Black Chamber, a popular account of his code breaking activities for the US government in which he discussed the breaking of Japanese codes and their use during the Washington Naval Conference. These revelations prompted Japanese to look into machine ciphers.

The system was introduced in 1930-1931 (the 91 in the designation refers to the Japanese imperial year 2591), using a reverse-engineered version of a machine supplied by the firm of Boris Hagelin. Hagelin's most sophisticated systems were rotor machines similar to those used in World War II, but as he did not trust the Japanese to honor his patents, he sent a more primitive device designed by Arvid Damm instead. It was this machine which the Japanese used as the basis for their design; the separate encryption of the vowels, however, was strictly a Japanese contribution.

The code was broken successfully by three independently working groups. The British solution came first, with Hugh Foss and Oliver Strachey working out the code in 1934, and Harold Kenworthy's shop producing a replica, the "J machine", a year later. American attempts to break the system waited until 1935. In the Army SIS group, the system was broken by Frank Rowlett and Solomon Kullback; for the navy, Agnes Driscoll is generally credited. (She actually solved the Orange (or M-1) cipher used by naval attaches, but as it turned out the two systems were essentially the same.) The Americans also constructed a replica machine to expedite solutions; this machine had two half-rotors to solve the vowels and consonants separately. The SIS group originally referred to it simply as the "Japanese code machine", but decided that so descriptive a term was a security risk; as it was the first Japanese machine cipher solved, they decided to start at the beginning of the spectrum, and named it "RED".

The PURPLE machine began to replace the RED system in 1938, but initial installations were at major posts; less important embassies and consulates continued to use the old system. This was one of many deficiencies in Japanese use of encryption that helped make the PURPLE system vulnerable to cracking, for now there was some identical traffic on both systems, which allowed cribbing. A far more serious deficiency was that the PURPLE machine maintained the "sixes/twenties" division, even though the RED machines had since been modified to allow any six letters to be used for the vowel encryption. After eighteen months of work, the PURPLE device was cracked, and produced important intelligence up to the end of the war.

Intelligence results of RED intercepts were not as dramatic, but important intelligence was obtained. For instance, American cryptanalysts were able to provide details of the Tripartite Pact between the Axis powers. Reports of the sea trials of the battleship Nagato were also decoded, leading to important changes to the USS North Carolina (BB-55), then being designed, in order to match the performance of the Japanese ship.

