Due Saturday, June 15, 8:00 PM
A historical affine cipher is defined as follows:
1. Each letter of the message M, Mi, is encrypted separately to the corresponding letter of the ciphertext Ci
2. A letter Mi is first encoded to the corresponding number mi according the following encoding/decoding table.
3. The ciphertext letter code, ci, is obtained from the message letter code, mi, using the following equation
ci = k1 * mi + k0 mod 26
where k1 and k0 are the elements of the cipher key K=(k1, k0), 0<= k0, k1 <=25, gcd (k1, 26)=1..
4. The ciphertext letter Ci is obtained from the ciphertext letter code, ci, using the same encoding/decoding table which was used in step 2.
1. What is a total number of all possible keys in this cipher?
2. Decrypt the following message encrypted using the affine cipher with the key k1=11, k0=17. Ciphertext = “XFC”.
3. Break the affine cipher by computing the cipher key (k1, k0) based on the knowledge that the most frequent letter of the ciphertext is 'B', and the second most frequent letter of the ciphertext is 'U' (you must not use exhaustive key search).
Hint: An average frequency of letters in long English texts is given by the following frequency table.
Compute the bits number 32 and 33 at the output of the first round of the DES decryption, assuming that the ciphertext block is composed of all ones and the external key is composed of all ones.
Xa = 2001, Ka = 4567
Xb = CDEF, Kb = 6543
Xc = 8899, Kc = 23CB
Xd = 0002, Kd = 0000
Hint: Note that all values can be computed without using a calculator by applying the following formula:
ab mod (216+1) º ab mod 216 – ab div 216 (mod 216+1)
Given below are the internal keys used during the first full round of IDEA during encryption. What are the values of the corresponding internal keys used during decryption (these keys are computed based on the listed below internal keys and are used during the last round and the output transformation of the decryption):
Ka = 0008
Kb = ABBA
Kc = FEFE
Kd = 0000
Ke = 2345
Kf = 1111
Stallings, Problem 6.12