I am having trouble understanding the meet in the middle attack and how it works on double DES.
I understand that on single DES the key length is 256 but why when using double DES is it 257? Can someone explain it in simple terms please?
I am having trouble understanding the meet in the middle attack and how it works on double DES.
I understand that on single DES the key length is 256 but why when using double DES is it 257? Can someone explain it in simple terms please?
There is a concept of effective/actual key strength. For Double DES the effective key strength is 257 even though double DES uses 2112 keys. The below example will make it clear.
Assume that you are a cryptanalyst who has access to the plain text and encrypted text. Your aim is to recover the secret key. Assume AAA (plaintext) -> XXX (After 1st encryption) -> ZZZ (after 2nd encryption).
You start with AAA and try all the 256 combinations for secret key by encrypting AAA. This will give you a big list of possible values for XXX. Next you take ZZZ and try all the 256 combinations for secret key by decrypting ZZZ. This will give you a big list of possible values for XXX.
The amount of effort you have put in 256 + 256 = 257.
Now do a simple lookup between the two lists to find a matching value. As soon you see a matching value XXX in both the lists, you have found out the secret key. So this means that with effort of 257 keys you have broken the encryption.
Recovering the key for double-DES takes three steps. Given the plaintext and the ciphertext you do the following:
Note that all you had to do to recover the key was using DES 2 × 256 times, which makes 257.