Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task4 : Padding For block ciphers, when the size of the plaintext is not the multiple of the block size, padding may be required. In

Task4 : Padding For block ciphers, when the size of the plaintext 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: SEED Labs 3

1. The openssl manual (try man enc) says that openssl uses PKCS5 (Public Key Cryptography Standard) for its padding. In this standard the value of each byte is the number of bytes that are added for example, if padding is required for 4 bytes, the hexadecimal padding string 04 04 04 04 is used. If the input data is a multiple of the block size, then an extra block of bytes with the block size value is added for example, if the input data is 80 bytes and the block size is 16 bytes, an extra padding block of 16 bytes, with each byte 10 in hexadecimal, is added. Design an experiment to verify the padding scheme. In particular, use your experiment to figure out the paddings in the AES encryption when the length of the plaintext is 20 bytes and 32 bytes.

2. Use ECB, CBC, CFB, and OFB modes to encrypt a file (you can pick any cipher). Report which modes have paddings and which ones do not. For those that do not need paddings, explain why

Note: OpenSSL. In this lab, we will use openssl commands and libraries. Make sure you have openssl installed in your VM. It should be noted that if you want to use openssl libraries in your programs, you also need to install libssl-dev, the development version of ssl, using the following command: sudo apt-get install libssl-dev Binary editor GHex. In this lab, we need to be able to view and modify files of binary format. Make sure you have GHex installed in your VM. GHex is a hex editor for GNOME that allows the user to load data from any file, view and edit it in either hex or ascii.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is digital literacy? Why is it necessary?

Answered: 1 week ago