On March 13, 1942, U.S. cryptanalysts wedged the first cracks into Japan’s JN-25 code system. As we well know, this bright spot falls into that dark, 6-month period for the U.S. armed forces between the disaster at Pearl Harbor and its first victory at Midway.
The advent of radio had really transformed radio communications for the world’s navies, allowing messages to be sent instantly over long distances. Unfortunately, anyone with a receiver and the proper frequency could hear the message, and if one knew the language, well…secrets didn’t stay secrets very long. So out came the codes, and they increased in complexity rapidly as each previous version was cracked by the enemy.
During World War II, Japan used numerous different coding systems. There was one for the army, a Flag Officers Code (that the U.S. never cracked), and numerous others. But JN-25 (as it was called by the U.S.) was the biggie, as it was used by the Japanese Navy…hence the “JN”.
This system consisted of a codebook with nearly 30,000 entries. On top of that book was a “superenciphering” 300-page additive book, with each page containing 100 random five-digit sequences. This created a sort of two-tiered encryption, which proved to be a tough nut to crack, indeed…even with the use of a very rudimentary computer (the IBM ECM Mark III).
But U.S. cryptanalysts were aided in their jobs by the Japanese themselves. First, the five-digit sequences in the additive book were not used just once, but repeatedly, which gave codebreakers a hook on which to grab. Second, Japanese command formality meant that phrases like “I have the honor to inform your Excellency” were used many times, as were nicknames for various commanders. This repetition is anathema to encryption, because repeated patterns are the first things for which codebreakers look, and even using a different five-digit superencryption key couldn’t hide those pattern phrases for very long.
So rather that having to decipher a massive code system, it really became an exercise in collecting enough Japanese messages and putting enough smart people to work finding those repeated patterns. Add in two parts patience and two parts persistence, and stir until enough of JN-25 was cracked to begin reading messages.
Within a month, the U.S. Navy had enough information to try a little test. “Island AF” kept coming up in messages and the Navy suspected it was a reference to Midway. So they told the guys on Midway to transmit that they were low on water. Sure enough, a coded Japanese message was intercepted days later reporting Island AF low on water.
Game over. Check and mate.
The Japanese knew their systems could be hacked, so they changed them periodically. But their initial arrogance (caused by their incredible successes) meant they didn’t change them as much as they should have. And they never really altered the basic structure of their messaging. So U.S. codebreakers would simply look for the phrases and nicknames, which largely gave them “the key to the candy store.