# Understanding Cryptography by Christof Paar and Jan Pelzl - Chapter 3 Solutions - Ex3.7

- 1 min

## Exercise 3.7

A DES key $K_w$ is called a weak key if encryption and decryption are identical operations:

1. Describe the relationship of the subkeys in the encryption and decryption algorithm that is required so that above-defined equality is fulfilled.
2. There are four weak DES keys. What are they?
3. What is the likelihood that a randomly selected key is weak?

### Solution

This solution is verified as correct by the official Solutions for Odd-Numbered Questions manual.

1. For $\text{DES}_{K_w}(x) = \text{DES}_{K_w}^{-1}(x), \text{for all } x$ to hold true, the generated subkeys must have the following relation to one another:

2. Rotating all 0s or all 1s is the only way to satisfy this criteria, since they always produce the same subkey in each round.

As such, the four weak keys are when:

Ignoring the effect of $PC-1$ (since it’s trivial to reverse), the four possible weak keys can be defined as:

3. The likelyhood of choosing one of these weak keys at random is as follows: