Japanese naval codes
Japanese naval codes haunted the Pacific War from its first days to its last. Every cryptosystem the Imperial Japanese Navy deployed was eventually broken, and the consequences of those breaks shaped the outcome of the entire conflict. The shooting down of Admiral Isoroku Yamamoto in 1943 and the decisive American ambush at the Battle of Midway in 1942 were both made possible because Allied codebreakers had cracked the systems the Japanese believed unbreakable. How did they do it? And why, despite growing evidence that their secrets were being read, did Japan fail to recognize the danger until it was too late?
A black bag operation in 1923 set the stage for everything that followed. American agents obtained a copy of the Red Book code by going through the luggage of a Japanese naval attache. The codebook used two volumes: one containing the code itself, the other containing an additive cipher applied to messages before transmission, with the starting point hidden inside each transmitted message. After three years of painstaking work, Agnes Driscoll cracked the additive portion. The name "Red Book" came from an unglamorous source: the red covers on the binders used to hold the American photographs of the captured codebook. Driscoll's success with the Red Book code gave codebreakers a structural template they could carry forward. Knowledge of how the Red Book was built helped them crack the similarly constructed Blue Book code, extending the intelligence advantage through the years before the Pacific conflict began.
On the 1st of June 1939 the Imperial Japanese Navy introduced what would become the most consequential cryptosystem of the Pacific War. Known to Allied codebreakers as JN-25, it was the 25th Japanese Navy system they had identified. Early on, analysts classified it as a research project rather than a current decryption job, because the scale of the work was daunting: reconstructing thirty thousand code groups and piecing together thirty thousand random additives. The system produced five-numeral groups for transmission and layered encipherment on top of encipherment. John Tiltman, working with some help from Alan Turing at the Government Communications Security Bureau, had broken JN-25 by 1941. Tiltman noted a structural feature that became a key to the attack: every number in the codebook was divisible by three. He also devised a method for breaking the code, though he described it as slow, neither easy nor quick. By April 1942 analysts could read roughly one word in five of intercepted traffic, and traffic analysis was proving more immediately useful than decryption.
British, Australian, Dutch, and American cryptanalysts had been cooperating on JN-25 well before the attack on Pearl Harbor. The obstacle was not skill but raw material. Before the outbreak of naval warfare at the end of 1941, the Japanese Navy conducted most sensitive communications by courier or direct delivery, routes far more secure than radio broadcast. That left little intercepted traffic to work with. The most credible accounts agree that the version of JN-25 in use before December 1941 was no more than ten percent broken at the time of the attack, and that progress was primarily in stripping away its outermost layer of encipherment rather than reading the underlying code groups. JN-25 was significantly changed on the 1st of December 1940, producing what analysts called JN-25a, and again on the 4th of December 1941 just days before Pearl Harbor, producing JN-25b. The outbreak of combat operations transformed the cryptographic situation. Japanese naval traffic increased enormously at the end of 1941 and provided the depth, the sheer volume of intercepted messages, that analysts needed to mount a successful attack against both the current and subsequent versions of the code.
Commander Joseph Rochefort commanded Station HYPO at Pearl Harbor, officially the Navy Combat Intelligence Unit, also known as COM 14. The American effort was directed from Washington by the U.S. Navy's signals intelligence command, OP-20-G. Station CAST in the Philippines, jointly commanded by Lieutenants Rudolph Fabian and John Lietwiler, also known as COM 16, worked alongside HYPO and the British Far East Combined Bureau in Singapore. In 1942 the volume of Japanese traffic was simply too heavy for the understaffed Combat Intelligence Unit to decode every message. Analysts exploited a feature of Japanese military communication culture called cribs: common formalities repeated in message after message, such as the phrase "I have the honor to inform your excellency." A punched card tabulating machine manufactured by International Business Machines gave the effort a mechanical edge in processing the repetitive structure of the additive cipher. The new JN-25c codebook was introduced from the 28th of May 1942, deferred from planned introduction dates of the 1st of April and then the 1st of May; it carried details of the planned attacks on Midway and Port Moresby.
JN-20, an inter-island cipher separate from the main JN-25 system, played an unexpected role at a critical moment. Periodic changes to JN-25 would temporarily shut down American decryption, and during one such blackout JN-20 exploitation produced the message that the target designated "AF" was short of water. That single detail established that the main Japanese fleet was headed for Midway Island, not a different location as some American commanders believed, and it contributed to a decisive American victory there in 1942. JN-25d followed the Midway version. Introduced from the 1st of April 1943, its additive cipher had been changed, but large portions were recovered within two weeks. Those recovered portions revealed Yamamoto's travel plans and made possible Operation Vengeance, in which American aircraft shot down the admiral's plane over Bougainville.
In June 1942 the Chicago Tribune, run by isolationist Colonel Robert R. McCormick, published an article that came dangerously close to exposing the entire American codebreaking operation. The article implied that the United States had broken Japanese codes and knew in advance about the Japanese attack on Midway Island; it also published the dispositions of the Japanese invasion fleet. The source was Commander Morton T. Seligman, executive officer of the Lexington, who had shown a copy of Admiral Nimitz's executive order to reporter Stanley Johnston. The government initially sought prosecution under the Espionage Act of 1917, but the charges were dropped for two reasons: a desire not to draw further attention to the article, and a legal determination that the Espionage Act did not cover enemy secrets. A grand jury investigation brought no prosecution but generated additional publicity. Walter Winchell wrote that it had tossed security out of the window. In Britain, several officials believed their worst fears about American security had been confirmed. In early August a Royal Australian Navy intercept unit in Melbourne, known as FRUMEL, picked up Japanese messages sent on a superseded lower-grade code. The Japanese made changes to their codebooks and call-sign systems, but critically, they concluded that the Allies had worked out fleet details through traffic analysis or had obtained physical codebooks. They remained reluctant to believe anyone could have broken their codes, least of all a Westerner.
JN-39, the naval code used by merchant ships and commonly called the maru code, was broken in May 1940. Its compromise came through an audacious and clumsy act: on the 28th of May 1941, when the whale factory ship Nisshin Maru No. 2, a vessel built in 1937, visited San Francisco, U.S. Customs Service Agent George Muller and Commander R. P. McCullough of the U.S. Navy's 12th Naval District boarded her and seized her codebooks. Copies were made clumsily and the originals returned. The Japanese quickly realized JN-39 was compromised and replaced it with JN-40. That replacement code also fell. In September 1942 an error by a Japanese operator gave codebreakers John MacInnes and Brian Townend at the British Far East Combined Bureau in Kilindini the clues they needed. JN-40 turned out not to be a simple additive cipher like JN-25 but a fractionating transposition cipher built on a substitution table of one hundred groups of two figures each, followed by a columnar transposition. By November 1942 MacInnes and Townend could read all previous JN-40 traffic and break each new message as it arrived. Enemy shipping, including troop convoys, became trackable and therefore vulnerable. Within two weeks of cracking JN-40 the team at Kilindini also broke JN-152 and the previously impenetrable JN-167, both merchant-shipping ciphers, extending Allied visibility into Japanese maritime logistics across the Pacific.
Continue browsing
Common questions
What were Japanese naval codes and why were they important in World War II?
Japanese naval codes were the cryptosystems used by the Imperial Japanese Navy to protect its communications during World War II. Every code the IJN used was eventually broken by Allied codebreakers, enabling operations such as the American victory at the Battle of Midway in 1942 and the shooting down of Admiral Isoroku Yamamoto in 1943.
What was JN-25 and how was it broken?
JN-25 was the main, most secure communications code used by the Imperial Japanese Navy, introduced on the 1st of June 1939. It required reconstructing thirty thousand code groups and thirty thousand random additives. John Tiltman, with some assistance from Alan Turing at the Government Communications Security Bureau, had broken JN-25 by 1941; a key structural clue was that every number in the codebook was divisible by three.
How did Japanese naval codes contribute to the American victory at Midway?
Exploitation of JN-20, an inter-island cipher, produced the intercept that the target designated "AF" was short of water, confirming Midway Island as the main Japanese fleet objective. Separately, JN-25b, the version in use at the time, had been broken enough to reveal Japanese attack plans, allowing the U.S. Navy to prepare an ambush.
Who were the key codebreakers who worked on Japanese naval codes?
Agnes Driscoll broke the additive portion of the Red Book code after three years of work following its capture in 1923. John Tiltman, with help from Alan Turing, broke JN-25 by 1941. Commander Joseph Rochefort commanded Station HYPO at Pearl Harbor. John MacInnes and Brian Townend at the British FECB in Kilindini cracked JN-40 in late 1942.
What was the Chicago Tribune incident and how did it affect Japanese code security?
In June 1942 the Chicago Tribune published an article implying the United States had broken Japanese codes and knew in advance about the Midway attack. Commander Morton T. Seligman had shown Nimitz's executive order to reporter Stanley Johnston. Despite the exposure, the Japanese concluded the Allies had used traffic analysis or captured codebooks rather than broken the codes, so they did not overhaul their cryptographic systems.
How was the JN-39 merchant shipping code compromised?
On the 28th of May 1941 U.S. Customs Service Agent George Muller and Commander R. P. McCullough boarded the Japanese whale factory ship Nisshin Maru No. 2 in San Francisco and seized her codebooks. Copies were made and the originals returned, but the operation was clumsy enough that the Japanese quickly realized JN-39 was compromised and replaced it with JN-40.
All sources
10 references cited across the entry
- 2BookMilitary Communications: From Ancient Times to the 21st CenturyChristopher H. Sterling — ABC-CLIO — 2007
- 5Early Japanese SystemsNSA Center for Cryptologic History
- 6BookCode GirlsLiza Mundy — Hachette Books — 2017
- 7BookCarnage and Culture: Landmark Battles in the Rise to Western PowerVictor Davis Hanson — Knopf Doubleday Publishing Group — 18 December 2007
- 8BookCountdown to Pearl Harbor: The Twelve Days to the AttackSteve Twomey — Simon & Schuster — 2016
- 9NewsObituary: Brian TownendMarch 2, 2005
- 10Has the 'New York Times' Violated the Espionage Act?Gabriel Schoenfeld — March 2006