, with hand-written calculations at the upper right which deduce the initial positions of the rotors and the stepping order from the message indicator The SIS learned in 1938 of the forthcoming introduction of a new diplomatic cipher from decoded messages. Type B messages began to appear in February 1939. The Type B had several weaknesses, some in its design, others in the way it was used. Frequency analysis could often make 6 of the 26 letters in the ciphertext alphabet letters stand out from the other 20 letters, which were more uniformly distributed. This suggested the Type B used a similar division of plaintext letters as used in the Type A. The weaker encryption used for the "sixes" was easier to analyze. The sixes cipher turned out to be
polyalphabetic with 25 fixed permuted alphabets, each used in succession. The only difference between messages with different indicators was the starting position in the list of alphabets. The SIS team recovered the 25 permutations by 10 April 1939. The frequency analysis was complicated by the presence of
romanized Japanese text and the introduction in early May of a Japanese version of the
Phillips Code. Knowing the plaintext of 6 out of 26 letters scattered throughout the message sometimes enabled parts of the rest of the message to be guessed, especially when the writing was highly stylized. Some diplomatic messages included the text of letters from the U.S. government to the Japanese government. The English text of such messages could usually be obtained. Some diplomatic stations did not have the Type B, especially early in its introduction, and sometimes the same message was sent in Type B and in the Type A Red cipher, which the SIS had broken. All these provided
cribs for attacking the twenties cipher.
William F. Friedman was assigned to lead the group of cryptographers attacking the B system in August 1939. A pair of other messages using indicator 59173 were decrypted by 27 September, coincidentally the date that the
Tripartite Agreement between Nazi Germany, Fascist Italy, and Imperial Japan was announced. There was still a lot of work to do to recover the meaning of the other 119 possible indicators. As of October 1940, one third of the indicator settings had been recovered. The Japanese believed Type B 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 and American cryptographers continued to read Japanese messages through the war.
American analogs The SIS built its first machine that could decrypt Purple messages in late 1940. A second Purple analog was built by the SIS for the US Navy. A third was sent to England in January 1941. That Purple analog was accompanied by a team of four American cryptologists (two Army, two Navy) who received information on British successes against German ciphers in exchange. This machine was subsequently sent to Singapore, and after Japanese moves south through Malaya, on to India. A fourth Purple analog was sent to the Philippines and a fifth was kept by the SIS. A sixth, originally intended for Hawaii, was also sent to England for use there. 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 beyond recognition by the Japanese. American occupation troops in Japan in 1945–52 searched for any remaining units. A complete Jade cipher machine, built on similar principles but without the sixes and twenties separation, was captured and is on display at NSA's
National Cryptologic Museum. ==Impact of Allied decryption==