
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
This is about computer technologies
Typology: Schemes and Mind Maps
1 / 32
This page cannot be seen from the preview
Don't miss anything!
Objective The objective of this assignment/lab is to learn and get familiar with: Secret-key cryptography concepts Using/writing programs to encrypt and decrypt different messages Encryption/decryption algorithms Encryption modes Encryption paddings Initial vectors (IV) To do list Task 1: Encryption using Different Ciphers and Modes Task 2: Encryption Mode - ECB vs. CBC Task 3: Encryption Mode-Corrupted Cipher Text Task 4: Padding Process
Task 1: Encryption using Different Ciphers and Modes Step 1: Create an at-least 64 bytes long text file named, ‘task1-YOUR LAST NAME.txt’ with a simple paragraph inside this file.
Step 2: Next, you must consult the man page of openssl library. You will find the enc option, which allows for file encryption in the main page. There is also the option aes , which specifies symmetric encryption. Observe the varying kinds of cipher types (ecb, cbc, ofb, cfb, among others).
Questions: Try at least one cipher with three different modes using the afore mentioned command. Use Jeex editor (or any other editor of preference) to show/display the decryption output of the original text file. Note: The following image shows the CFB mode
Note: The following image shows the CBC mode
Note: The image showing jeex windows with ECB, CBC, CFB, and OFB modes Note the differences in encryption types (size, output, etc.) and state your observations or comments. I found that first value from columns 1 to 8 are the same in any of the encrypted files. The number of rows are different in all the encrypted files. The original file was 147 bytes, the files created by encryption modes ECB, CBC and CFB modes have 176 bytes, while OFB is 163 bytes.
Task 2: Encryption Mode - ECB vs. CBC Step 1: Examine the image file by opening it on Jeex editor. Ensure that your text editor is viewing the image in hex editing mode. (You will only see the hexadecimal conversion of the original BMP image.)
Step 3: Let us treat the encrypted image as a regular image, and use picture- viewing software to display it. Note: Image Viewer could not open the image with the CBC mode encryption or ECB mode encryption.
Questions: Are you able to view the encrypted image? Answer: No I was not able to view the encrypted image. Explain why Answer: The reason is because the images are encrypted, we need to decrypt the image before it can be read or view by any conventional image viewer application.
Questions: Can you derive any useful information about the original picture from the encrypted picture? Answer: No, the binary code for the encrypted image and the non-encrypted image are very different. Does the encrypted image resemble the original in any way? Answer: No, the encrypted picture is showing all black. Why does the encrypted image look the way it does? Because we modified part of the encryption code Task 3: Encryption Mode-Corrupted Cipher Text
Step 1: Create a text file named, ‘task3-YOUR LAST NAME.txt that is at least 64 bytes long. Step 2: Encrypt the file using the AES-128 cipher. Note: You have to encrypt the
file (apply any corruption such as modify the bit, remove some bits, and so on). The reason you want the 30th bit is that for a 64+ byte file, the 30th bit should pass the header of file and affect the primary data.
Note: Image shows ECB mode