You are on page 1of 8

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

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.mkheritage.co.uk/bpt/JapCDSCH1.html
David Morgan 2011

An example
the Zimmerman note
A message enciphered through
a word-to-number codebook
dictionary. The numbers map
to words in German.

(The note, from Germany urging


that Mexico go to war with the US,
was intercepted, decoded, and publicized.
It catalyzed US entry into World War I
soon after.)

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 words own code group
by no-carry addition
poly-additive similar to poly-alphabetic
same word could be transformed by different additives, variously

demo example additive book:


1

49356 70122 84213 69006 22242 92355 06150


David Morgan 2011

Encoding a message
Given cleartext: I eat apples
Chosen indicator: 4
message as code groups:
additive groups, from 4th:
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

41712

like

64479

you

Additive book:
1

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, from 5th:
no-carry sums; 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

41712

like

64479

you

Additive book:
1

49356 70122 84213 69006 22242 92355 06150


David Morgan 2011

Variation of message (same indicator)


Given cleartext: You eat bananas
Chosen indicator: 4
message as code groups:
additive groups, from 4th:
no-carry sums; 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

41712

like

64479

you

Additive book:
1

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, from 2nd:
diffs; cleartext codegroups:

42106 25925 54286


70122 84213 69006
72084 41712 95280

Code
group

Word

39318

apples

95280

bananas

80514

eat

72084

41712

like

64479

you

I like bananas
Additive book:
1

49356 70122 84213 69006 22242 92355 06150


David Morgan 2011

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


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

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

Letting air needlessly out of


the randomness balloon
using a garble check (multiple of 3)
 replacing one book but not the other
 choosing certain, conveniently accessible
indexes into additive book (e.g., ones that fall
at the beginning of a printed page) with high
frequency
 communicating independently known
information (ship movements, weather
activity)
 transmitting regularly (similar message from
same station same time every day)


David Morgan 2011

Info sources JN-25





The Emporer's Codes, Breaking Japan's Secret


Ciphers, Michael Smith, 2000, Arcade Publishing
Double-Edged Secrets: U.S. Naval Intelligence
Operations in the Pacific During World War II, W.J.
Holmes
Japanese JN-25 naval code
http://www.vectorsite.net/ttcode_07.html#m1

The Flaw in the JN25 Series of Ciphers


http://findarticles.com/p/articles/mi_qa3926/is_200410/ai_n9464435

David Morgan 2011

You might also like