Understanding Cryptography by Christof Paar and Jan Pelzl - Chapter 2 Solutions - Ex2.3
- 1 min- Return to index
- Exercise 2.1
- Exercise 2.2
- Exercise 2.3
- Exercise 2.4
- Exercise 2.5
- Exercise 2.6
- Exercise 2.7
- Exercise 2.8
- Exercise 2.9
- Exercise 2.10
- Exercise 2.11
- Exercise 2.12
Exercise 2.3
Assume an OTP-like encryption with a short key of 128 bit. This key is then being used periodically to encrypt large volumes of data. Describe how an attack works that breaks this scheme.
Solution
This solution is verified as correct by the official Solutions for Odd-Numbered Questions manual.
The main issue is that the key repeats every 128 bits. As such, the attacker may be able to exploit patterns in the underlying plaintext to recover the key. If a chosen plaintext attack is available then the attacker may be able to recover the entire key and then decrypt the rest of the message unhindered. In mathematical terms, the attack looks as follows (where \(s_i\) is a keystream bit, \(x_i\) is a chosen plaintext bit and \(y_i\) is a ciphertext bit):
\[s_i = x_i \oplus y_i; i = 1,2,... ,128\]