Introduction to Cryptology Handout

advertisement
Cryptology
code - a system of symbols used to represent assigned (often secret) meanings
encode - to convert a message into code
cipher - a method of transforming text in order to conceal its meaning
encipher - to convert a message into cipher
encrypt - to encode or encipher
plaintext - the original, readable message
ciphertext - an encrypted message
cryptology - the study of making and breaking codes and ciphers
cryptography - the study of making codes and ciphers
cryptanalyis - the study of breaking codes and ciphers
Note: In the following encryption methods, P stands for plaintext and C stands for ciphertext.
I. Simple numeric substitution
This encryption method substitutes a single number for each letter.
P
C
A
1
B
2
C
3
D
4
E
5
F
6
G
7
H
8
I
9
J
10
K
11
L
12
M
13
N
14
O
15
P
16
Q
17
R
18
S
19
T
20
U
21
V
22
W
23
X
24
Y
25
Activity: decode this secret message.
___
9
___ ___
1 13
___ ___ ___ ___ ___ ___
8
1 22 9 14 7
___
1
___ ___ ___ ___ ___
16 1 18 20 25
___ ___ ___ ___ ___ ___ ___ ___ ___ ___.
15 14 19 1 20 21 18 4 1 25
Copyright 2007. Number Theory and Cryptology for Middle Level Teachers. Developed by the Math in the Middle Institute Partnership,
University of Nebraska, Lincoln.
1
Z
26
II. Polybius square
This substitution cipher has its substitution scheme written out in a square using 2 numbers for each letter: the row
coordinate followed by the column coordinate.
1
A
F
L
Q
V
1
2
3
4
5
2
B
G
M
R
W
3
C
H
N
S
X
4
D
I/J
O
T
Y
5
E
K
P
U
Z
Activity: Encrypt the following message.
___
I
___ ___
a m
III.
___
a
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___.
m a
t
h e m a
t
i
c i a
n
Alphabetic shift substitution
Letters are substituted for other letters after a shift that “wraps around”.
Examples:
A. 3-shift (Caesar Cipher)
P
C
A
X
B
Y
C
Z
D
A
E
B
F
C
G
D
H
E
I
F
J
G
K
H
L
I
H
Q
I
P
J
O
K
N
L
M
M
J
N
K
O
L
P
M
Q
N
R
O
S
P
T
Q
U
R
V
S
W
T
X
U
Y
V
Z
W
P
I
Q
H
R
G
S
F
T
E
U
D
V
C
W
B
X
A
Y
Z
Z
Y
B. 2-shift with backwards alphabet
P
C
A
X
B
W
C
V
D
U
E
T
F
S
G
R
M
L
N
K
O
J
Activity: Encode the following message using the 3-shift Caesar Cipher.
___ ___ ___ ___
M a
t
h
IV.
___ ___
i
s
___ ___ ___
n o t
___ ___ ___ ___
j
u s t
___ ___ ___ ___ ___ ___ ___ !
n u m b e
r
s
Alphabetic substitution variations
codeword alphabets
A codeword such as secret might be used. Starting at the left, write the word secret, leaving out letters if they appear more
than once. Fill in the rest of the boxes with the rest of the alphabet, starting with A (or the first letter of the alphabet that
doesn’t appear in your codeword.)
P
C
A
S
B
E
C
C
D
R
E
T
F
A
G
B
H
D
I
F
J
G
K
H
L
I
M
J
N
K
O
L
P
M
Q
N
R
O
S
P
T
Q
U
U
V
V
W
W
X
X
Y
Y
Copyright 2007. Number Theory and Cryptology for Middle Level Teachers. Developed by the Math in the Middle Institute Partnership,
University of Nebraska, Lincoln.
2
Z
Z
polyalphabetic substitution
Use more than one codeword alphabet, possibly arranged according to another codeword. Here, our codeword alphabets
use the codeword secret, and are arranged by the codeword code. To encode the first letter of the plaintext, use the C
alphabet, to encode the second letter, use the O alphabet, for the third, use the D alphabet, for the fourth, use the E alphabet,
for the fifth, use the C alphabet, etc.
P
C
C
C
C
A
C
O
D
E
B
R
P
F
C
C
T
Q
G
R
D
A
U
H
T
E
B
V
I
A
F
D
W
J
B
G
F
X
K
D
H
G
Y
L
F
I
H
Z
M
G
J
I
S
N
H
K
J
E
O
I
L
K
C
P
J
M
L
R
Q
K
N
M
T
U
L
O
N
A
V
M
P
O
B
W
N
Q
P
D
X
O
R
Q
F
Y
P
S
U
G
Z
Q
T
V
H
S
U
U
W
I
E
V
V
X
J
C
W
W
Y
K
R
X
X
Z
L
T
Y
Y
S
M
A
Z
Z
E
N
B
S
Activity 1: Using the polyalphabetic substitution cipher above, decrypt the following message.
___ ___ ___ ___ ___ ___
A O U D B F
___ ___ ___ ___ ___
D F B O H
Activity 2:
a. Make your own polyalphabetic substitution cipher using a codeword of your choice to create the alphabets, and
any three-letter codeword by which to arrange the alphabets.
b. Encode a short message (10-20 characters).
c. Find a partner. Swap your encoded messages and tell your partner your two codewords. Decode your partner’s
message.
Your cipher:
P
C
C
C
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
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Your partner’s cipher
P
C
C
C
A
B
C
D
Copyright 2007. Number Theory and Cryptology for Middle Level Teachers. Developed by the Math in the Middle Institute Partnership,
University of Nebraska, Lincoln.
3
V.
Transposition ciphers
Letters are scrambled, not substituted for others. The word game “Jumble” in the newspaper is an example of this.
matrix transposition
This is a special type of transposition cipher. To encrypt, you write your message across, row by row and form your
encrypted message by writing the letters in the columns, starting on the left column. To decrypt, write the encoded
message column by column, and read across the rows.
Activity: Encrypt the message “I do not like green eggs and ham.”
Encrypted message:
___ ___ ___ ___ ___
___ ___ ___ ___ ___
___ ___ ___ ___ ___
___ ___ ___ ___ ___
___ ___ ___ ___ ___
Comment: The Spartan scytale is an example of a transposition cipher.
VI.
Questions
1.
2.
VII.
How many Caesar Ciphers (i.e. a cipher formed from an alphabetic shift to the right) are there?
How many different alphabetic substitutions are there?
Activity - Cryptoquotes
Cryptoquotes are encoded using an alphabetic substitution. Try your hand at the following cryptoquotes using a
cryptoquote cracker program found at http://cryptoclub.math.uic.edu Click on Ciphers and then on Frequency Analysis.
Then follow the instructions.
Helpful hints:


You may want to use the fact that the letters of the alphabet that occur with the highest frequency (in order) are: e,
t, a, o, . . . .. The cryptoquote cracker provides these frequencies for you.
The 6 encrypted quotes are written in files that can be accessed on the web. For ex., the 6 th quote can be found at
http://www.nebrwesleyan.edu/people/kpfabe/cryp6.txt The cryptoquotes in the files are written in lower case
letters without punctuation. You can copy and paste them into the cryptoquote cracker.
Copyright 2007. Number Theory and Cryptology for Middle Level Teachers. Developed by the Math in the Middle Institute Partnership,
University of Nebraska, Lincoln.
4
Encrypted quotes by famous people:
1. K lqns nyu K jbseqv. K mqq nyu K sqxqxwqs. K ub nyu
K gyuqsmvnyu. -Rbyjgrkgm
2. U miaiw wizuzc ciofcxcunm, gisxvzi U dxai lnvmj cdxc
cdumhz cdxc xwi gxj lnw oi jn mnc ciofc oi.
-Hinwhi Giwmxwj Zdxp
3. Oku jluo hewbc seh xualg oku jedwouh dw oku
hujhucuwoeodlw ls rdcdxau okdwzc, ewq seh xualg oku
fvcdidew dw okeo ls dwrdcdxau okdwzc.
-Aulwehql QeRdwid
4. Udhgdtj, dedhzrhwz ej iwdtrh, mirzfnwt aomrttaexw
orhtgwit; fhagwz kagv ag, tvw at gvw orgvwi ru gvw digt dhz
gvw riapah ru odibwxt. -Prjd
5. Ni ny zfgg ivri zrt ny yw ifttncgf, wt zf yvwlgm qfi iww
jwom wj ni. -Twcfti F. Gff
6. Mux lhpk jw e vhtjm hy ghnx mux bibhg jw mux xqx. Mux
ljzx ghtum qji yuhpx jp hm, mux ljzx hm fhgg ojpmzeom.
-Jghrxz Fxpkxgg Ujglxy, Sz
Copyright 2007. Number Theory and Cryptology for Middle Level Teachers. Developed by the Math in the Middle Institute Partnership,
University of Nebraska, Lincoln.
5
Download