Escolar Documentos
Profissional Documentos
Cultura Documentos
Chris Christensen
Class notes
Caesar Ciphers
Cryptography
Suetonius, the gossip columnist of ancient Rome, says that [Julius] Caesar
[100? 44 B.C.] wrote to Cicero and other friends in a cipher in which the
plaintext letters were replaced by letters standing three place further down
the alphabet
Plaintext letters
Ciphertext letters
abcdefghijklmnopqrstuvwxyz
DEFGHIJKLMNOPQRSTUVWXYZABC
Translations
The mathematical transformation that shifts the alphabet is called a
translation. The shift to the right of three spaces can be symbolized as
C p b where C is ciphertext, p is plaintext, and b is the shift.
Plaintext
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ciphertext
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
1
2
3
4
5
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
A
B
C
D
E
Cryptanalysis
Frequency Analysis
Unfortunately, messages enciphered with Caesar ciphers can be easily
broken. Caesar ciphers usually fall to frequency analysis, and it is easy to
see why that happens.
First, notice that it is only necessary to determine one correspondence
between a plaintext and ciphertext letter to determine the key. So, a
reasonable first attempt would be to assume that the most frequent ciphertext
letter corresponds to plaintext e.
1
11
11
1111111
1
111
1111
1111111111111
111
11
1111
1111111
1111
111
11111111
1111111
111
11111111
111111
111111111
111
Example
Here is a message enciphered with a Caesar cipher:
VRRQSHRSOHEHJDQVOLGLQJWKHDOSKDEHWEBDPRXQ
WVGLIIHUHQWWKDQWKUHHWRGHWHUPLQHFLSKHUHTX
LYDOHQWV
1
111111
111
1
111
111111111111111
11
11
11111
111111
1111
11
11111111
11111
1111
1
1111
1111
111111111
11
1
Try to determine from the frequency analysis what shift was made. Then,
recover the plaintext.
Now scan the column for something that makes sense. Notice near the
bottom SOONP. This line corresponds to shifting the ciphertext alphabet to
the right 23 places. Recall that we determined above that the key to this
cipher is 3 ciphertext was obtained by shifting plaintext correspondence to
the right by 3 spaces. By shifting the ciphertext letters 23 more spaces to the
right, we have, in total, shifted the alphabet 26 spaces to the right we are
back to plaintext. So, the shift from plaintext to ciphertext plus the shift
from ciphertext back to plaintext must equal 26.
Shift
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
10
Now, to determine the key, search through the ciphertext for an enciphered
version of the. Because the beginning and ending of words and word length
is hidden by the five-letter blocks, when searching for an encrypted the, we
must check every three consecutive letters: FGWGWFWFMFMFMFRFRX
RXNXNSNSPSPTPTATAKAKNKNWNWXWXYXYBYBTBTWTWPWPJ
PJIJIFIFXFXFXFHFHWHWDWDUDUYUYTYTQTQTQTLTLNLNX
NXYXYBYBNBNYNYMMYMYMJ. The last of these is the encrypted with
an additive key of 5.
This technique of searching for an enciphered version of a word or phrase
that is expected in the message is called Einsing. It was commonly used
during World War II by the British codebreakers at Bletchley Park who
broke the German Enigma messages to the U-boats. The Enigma machine
had letters but no numbers on its keyboard; so, numbers were written out in
messages. It was common that the word Eins (one) would appear in a
message. The 3-rotor Enigma had 17,576 possible different settings. With a
lot of patience and knowing the 17,576 enciphered versions of Eins,
messages could be searched to find an enciphered version of Eins and
determine the key.
The word the when used as we have in this process is called a crib. Gordon
Welchman, one of the cryptologists at Bletchely Park writes:
Cryptologically speaking, however, one has a "crib" to a cipher text if
one can guess the clear text from which some specific portion of the
cipher text was obtained. As my analysis of the Enigma traffic began
to reveal certain routine characteristics in the preambles of individual
messages, I realized that, if we could somehow determine to whom
they were addressed, or by whom they were sent, we might be able to
guess a portion of the clear text either at the beginning of the end of
each of the messages, and so have cribs. [Welchman, Gordon, The Hut Six Story,
Baldwin, Cleobury Mortimer, 1997.]
11
Cribs
Cribs were described by Giovanni Battista Porta (1535 1615) in De
furtivis, 1563. Using a crib involves searching for a pattern of a probable
word. Consider the following ciphertext:
BTHUNRBONOKHYYNXHORHSBANOXWUJDHOIBEBOHPH
OBABYRJMHUHBMBTHPPBXHKSBKLBTBTJKJVJFYMYH
BAHUBWBFYOHVWUNKBNOCJUBONOPEHRKNJOJCKUJJ
EPPKBKNJOHMJCCWJFXBNOANYYHNOKSHPJYJTJONP
YBOMP
Assume that we have reason to suspect that the message includes the name
of the Japanese admiral Yamamoto. We search through the ciphertext for a
pattern of letters of the form _12123_3 (Y)amamo(t)o. Notice in the second
line BTBTJKJ. This is likely amamoto. So, a = B, m = T, o = J, t = K,
and y = L. (This has not been enciphered with a Caesar cipher.)
12
Exercises
1. Construct a plaintext-ciphertext correspondence for a Caesar cipher
having additive key 9.
2. Encipher the following message using a Caesar cipher with additive
key 9:
Formanyyears,NSAsecurityofficialsrated
homosexualitynearthetopofitslistofsecurity
problemstowatchfor.
6. Find a word (of more than one letter) and a Caesar cipher that
translates that word into another word.
13
14