0% found this document useful (0 votes)
32 views

Lab4-Symmetric Key Encryption

This lab document outlines two tasks related to symmetric-key encryption: 1. The first task examines how a single corrupted bit in an encrypted ciphertext affects decryption when using different encryption modes (ECB, CBC, CFB, OFB). It asks students to predict and then verify how much of the original plaintext can be recovered for each mode. 2. The second task investigates padding schemes for block ciphers. It asks students to design an experiment to verify OpenSSL's padding standard, examine paddings for plaintexts of different lengths, and report which encryption modes require padding and why some modes do not.

Uploaded by

Nur Hidayah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Lab4-Symmetric Key Encryption

This lab document outlines two tasks related to symmetric-key encryption: 1. The first task examines how a single corrupted bit in an encrypted ciphertext affects decryption when using different encryption modes (ECB, CBC, CFB, OFB). It asks students to predict and then verify how much of the original plaintext can be recovered for each mode. 2. The second task investigates padding schemes for block ciphers. It asks students to design an experiment to verify OpenSSL's padding standard, examine paddings for plaintexts of different lengths, and report which encryption modes require padding and why some modes do not.

Uploaded by

Nur Hidayah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Monash University - FIT2093 1

Lab4: Crypto Lab2 – Symmetric-Key Encryption

1 Overview
This lab is a continuation from last week’s cryptography content.

2 Lab Tasks
2.1 Task 1: Encryption Mode – Corrupted Cipher Text
To understand the properties of various encryption modes, we would like to do the following exercise:

1. Encrypt plain.txt file using the AES-128 cipher.

2. Unfortunately, a single bit of the 30th byte in the encrypted file got corrupted. You can achieve this
corruption using a hex editor.

3. Decrypt the corrupted file (encrypted) using the correct key and IV.

Please answer the following questions: (These answers contribute to the lab4 assignment)
(1) 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. (2) Please
explain why. (3) What are the implication of these differences?

2.2 Task 2 : Padding


For block ciphers, when the size of the plaintex is not the multiple of the block size, padding may be
required. In this task, we will study the padding schemes. Please do the following exercises:

1. The openssl manual says that openssl uses PKCS5 standard for its padding. Please design
an experiment to verify this. In particular, use your experiment to figure out the paddings in the
AES encryption when the length of the plaintext is 20 octets and 32 octets.

2. Please use ECB, CBC, CFB, and OFB modes to encrypt a file (you can pick any cipher). Please
report which modes have paddings and which ones do not. For those that do not need paddings,
please explain why. (Include the explanation in your lab4 assignment)

You might also like