affine ciphers

advertisement
Math Topics
Affine (Linear) Ciphers
Name ____________________________
A spy might be able to decode an additive or multiplicative cipher fairly easily because if he/she can
figure out what type of cipher was used, there are really only 25 different keys possible for additive
ciphers and 11 for multiplicative ciphers. (In both, using a key of 1 doesn’t change the plaintext, so they
are not included here).
We can make it harder by combining additive and multiplicative cipher techniques. Then we would have
11*25 = 275 keys.
The combined additive and multiplicative cipher is called the affine, or linear, cipher.
Ciphertext = (k*plaintext + x)
where k = any of the possible multiplicative keys and x is any of the additive keys.
1. Let’s figure out the ciphertext for the affine cipher 5p+20. Complete the chart:
Plaintext
(p)
position
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
1
9
5p+20
25
65
150
Mod26
25
13
20
ciphertext
Y
M
T
16
2. Encipher a message using key 5p+20 here:
3.
Trade with a partner and decode your partner’s message here:
Q
R
S
T
U
V
W
X
Y
Z
26
4.
Now choose a different affine key and create its chart. Remember that in kp+b
K can only be one of those 11 numbers that don’t share factors with 26.
plaintext
A
position
1
B
C
D
E
F
G
H
I
J
K
9
L
M
N
O
P
Q
R
S
T
U
V
W
16
Mod26
ciphertext
5. Write a message in your new ciphertext:
6.
Trade with a partner and decipher your partner’s message using his/her key here:
7.
Tomorrow you will need a message at least one paragraph long to encipher using any of the
ciphers we’ve learned. Then you will trade with a partner and see if your partner can decipher
any of it WITHOUT knowing the key, but only using the cryptogram tips. You may want to pick
out/write your paragraph ahead of time.
X
Y
Z
26
Download