Understanding Cryptography by Christof Paar and Jan Pelzl - Chapter 1 Solutions - Ex1.12

- 2 mins

Exercise 1.12

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:

German Alphabet Mapping

  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?
  4. 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.

Thomas Busby

Thomas Busby

I write about computing stuff

comments powered by Disqus
rss facebook twitter github youtube mail spotify instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora