JN-25 (Japanese Naval Code)
A superenciphered codebook system whose partial break gave the US Navy warning before Midway.
Why This Matters
JN-25 was not a simple substitution cipher. It combined a large operational codebook with a changing additive mask layered on top of each five-digit group. Breaking it required reconstructing both layers while traffic was still flowing. The resulting intelligence shaped convoy defense, carrier deployments, and the Midway ambush that shifted the Pacific war.
From 1939 onward, the Imperial Japanese Navy used JN-25 variants for fleet operations. Messages were first converted into five-digit code groups from a shared codebook. Operators then added a second five-digit number from additive tables, digit by digit modulo 10, to conceal the underlying code group frequency.
US Navy cryptanalysts at Station HYPO (Pearl Harbor), OP-20-G (Washington), and British and Australian partner sites worked these intercepts continuously. They rarely had complete coverage, but even partial recovery of repeated logistics terms and operation markers provided high-value strategic warning.
- Encode operational words and phrases into five-digit code groups from a codebook.
- Take a five-digit additive from a separate key list.
- Add each digit modulo 10 to create transmitted ciphertext groups.
- Receiver subtracts the same additive list to recover code groups and decode the message.
The demo on this page is a pedagogical miniature: letter-level code groups with additive superencipherment. It preserves the key cryptanalytic idea: you must peel off additives before any codebook statistics become visible.
Analysts collected massive traffic samples, guessed recurrent administrative formulas, stripped probable additives, and built card indexes of candidate code-group meanings. The break was cumulative, never a single magic decode. Intelligence value came from trend visibility and timely partial reads.
HYPO suspected the target designator AF meant Midway. To confirm it, Midway sent an unciphered report about water shortages. Japanese traffic soon echoed that AF was short of water. This confirmed target identity and enabled US carrier positioning before the June battle.
| JN-25 Concept | Modern Parallel |
|---|---|
| Layered coding + additive masking | Protocol layering where metadata and payload are protected separately |
| Traffic-volume driven analysis | Modern traffic analysis and side-channel aggregation attacks |
| Operational mistakes reveal meaning | Security failures from process leaks, not only algorithm weakness |
| Partial decrypts still decisive | Actionable intelligence from incomplete but timely data |
| Hall | VII - Mechanical/Pacific |
| Designation | JN-25A/B/C variants |
| Security Model | Enciphered codebook |
| Core Unit | 5-digit groups |
| Analytic Hub | Station HYPO |
| Operational Impact | Midway, convoy prediction, fleet movement insight |