write a program that uses AES-128 to decrypt a message. The program should be named "decrypt" and should accept 3-command line arguments as follows:
decrypt cipher_file key_file target_file
where 'cipher_file' is the name of a file that contains the encrypted text as a stream of bytes. 'key_file' is the 128-bit key for decryption stored as a stream of bytes, and 'target_file' is the name of the file where the outcome of the decryption should be stored.
To test this program, here's an example of an encrypted message (link) and its 128-bit secret key (link) (right click and choose "Save As" to save the files on your PC).
PART 2(a): you will try to use "brute force" to decrypt an encrypted message, where you only have the first 96-bits of the 128-bit secret key (last 4 bytes of the secret key are missing!) The program should be called findk, and invoked as follows:
findk cipher_file key_file
where 'cipher_file' is the file containing the encrypted message and 'key_file' is the file containing the first 96-bits of the key. The program should print out on standard output the missing 4 bytes of the key in hexadecimal, the decrypted message and the time it took to find the correct key.
To test this part, here is the encrypted file (link), and the first 96-bits of the key (link) (right click and choose "Save As" to save the file on your PC). Hint: the original message starts with the word "Salam"..
PART 2(b) this part is the same as Part 2(a) but a more challenging key. Hint: the original message starts with the word "Hello".. Here is the encrypted file (link) and the first 96-bits of the key (link).
PART 2(c) (optional for extra credit if broken) this part is similar to Part 2(a) but only the first 64-bits are available. Hint: The message starts with "Salam Nawaf". If you are not able to decrypt the data in time, it is enough to mention the time you ran the program for. Here is the encrypted file (link) and the first 64-bits of the key (link).