Cryptography Quiz #1 Solutions

advertisement
Cryptography Quiz #1 Solutions
1) (5 pts) Encrypt the word "BREAK" using the shift cipher with the key of 4.
f(B) = 1 + 4 = 5 = F
f(R) = 17 + 4 = 21 = V
f(E) = 4+ 4 = 8 = I
f(A) = 0 + 4 = E
f(K) = 10 + 4 = 13 = O
FVIEO
2) (5 pts) Write the Caesar shift as a function. (Namely, f(x) = x+3 %26. Hint: x is the
value of the plaintext character.)
3) (10 pts) The affine cipher written as a function takes on the form f(x) = (ax + b)%26.
List out the possible values of a.
1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25
4) (10 pts) Encrypt the word "ZEBRA" using the affine cipher with the encryption keys a
= 11, b = 8.
f(Z) = (11*25 + 8) % 26 = 283 % 26 = 23 = X
f(E) = (11*4 + 8) % 26 = 52 % 26 = 0 = A
f(B) = (11*1 + 8) % 26 = 19 % 26 = 19 = T
f(R) = (11*17 + 8) % 26 = 195 % 26 = 13 = N
f(A) = (11*0 + 8) % 26 = 8 % 26 = 8 = I
XATNI
5) (10 pts) In trying to break the affine cipher, you make a guess that the character 'Y' in
the ciphertext represents the plaintext character 'E' and the character 'R' in the ciphertext
represents the plaintext character 'T'. If you were trying to solve for the decryption keys a
and b, write down the two equations that would help you do so:
f-1(x) = (24a + b) = 4 %26
f-1(x) = (17a + b) = 19 %26
6) (5 pts) If you find that a = 135 in trying to break an affine cipher, what value does that
reduce to in the range from 0 to 25? 5
7) (5 pts) If you find that a = -83 in trying to break an affine cipher, what value does that
reduce to in the range from 0 to 25? 21
Download