CRYPTOLOGY
I. INTRODUCTION
A. Defining Terms
1. Cipher: substituting one letter for another
(a = p)
2. Code: substituting one word or symbol for another word
a. bomb = y
b. bomb = pool
3. Encrypt: to scramble a message using a code or cipher
4. Decrypt: to unscramble an encrypted message
5. Algorithm: the method by which encryption and decryption takes place
6. Key: specifies which algorithm, among many possible algorithms, is to be used
7. Ciphertext vs. plaintext: generally applies to the use of a cipher or a code
8. Cryptography: the science of encrypting a message using a cipher or a code
9. Cryptanalysis: the science of deducing plaintext from ciphertext without knowledge of the key
10. Cryptology: the science of secret writing in all forms
B. Relevance to Counterintelligence
1. Passive counterintelligence: allows the secure transference of sensitive information
2. Active counterintelligence: reveals the opposition's secrets
C. Outgoing vs. Incoming
D. Simplicity vs. Security
II. SIMPLE ENCRYPTION
A. Transposition: rearranging the letters in a message
1. Random
a. COW becomes: CWO, OCW, OWC, WCO, WOC
b. For example, consider this short sentence
35 letters can be arranged:
50,000,000,000,000,000,000,000,000,000,000
ways
2. Non-random
a. one possibility: rail fence transposition
For example consider this short sentence
F R X M L C N I E T I S O T E T N E
O E A P E O S D R H S H R S N E C
FRXMLCNIETISOTETNEOEAPEOSDRHSHRSNEC
b. another possibility: belt method
B. Substitution (of one letter for another)
1. Random
Randomly pair letters: a ® n; b ® u; c ® w
2. Non-random
a. Caesar cipher: replace one letter with a letter a fixed number of places farther down the alphabet
In a three-place shift: a ® d; b ® e; c ® f; y ® b; z ® c
b. Key word substitution: a key word or phrase is used to generate the first part of the substitution and the remaining letters follow in their normal order
For keyword internationalstudies = interaolsud
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 zciphertext: i n t e r a o l s u d f g h j k m p q v w x y z b c
3. Keys vs. algorithms
III. EARLY CRYPTANALYSIS
A. Preference for Keyword Substitution
B. Arab Cryptanalysts
IV. BREAKING SIMPLE CIPHERS: FREQUENCY ANALYSIS
A. English Language Letter Frequencies
Letter Percentage
Letter Percentagea 8.2 n 6.7
b 1.5 o 7.5
c 2.8 p 1.9
d 4.3 q 0.1
e 12.7 r 6.0
f 2.2 s 6.3
g 2.0 t 9.1
h 6.1 u 2.8
i 7.0 v 1.0
j 0.2 w 2.4
k 0.8 x 0.2
l 4.0 y 2.0
m 2.4 z 0.1
Exceptions/difficulties:
"Peter Piper picked a peck of pickled peppers."
George Perec, La Disparition, 200 pages without 'e'
English trans., A Void, also 200 pages without 'e'
B. Original Ciphertext
PCQ VMJYPD LBYK LYSO KBXBJXWXV BXV ZCJPO EYPD
KBXBJYUXJ LBJOO KCPK. CP LBO LBCMKXPV XPV IYJKL PYDBL
QBOP KBO BXV OPVOV LBO LXRO CI SX’XJMI, KBO JCKO XPV
EYKKOV LBO DJCMPV ZOICJO BYS, KXUYPD: ‘DIOXL EYPD, ICJ X
LBCMKXPV XPV CPO PYDBLK Y BXNO ZOOP JOACMPLYPD LC UCM
LBO IXZROK CI FXKL XDOK XPV LBO RODOPVK CI XPAYOPL EYPDK.
SXU Y SXEO KC ZCRV XK LC AJXNO X IXNCMJ CI UCMJ SXGOKLU?’
OFYRCDMO, LXROK IJCS LBO LBCMKXPV XPV COP PYDBLK
C. Frequency Analysis of the Ciphertext
Letter Frequency
Letter Frequencya 0.9 n 0.9
b 7.4 o 11.2
c 8.0 p 9.2
d 4.1 q 0.6
e 1.5 r 1.8
f 0.6 s 2.1
g 0.3 t 0.0
h 0.0 u 1.8
i 3.3 v 5.3
j 5.3 w 0.3
k 7.7 x 10.1
l 7.4 y 5.6
m 3.3 z 1.5
D. Identify Key Letters Based on Frequency
O = e, t,
E. Identify Specific Categories (vowels & consonants) of Key Letters Based on Frequency and Usage
|
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 |
||
|
O |
1 |
9 |
0 |
3 |
1 |
1 |
1 |
0 |
1 |
4 |
6 |
0 |
1 |
2 |
2 |
8 |
0 |
4 |
1 |
0 |
0 |
3 |
0 |
1 |
1 |
2 |
|
|
X |
0 |
7 |
0 |
1 |
1 |
1 |
1 |
0 |
2 |
4 |
6 |
3 |
0 |
3 |
1 |
9 |
0 |
2 |
4 |
0 |
3 |
3 |
2 |
0 |
0 |
1 |
|
|
P |
1 |
0 |
5 |
6 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
2 |
2 |
0 |
8 |
0 |
0 |
0 |
0 |
0 |
0 |
11 |
0 |
9 |
9 |
0 |
F. Identify the Key Letters
O = e X = a
Y = I
|
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 |
||
|
Before OoeO |
0 |
9 |
0 |
2 |
1 |
0 |
1 |
0 |
0 |
4 |
2 |
0 |
1 |
2 |
2 |
3 |
0 |
4 |
1 |
0 |
0 |
1 |
0 |
0 |
1 |
2 |
O |
|
after |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
0 |
4 |
0 |
0 |
0 |
2 |
5 |
0 |
0 |
0 |
0 |
0 |
2 |
0 |
1 |
0 |
0 |
O |
B = h
To review:
O = e, X = a, Y = I, B = h
G. Reconstruct the Ciphertext using the New Discoveries
PCQ VMJiPD LhiK LiSe KhahJaWaV haV ZCJPe EiPD
KhahJiUaJ LhJee KCPK. CP Lhe LhCMKaPV aPV IiJKL PiDhL
QheP Khe haV ePVeV Lhe LaRe CI Sa’aJMI, Khe JCKe aPV
EiKKeV Lje DJCMPV ZelCJe hiS, KaUiPD: ‘DjeaL EiPD, ICJ a
LhCMKaPV aPV Cpe PiDhLK i haNe ZeeP JeACMPLiPD LC UCM
Lhe laZReK CI FaKL aDeK aPV Lhe ReDePVK CI aPAiePL EiPDK.
SaU i SaEe KC ZCRV aK LC AjaNe a IaNCMJ CI UCMJ SaGeKLU?’
eFiRCDMe, LaReK IJCS Lhe LhCMKaPV aPV Cpe PiDhLK
H. Evaluate the Reconstructed Text for New Patters
L = t P = n V = d
I. Reconstruct the Text Again Using the Additional Discoveries
nCQ dMJinD thiK tiSe KhahJaWad had ZCJne EinD
KhahJiUaJ thJee KCnK. Cn the thCMKand and liJKt niDht,
Qhen Khe had ended the taRe CI Sa’aJMI, Khe JCKe and
EiKKed the DJCMnd ZelCJe hiS, KaUinD: ‘Djeat EinD, ICJ a
ThCMKand and Cne niDhtK i haNe Zeen JeACMntinD tC UCM
The laZReK CI FaKt aDek and the ReDendK CI anAient EinDK.
SaU i SaEe KC ZCRd aK tC AjaNe a laNCMJ CI UCMJ SaGektU?’
EFiRCDMe, taReK IJCS the thCMKand and Cne niDhtK
J. Evaluate the Reconstructed Text for Additional Patterns
C = o
K = s
ThoMsand and one niDhts
M = u I = f D = g R = I S = m
K. Attempt to Discern the Key to the Algorithm
Plain:
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 zCipher:
X - - V O I D B Y - - R S P C - - J K L M - - - - -
Plain:
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 zCipher:
X Z A V O I D B Y G E R S P C F H J K L M N Q T U W
Now during this time Shahrazad had borne King
Shahriyar three sons. On the thousand and first night,
When she had ended the tale of Ma’aruf, she rose and
Kissed the ground before him, saying: ‘Great King, for a
thousand and one nights I have been recounting to you
the fables of past ages and the legends of ancient kings.
May I make so bold as to crave a favour of your majesty?’
Epilogue, Tales from the Thousand and One Nights
V. COMPLEX CIPHERS
A. Early Responses
B. Polyalphabetic Ciphers
1. Definition: A polyalphabetic cipher alternates among several alphabets according to some pre-arranged pattern.
2. Vigenere Cipher or Vigenere Square
|
|
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 |
|
1 |
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 |
a |
|
2 |
c |
d |
e |
f |
g |
h |
I |
j |
k |
l |
m |
n |
o |
p |
q |
r |
S |
t |
u |
v |
w |
x |
y |
z |
a |
b |
|
3 |
d |
e |
f |
g |
h |
i |
J |
k |
l |
m |
n |
o |
p |
q |
r |
s |
T |
u |
v |
w |
x |
y |
z |
a |
b |
C |
|
4 |
e |
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 |
|
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 |
|
6 |
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 |
f |
|
7 |
h |
i |
j |
k |
l |
m |
n |
o |
p |
q |
r |
s |
t |
u |
v |
w |
X |
y |
z |
a |
b |
c |
d |
e |
f |
g |
|
8 |
i |
j |
k |
l |
m |
n |
o |
p |
q |
r |
s |
t |
u |
v |
w |
x |
Y |
z |
a |
b |
c |
d |
e |
f |
g |
h |
|
9 |
j |
k |
l |
m |
n |
o |
p |
q |
r |
s |
t |
u |
v |
w |
x |
y |
Z |
a |
b |
c |
d |
e |
f |
g |
h |
i |
|
10 |
||||||||||||||||||||||||||
|
11 |
||||||||||||||||||||||||||
|
12 |
||||||||||||||||||||||||||
|
13 |
||||||||||||||||||||||||||
|
14 |
||||||||||||||||||||||||||
|
15 |
||||||||||||||||||||||||||
|
16 |
||||||||||||||||||||||||||
|
17 |
||||||||||||||||||||||||||
|
18 |
||||||||||||||||||||||||||
|
19 |
||||||||||||||||||||||||||
|
20 |
||||||||||||||||||||||||||
|
21 |
||||||||||||||||||||||||||
|
22 |
||||||||||||||||||||||||||
|
23 |
||||||||||||||||||||||||||
|
24 |
||||||||||||||||||||||||||
|
25 |
||||||||||||||||||||||||||
|
26 |
3. Breaking polyalphabetic ciphers
Charles Babbage
VI. THE MECHANIZATION OF CIPHERS
A. Introduction
B. Enigma
Arthur Scherbius, 1918
www.attlabs.att.co.uk/andyc/enigma/about_enigma.html
C. Using Computers
Extra credit question (for 5 points):
This is a key word substitution cipher. The key word is "secret intelligence and public policy." There is a one-place forward shift in the cipher.
MNXHLFHNRUXPRBTHNREJZZRUHCEL?