Japanese Naval Code JN-25

David Morgan

© David Morgan 2011

A real-world secret-key substitution cipher

Japanese Naval Code JN-25
conceptual demonstration 

in ciphertext a Japanese word appears as a number
– a unique 5-decimal-digit number
– called a “code group” [of digits] 

this ciphertext code group is generated as
Σ two other code groups
– one assigned to the word (constant hard mapping, belonging to the word)
– the other corresponded to that word (variable, soft mapping)
© David Morgan 2011

1

mkheritage.uk/bpt/JapCDSCH1.First code group for a word    drawn from the “codebook” amounts to a dictionary entries are fixed English demo example code book: Code group Word 39318 95280 80514 72084 41712 64479 apples bananas eat I like you © David Morgan 2011 A codebook Japanese codebook from 1933 on display at Bletchley Park Museum http://www.co.html © David Morgan 2011 2 .

It catalyzed US entry into World War I soon after.” The numbers map to words in German. decoded. variously demo example additive book: 1 2 3 4 5 6 7 49356 70122 84213 69006 22242 92355 06150 … © David Morgan 2011 3 . and publicized. from Germany urging that Mexico go to war with the US.An example the Zimmerman note A message enciphered through a word-to-number codebook “dictionary. was intercepted.) © David Morgan 2011 Second code group for a word      drawn from within an “additive book” of code groups at a place determined by an “indicator” in the ciphertext added to the word’s own code group by no-carry addition “poly-additive” similar to poly-alphabetic – same word could be transformed by different additives. (The note.

from 5th: no-carry sums. ciphertext: Code book: 72084 80514 39318 69006 22242 92355 31080 02756 21663 transmitted: 4 31080 02756 21663 Code group Word 39318 apples 95280 bananas 80514 eat 72084 I 41712 like 64479 you Additive book: 1 2 3 4 5 6 7 49356 70122 84213 69006 22242 92355 06150 © David Morgan 2011 Variation of indicator (same message) Given cleartext: “I eat apples” Chosen indicator: 5 message as code groups: additive groups.Encoding a message Given cleartext: “I eat apples” Chosen indicator: 4 message as code groups: additive groups. ciphertext: Code book: 72084 80514 39318 22242 92355 06150 94226 72869 35468 transmitted: 5 94226 72869 35468 Code group Word 39318 apples 95280 bananas 80514 eat 72084 I 41712 like 64479 you Additive book: 1 2 3 4 5 6 7 49356 70122 84213 69006 22242 92355 06150 © David Morgan 2011 4 . from 4th: no-carry sums.

from 4th: no-carry sums. from 2nd: diffs.Variation of message (same indicator) Given cleartext: “You eat bananas” Chosen indicator: 4 message as code groups: additive groups. ciphertext: Code book: 64479 80514 95280 69006 22242 92355 23475 02756 87535 transmitted: 4 23475 02756 87535 Code group Word 39318 apples 95280 bananas 80514 eat 72084 I 41712 like 64479 you Additive book: 1 2 3 4 5 6 7 49356 70122 84213 69006 22242 92355 06150 © David Morgan 2011 Decoding a message Given ciphertext: “2 42106 25925 54286” Code book: indicator ciphertext as code groups: additive groups. cleartext codegroups: 42106 25925 54286 70122 84213 69006 72084 41712 95280 Code group Word 39318 apples 95280 bananas 80514 eat 72084 I 41712 like 64479 you “I like bananas” Additive book: 1 2 3 4 5 6 7 49356 70122 84213 69006 22242 92355 06150 © David Morgan 2011 5 .

additive additive = ciphertext .cleartext © David Morgan 2011 Additive Cipher Clear Text 1 ? 2 ? 34591 ? ? Cipher Clear Text 3 ? 4 ? 64727 ? ? 54286 ? ? 56297 ? ? 49510 ? ? Cipher Clear Text Cipher Clear Text Cipher Clear Text 5 ? 25925 ? ? 23475 ? ? 48682 ? ? 00178 ? ? 7 ? 51550 ? ? 94226 ? ? 42106 ? ? 6 ? 33067 ? ? 35468 ? ? 17422 ? ? © David Morgan 2011 6 .Starting with a ciphertext code group  the cleartext code group follows – if you know the additive code group  the additive code group follows – if you know the cleartext code group ciphertext = cleartext + additive therefore cleartext = ciphertext .

Additive 1 ? Cipher Clear Text 2 ? 34591 ? ? Cipher Clear Text 3 84213 4 ? 64727 ? ? 54286 ? ? 56297 72084 I 49510 ? ? Cipher Clear Text 5 ? 42106 ? ? Cipher Clear Text 25925 ? ? 23475 ? ? 48682 ? ? 00178 ? ? 7 ? 51550 ? ? 94226 ? ? Cipher Clear Text 6 ? 33067 ? ? 35468 ? ? 17422 ? ? © David Morgan 2011 Additive Cipher Clear Text 1 ? 2 ? 34591 ? ? Cipher Clear Text 3 84213 4 ? 64727 80514 eat 54286 ? ? 56297 72084 I 49510 ? ? Cipher Clear Text Cipher Clear Text Cipher Clear Text 5 ? 25925 41712 ? 23475 ? ? 48682 64479 ? 00178 ? ? 7 ? 51550 ? ? 94226 ? ? 42106 ? ? 6 ? 33067 ? ? 35468 ? ? 17422 ? ? © David Morgan 2011 7 .

html#m1  “The Flaw in the JN25 Series of Ciphers” http://findarticles. conveniently accessible indexes into additive book (e. W. Michael Smith. Breaking Japan's Secret Ciphers.net/ttcode_07. weather activity)  transmitting regularly (similar message from same station same time every day)  © David Morgan 2011 Info sources – JN-25    The Emporer's Codes. Naval Intelligence Operations in the Pacific During World War II.vectorsite.S. ones that fall at the beginning of a printed page) with high frequency  communicating independently known information (ship movements.Letting air needlessly out of the randomness balloon using a garble check (multiple of 3)  replacing one book but not the other  choosing certain.g. Arcade Publishing Double-Edged Secrets: U. Holmes Japanese JN-25 naval code http://www.J.com/p/articles/mi_qa3926/is_200410/ai_n9464435 © David Morgan 2011 8 . 2000..