Understanding Cryptography by Christof Paar and Jan Pelzl - Chapter 1 Solutions - Ex1.12- 2 mins
- Return to index
- Exercise 1.1
- Exercise 1.2
- Exercise 1.3
- Exercise 1.4
- Exercise 1.5
- Exercise 1.6
- Exercise 1.7
- Exercise 1.8
- Exercise 1.9
- Exercise 1.10
- Exercise 1.11
- Exercise 1.12
- Exercise 1.13
- Exercise 1.14
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, Ä, Ö, Ü, and the (even stranger) “double s” character ß. We use the following mapping from letters to integers:
- What are the encryption and decryption equations for the cipher?
- How large is the key space of the affine cipher for this alphabet?
- The following ciphertext was encrypted using the key (a = 17, b = 1). What is the corresponding plaintext?
- From which village does the plaintext come?
This decryption part of the solutions (1. and 3.) are verified as correct by the fact that they produce sensible output. If you can see an error in my reasoning for 2. then please leave a comment in the Disqus box below.
1. The encryption and decryption functions are defined as follows:
2. The keyspace is defined as the cartesian product of the possible values and the possible values. needs to be co-prime with 30 in order for it to have a multiplicative inverse in . As such the number of possible values is . Since can be any value in (beacause 0 still performs encryption) then the number of possible b values is 30.
As such the number of total keys is . We subtract 1 from the total in order to eliminate since that key doesn’t perform encryption.
3. When using the key , this is the result of decryption:
4. Frodo comes from The Shire.