Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help with the following C programs: Develop a program in C AES256_CBC_Enc.c and AES256_CBC_Dec.c that use the CBC mode 256-bit AES cipher in OpenSSL

Please help with the following C programs:

Develop a program in C AES256_CBC_Enc.c and AES256_CBC_Dec.c that use the CBC mode 256-bit AES 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. Specifically, the programs need to support the following commands line arguments and usage: AES256_CBC_Enc k -v -i -o AES256_CBC_Dec k -v -i -o

where contains the 32-byte encryption key in hex format; contains the 16byte IV in hex format; is the name of the input file (e.g., plaintext); is the name of the output file (e.g., cipher text). 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 32 bytes in hex).

The plaintext.txt file should content:

AAAAAAAAAAAAAAAABBBBBBBBBBBBBDDDDDDDDEEEEEEEEEEEEEECCCCCCCCCCCCCCCC

The aes256key.txt file should content the key:

0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 

The aesIV.txt file should content the key:

d9000a0800ac3b75111d393ad246ff95 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2019 Wurzburg Germany September 16 20 2019 Proceedings Part 2 Lnai 11907

Authors: Ulf Brefeld ,Elisa Fromont ,Andreas Hotho ,Arno Knobbe ,Marloes Maathuis ,Celine Robardet

1st Edition

3030461467, 978-3030461461

More Books

Students also viewed these Databases questions

Question

6. Are my sources reliable?

Answered: 1 week ago

Question

5. Are my sources compelling?

Answered: 1 week ago