In the history of cryptography, 91-shiki ohbun-injiki (九一式欧文印字機) ("System 91 Printing Machine") 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 "Purple" machine ("97-shiki ōbun inji-ki") 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.
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.) 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.