Now, we want to extend the affine cipher from Sect. 1.4.4 such that we can encry
ID: 3743131 • Letter: N
Question
Now, we want to extend the affine cipher from Sect. 1.4.4 such that we can encrypt and decrypt messages written with the full German alphabet. The German alphabet consists of the English one together with the three umlauts, A , O , U , and the (even stranger) “double s” character ß. We use the following mapping from letters to integers: A0 B1 C2 D3 G6 H7 I8 J9 M12 N13 O14 P15 S 18 T19 U20 V21 Y 24 Z25 A 26 O 27 E4 F5 K10 L11 Q16 R17 W22 X23 U 28 ß29
1. What are the encryption and decryption equations for the cipher?
2. How large is the key space of the affine cipher for this alphabet?
3. The following ciphertext was encrypted using the key (a = 17,b = 1). What is the corresponding plaintext? a u ß w ß
Explanation / Answer
1. encryption equation for the cipher is ( a*x + b ) mod 30. And decrypion equation will be a^-1 * ( x - b ) mod 30.
2. There are 30 ciphers so, there are 30 choices for b. And for satisfying the equation gcd(a, 30) = 1, there are 8 choices for a. Therefore, the key space will be 8 * 30 = 240.
3. Using a=17, b=1, them a ^ -1 will be 23 and the decryption equation will become 23 * (x - b) mod 30.
So, a u ß w ß will give values 5 17 14 3 14 which becomes F R O D O.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.