Question: Task 3 : Decrypting an ELF File Problem Statement: You are provided with an ELF file that has been encrypted using AES 1 2 8
Task : Decrypting an ELF File
Problem Statement: You are provided with an ELF file that has been encrypted using AESCBC You are to decrypt this file.
Your Specific Inputs:
Encrypted File Name: projecttaskencfile.elf"
Output File Name: projecttaskdecfile.elf"
Key: adfcb
Your Student ID:
Python Code Snippet:from Crypto.Cipher import AES
def decryptaescbcencryptedfile, key, iv:
cipher AES.newkey AES.MODECBC iv
with openencryptedfile, rb as f:
encrypteddata fread
decrypteddata cipher.decryptencrypteddata
return decrypteddata
if namemain:
key b
iv b
encryptedfilepath
decrypteddata decryptaescbcencryptedfilepath, key, iv
with openwb as f:
fwritedecrypteddata
Expected Output: Decrypted ELF file that when executed, should print a specific secret message.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
