page_title: Type B Cipher Machine
section_title: Purple
hierarchical_section_title: Type B Cipher Machine / Development of Japanese cipher machines / Purple
caption_attribution_description: Side view of a fragment of a w:Type B Cipher Machine, known to the U.S. as Purple, on display at the United States National Security Agency's National Cryptologic Museum located in Ft. Meade, Maryland. It is the largest fragment known to have survived. The fragment contains three 7x25 stepping switches and implemented one stage of the "twenties" cipher. A similar mechanical design, with four 7x25 stepping switches, is seen in the JADE cipher File:JADE, Japanese Type-97 cipher machine captured in Saipan in June 1944 - National Cryptologic Museum - DSC07850.JPG
context_page_description: In the history of cryptography, the "System 97 Typewriter for European Characters" 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. The machine was an electromechanical device that used stepping-switches to encrypt the most sensitive diplomatic traffic. 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 X 25 substitution table, while letters in the twenties group were more thoroughly scrambled using three successive 20 X 25 substitution tables.
  The cipher codenamed "Purple" replaced the Type A Red machine previously used by the Japanese Foreign Office. The sixes and twenties division was familiar to U.S. Army Signals Intelligence Service cryptographers from their work on the Type A cipher and it allowed them to make early progress on the sixes portion of messages.
context_section_description: 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 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.
caption: Side view of recovered Type 97 fragment. The three stepping switches implemented one stage of the "twenties" cipher, with 25 permutations of 20 letters encoded by the mass of wires underneath.
exif: {"Image Make": "Panasonic", "Image Model": "DMC-FZ3", "Image Orientation": "Horizontal (normal)", "Image XResolution": "72", "Image YResolution": "72", "Image ResolutionUnit": "Pixels/Inch", "Image DateTime": "2007:12:28 14:23:49", "Image YCbCrPositioning": "Co-sited", "Image ExifOffset": "396", "Image PrintIM": "[80, 114, 105, 110, 116, 73, 77, 0, 48, 50, 53, 48, 0, 0, 14, 0, 1, 0, 22, 0, ... ]", "Thumbnail Compression": "JPEG (old-style)", "Thumbnail Orientation": "Horizontal (normal)", "Thumbnail XResolution": "72", "Thumbnail YResolution": "72", "Thumbnail ResolutionUnit": "Pixels/Inch", "Thumbnail JPEGInterchangeFormat": "6804", "Thumbnail JPEGInterchangeFormatLength": "9198", "Thumbnail YCbCrPositioning": "Co-sited", "EXIF ExposureTime": "1/60", "EXIF FNumber": "14/5", "EXIF ExposureProgram": "Program Normal", "EXIF ISOSpeedRatings": "100", "EXIF ExifVersion": "0220", "EXIF DateTimeOriginal": "2007:12:28 14:23:49", "EXIF DateTimeDigitized": "2007:12:28 14:23:49", "EXIF ComponentsConfiguration": "YCbCr", "EXIF CompressedBitsPerPixel": "4", "EXIF ExposureBiasValue": "0", "EXIF MaxApertureValue": "3", "EXIF MeteringMode": "Pattern", "EXIF LightSource": "Flash", "EXIF Flash": "Flash fired, auto mode, red-eye reduction mode", "EXIF FocalLength": "23/5", "EXIF FlashPixVersion": "0100", "EXIF ColorSpace": "sRGB", "EXIF ExifImageWidth": "2016", "EXIF ExifImageLength": "1512", "Interoperability InteroperabilityIndex": "R98", "Interoperability InteroperabilityVersion": "[48, 49, 48, 48]", "EXIF InteroperabilityOffset": "6652", "EXIF SensingMethod": "One-chip color area", "EXIF FileSource": "Digital Camera", "EXIF SceneType": "Directly Photographed", "EXIF CustomRendered": "Normal", "EXIF ExposureMode": "Auto Exposure", "EXIF WhiteBalance": "Auto", "EXIF DigitalZoomRatio": "0", "EXIF FocalLengthIn35mmFilm": "35", "EXIF SceneCaptureType": "Standard", "EXIF GainControl": "None", "EXIF Contrast": "Normal", "EXIF Saturation": "Normal", "EXIF Sharpness": "Normal"}