Due Wednesday, 12 October, 2016 at 11:30 PM
Report problems to ablumer via email
In this assignment you will implement a meet-in-the-middle attack on double DES. To make the space and time requirements reasonable, in addition to two (plaintext, ciphertext) pairs, I will give you most of the bits in both keys. You will need to use a data structure to store all possible (single) DES encryptions of the first plaintext so that they can be efficiently searched for matches with decryptions of the first ciphertext. The second (plaintext, ciphertext) pair is used to validate or invalidate candidate matches.
The first six bytes of the key for the first encryption are "KeyOne". You need to find the remaining two bytes, except that the low-order bit in each byte is ignored. Similarly, the first six bytes of the key for the second encryption are "KeyTwo" and you need to find the remaining two bytes.
The first (plaintext, ciphertext) pair is (in hex):
The second (plaintext, ciphertext) pair is (in hex):
You don't need to implement DES - you can copy an implementation from my home directory at ~ablumer/fastdes.cpp
Document your code so that it's easily understandable by the grader.
Please put your first name, last name, and CS login name on the first line of your comments.
Put the hex values of the four key bytes that you found on the second line.
Submit your file using this command:
provide comp165 a3 lastname.cpp