Question: Develop a program in C DES_ECB_Enc.c and DES_ECB_Dec.c that use the ECB mode DES cipher in OpenSSL to encrypt or decrypt a given file (of

Develop a program in C DES_ECB_Enc.c and DES_ECB_Dec.c that use the ECB mode DES cipher in OpenSSL to encrypt or decrypt a given file (of arbitrary length) into another encrypted or the decrypted file with any given encryption key and IV with support of the following Command:

DES_ECB_Enc k -i -o DES_ECB_Dec k -i -o

where contains the 32-byte encryption key in hex format; contains the 8-byte IV in hex format; is the name of the input file (e.g., plaintext or cipertext); is the name of the output file (e.g., cipher text or plaintext). Note: and are text files, could be either text or binary file; is a binary file. The programs need to do basic sanity check on , , and gracefully exit when any illegitimate file is found (e.g., the does not contain 8 bytes in hex).

The initial plaintext file "plain.txt" should content:

AAAAAAAAAAAAAABBBBBBBBBBBBBBBDDDDDDDDDDDDDDCCCCCCCCCCCCCFFFFFFFFFFFFF

keyfile.txt should content:

0f1571c947d9e859 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!