Question: Program three encryption methods using python to read in a file and encrypt and decrypt it CFB CBC CTR 256 bit key xor encryption as

Program three encryption methods using python to read in a file and encrypt and decrypt it

CFB

CBC

CTR

256 bit key

xor encryption as block cipher

sample output should be as follows:

Program three encryption methods using python to read in a file and

----Original file------ b'hey whats your name 68 65 79 20 77 68 61 74 73 20 79 6F 75 72 20 6E 61 60 65 ----ENCRYPTED---- Encrypting in OFB mode with key 01 02 03 04 ECB: 69 67 ZA 24 76 6A 62 70 72 22 7A 6B 74 70 23 6A 60 6F 66 OFB: 69 67_7A 24 1F OD 18 54 94 48 18 1B 06 52 59 01 14 17 45 6E 61 6D ----DECRYPTED---- Decrypting in OFB mode with key 01 02 03 04, ECB: 68 65 79 20 77 68 61 74 73 20 79 6F 75 72 20 6E 61 6D 65 OFB: 68 65 79 20 77 68 61 74 73 20 79 6F 75 72 20 6E 61 6D 65 00 00 00 ----PLAINTEXT---- ECB: hey whats your name OFB: hey whats your name All done ----Original file------ b'hey whats your name 68 65 79 20 77 68 61 74 73 20 79 6F 75 72 20 6E 61 60 65 ----ENCRYPTED---- Encrypting in OFB mode with key 01 02 03 04 ECB: 69 67 ZA 24 76 6A 62 70 72 22 7A 6B 74 70 23 6A 60 6F 66 OFB: 69 67_7A 24 1F OD 18 54 94 48 18 1B 06 52 59 01 14 17 45 6E 61 6D ----DECRYPTED---- Decrypting in OFB mode with key 01 02 03 04, ECB: 68 65 79 20 77 68 61 74 73 20 79 6F 75 72 20 6E 61 6D 65 OFB: 68 65 79 20 77 68 61 74 73 20 79 6F 75 72 20 6E 61 6D 65 00 00 00 ----PLAINTEXT---- ECB: hey whats your name OFB: hey whats your name All done

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!