Question: Write a Python code to do the following: * Generate a random 2 5 6 - bit AES key and a 1 2 8 -

Write a Python code to do the following:
*Generate a random 256-bit AES key and a 128-bit random IV
*Based on the above key & IV
Use AES to encrypt and decrypt a message Cyber Security is fun
Use AES to encrypt a given file e.g. "test.txt" and output "test.txt.enc".
Use AES again to decrypt the "test.txt.enc" to get your file back "test.dec.txt".
Check that "test.dec.txt" is identical to "test.txt"
Test the above on different files.

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!