----------------------------------------------------------------- NAVY & MARINE CORPS WORLD WAR II COMMEMORATIVE COMMITTEE A service of Navy Chief of Information Office (703)695-3161/DSN 225-3161 ----------------------------------------------------------------- Cracking the Japanese Code: The American 'Magic' By Dr. Jeffrey Greenhut In retrospect, the outcome of World War II seems inevitable, but things looked far different during the dark days of early 1942. In Europe, although checked in their drive toward Moscow, German forces remained powerful and clearly committed to a new offensive against the Red Army. In Africa, Field Marshall Erwin Rommel moved seemingly at will over the desert, driving the British to distraction and defeat. In the Pacific, the United States and its Navy looked westward to Japan, determined on revenge for the attack on Pearl Harbor. Revenge the U.S. Navy might desire, but the instruments at hand to bring it about were pitifully few. Against Japanžs eight large carriers and 11 battleships, the Navy could place, at most, only the six carriers of the Pacific Fleet. Its battleships either rested on the bed of Pearl Harbor or were not yet repaired of the damage inflicted by the Japanese on Dec. 7, 1941. Japan also had a superior air fleet. The Japanese Zero outclassed all American carrier-borne fighters. Japanese torpedo bombers carried the famous "Long Lance" torpedo, far superior to the Americansž slower, shorter-range torpedoes, which often failed to explode even when they hit. But if the Japanese militarists seemed to hold all the aces, they remained unaware of one card held by the Americans, a card that would prove decisive. That card was the superior American intelligence effort. Intelligence comes from many sources, including people such as agents and prisoners of war; captured documents; imagery, which in World War II meant photographs; and enemy signals, in World War II, primarily radio. Signals intelligence, called "SIGINT," includes the exploitation of enemy signals through direction finding (locating the ship, aircraft or ground station where messages are transmitted and received), traffic analysis (deducing the significance behind where messages come from, where and how many places they go, the frequency of message traffic, etc.) and decryption of messages. In early 1942, the United States had no significant human sources, no captured documents and little captured material, and no way to use photographs against a moving fleet. Only signals intelligence promised any hope of providing a picture of Japanese intentions and capabilities. Navy intelligence efforts against the Japanese went by a variety of code names, one of which was "Magic." Technically, the code name Magic applied only to signals intelligence efforts directed against the Japanese diplomatic cipher produced by the machine referred to as "Purple." However, postwar discussions of the Navyžs code-breaking effort often use Magic to include all signals intelligence efforts directed against the Japanese Empire, and it is used in that fashion here. The Navyžs intelligence effort focused on Japan throughout World War II. If the Navyžs Pacific Fleet had been caught short at Pearl Harbor, the same cannot be said of the Navyžs signals intelligence capability. Ever since the United States acquired the Philippines in 1898, and the Japanese won a brilliant victory over the Imperial Russian Navy at Tsushima in 1905, the U.S. Navy knew that the only threat in the Pacific was Japan. It also knew that signals intelligence offered the best source of intelligence about the Japanese. Success in any signals intelligence undertaking depends on the intellect and dedication of trained people, and on a capable and tested system of intelligence gathering, analysis and distribution. Code breaking and deciphering, and the strategic and tactical benefits that came from those activities in World War II, did not happen because of a brilliant flash of insight, or even repeated flashes. The foundation that allowed Magic to succeed was laid well before Japanese pilots trained their weapons on the unsuspecting Pacific Fleet. The effort really began in 1921 when the Office of Naval Intelligence got a new director, Captain Andrew Long. Long significantly increased the number of intelligence personnel and language students at the American Embassy in Tokyo. Then, in 1924, Lieutenant Laurence Safford took over the Research Desk in ONIžs Code and Signal Section. Safford deserves much credit for the founding of the Navyžs system of communications intelligence. Among many efficient and foresighted steps he took, Safford organized a team of cryptanalysts to decode Japanese signals. The group members had one major problem: they had no Japanese signals on which to exercise their skills. To remedy this situation, the Navy established a radio surveillance unit on Guam in 1925. Other units followed across the Pacific. By the late 1930s, Japan had fallen into the hands of its militarists and allied itself with Nazi Germany and Fascist Italy. America could not remain oblivious to the increasing threat. As one means of fighting that threat, the Navy turned its attention to breaking the Japanese naval code. The Japanese naval code in use just prior to Pearl Harbor, called JN-25 (Japanese navy version 25) by the Americans, consisted of thousands of random letter groups that were enciphered prior to transmission. According to Magic expert and author Ronald Lewin, "A message would first be encoded by the Japanese: then, drawing on a stock of 100,000 five-digit members mixed at random (an ženciphering tablež), the clerk would convert into a ciphered text the already encoded message. Thus the Americans had to žstripž the cipher before the coded signal could be bared and broken." Nonetheless, American code breakers stationed at Pearl Harbor, led by Commander Joseph J. Rochefort, managed slowly, oh so slowly, to crack enough of the code to develop good intelligence. Additional intelligence came through the Japanese diplomatic cipher, which was cracked before the U.S. entered hostilities and broken consistently throughout the war. Japanese code makers, who invested a too great faith in their system, dealt with such possibilities by changing their codes periodically, and always before a major operation. This they did in December 1941, introducing JN-25b. This new naval code effectively blinded the Americans just prior to the attack on Pearl Harbor, with almost fatal results. As the bleak winter of 1941-1942 turned to spring, the situation in the Pacific did not improve. The carrier Lexington was sunk in the Battle of the Coral Sea and the carrier Saratoga damaged. The Japanese lost only one light carrier, and two fleet carriers were damaged. When the carrier Wasp had to be sent to the Atlantic, the lineup of naval power in the Pacific became six Japanese carriers to three American. Admiral Isoroku Yamamoto, the architect of Pearl Harbor, was well aware that this superiority would be short lived. He had spent several years in the United States and did not underestimate its productive capacity. Yamamoto knew he must strike quickly. If he could concentrate all six of his operational carriers against the American three, the outcome could not be doubted. Midway Island, 1,136 miles northwest of Pearl Harbor, would be the target. The attacking fleet would serve as bait to draw out the Americans, then finish off their fleet. Yamamotožs undoubtedly brilliant mind tended toward convoluted, overly complicated plans. At Midway, he divided his fleet into three task forces, each powerful in itself, but too far apart for mutual support. He moved his main carrier striking force of four carriers into a single formation. This meant that if one was discovered by the Americans, all were subject to attack. If the Americans remained ignorant of his plans and reacted as expected, his victory was assured. If, however, they learned of his far-flung forces, they could concentrate on the most dangerous and defeat them. This is what happened, thanks to abundant, quickly decoded and analyzed intelligence. At Pearl Harbor, Rochefort and his code breakers worked around the clock attacking JN-25b. Finally in April, the pieces came together. Although only portions of each Japanese message could be read, enough could be pieced together to give Admiral Chester W. Nimitz, the commander in chief of the Pacific Fleet, the plans and objective of the Japanese effort. With this information in hand, Nimitz could maximize the impact of his limited forces. On June 4, 1942, the U.S. fleet crushed the Japanese at the Battle of Midway (all four Japanese carriers from the main striking force went down) and changed the course of the Pacific war. Meanwhile, both the American and Japanese high commands were looking at the Solomon Islands, where their conflicting objectives would meet on the island of Guadalcanal. At this point, JN-25b was still a mystery, but direction finding, coupled with the ability to read lower-level codes and ciphers, gave the Navy a reasonably good picture of Japanese intentions. American Marines landed on Guadalcanal before the Japanese could fortify its beaches. Another island campaign in which signals intelligence played an important role was Tarawa, where signals intelligence provided precise information on the enemy order of battle and logistical status. The enormous Pacific expansion of the Japanese Empire in 1942 meant that Japan was dependent on the ability of its merchant fleet to resupply and reinforce its far-flung garrisons. Until 1943, American submarines failed to neutralize this fleet. Their failure was due to inexperienced commanders; faulty equipment, particularly torpedoes; and the inability to find Japanese merchantmen. Then everything came together. American submarine commanders learned their new trade, torpedoes were improved and Navy code breakers began to read the Japanese merchant ship code. Submarine commanders now got not only the number of ships in a given convoy, but often even their names, cargos and escorts, and the convoyžs exact position. The American submarine offensive left thousands of Japanese soldiers on bypassed islands, and oil stocks in the home islands were cut 90 percent. Japan, which had started the war with some 6 million tons of merchant shipping, lost 5 million of it during the war. That Magic and other forms of signals intelligence made a vast contribution to victory in the Pacific is beyond dispute. Yet some additional truths remain. All intelligence could provide was information. It took the courage and skill on the part of sailors and Marines, and the leadership of men like Admirals William F. Halsey, Chester W. Nimitz, Raymond A. Spruance, Frank Jack Fletcher and Richmond Kelly Turner, to win the battles and the naval war in the Pacific. Nonetheless, Magic provided an essential element of victory. Dr. Jeffrey Greenhut, a historian, is curator of the Wenger Museum in Washington, D.C. The museum collection consists of American naval intelligence materials. Principal Source Ronald Lewin, The American Magic: Codes, Ciphers and the Defeat of Japan. (New York: Farrar Straus Giroux, 1982), to which the reader is directed for a fuller discussion of the issue. ----------------------------------------------------------------- Navy & Marine Corps World War II Commemorative Committee Navy Office of Information (CHINFO) The Pentagon, Room 2E352 Washington, DC 20350-1200 -----------------------------------------------------------------