Using Ubuntu SeedLab
To understand the error propagation property of various
encryption modes, we would like to do the following exercise:
1. Create a text file that is at least 1000 bytes
long.
2. Encrypt the file using the AES-128 cipher.
3. Unfortunately, a single bit of the 55th byte in
the encrypted file got corrupted. You can achieve this corruption
using the bless hex editor.
4. Decrypt the corrupted ciphertext file using the
correct key and IV.
Please answer the following question: How much
information can you recover by decrypting the corrupted file, if the
encryption mode is ECB, CBC, CFB, or OFB, respectively? Please
answer this question before you conduct this task,
and then find out whether your answer is correct or wrong after you
finish this task. Please provide justification.
Encrypt
**********
openssl enc -v -aes-128-ecb -K 6162636465666768696a6b6c6d6e6f70
-nosalt -in file.txt -out enc.txt
Decrypt
**********
openssl enc -d -v -aes-128-ecb -K 6162636465666768696a6b6c6d6e6f70
-nosalt -in currpted.txt -out repair.txt
you can check the corrupted info in the below comparison
thanks !
Get Answers For Free
Most questions answered within 1 hours.