INSC 615 - Network Security and Perimeter Protection Lab 1 "Secret-Key Encryption Lab"
INSC 615 - Network Security and Perimeter Protection Lab 1 "Secret-Key Encryption Lab"
INSC 615 - Network Security and Perimeter Protection Lab 1 "Secret-Key Encryption Lab"
Lab 1
“Secret-Key Encryption Lab”
Name:
Student ID:
Professor:
TA:
Introduction
This lab will help us to understand and gain the first-hand experience on symmetric encryption,
encryption algorithm and encryption modes. Practising to encrypt/decrypt messages. Since long time
ago messages have been encrypting to keep the secrecy or confidentiality of the information. With the
pass of the years and the rising of the new technologies, it is necessary that encryption methods evolve
because the attackers capture the messages and try to decrypt. Then the only way to protect the
information is make the codes more difficult to decrypt.
Summary
Task 1: Frequently Analysis, discover the plain-text base on a cipher text using the
replacement of the well know letters and the frequency they repeat.
Task 2: Encryption using Different Ciphers and Modes, with openssl tool I will try to
encrypt in different ciphers and then decrypt back
Task 3: Encryption Mode – ECB vs. CBC, I will encrypt a picture and modify the
header to see what happened with the picture.
Task 1:Frequency Analysis
First I will change the cipher text to know how we can modified through “tr command” from
lower letter to uppercase and see we can cipher a then decrypt back. Then I will try to discover the
article using the frequency analysis where we go changing the letter which more appears. The lab is in
VM with Linuz Ubuntu 20.04 (Seed image).
Finally guessing the letter which repeat more I get the Key Encription.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
r g a p n b v t m o s i c u x e j h q y z f l k d w
1. rc2-64-cbc
2. des-ede3-cbc
3. aes-128-cbc
4. aes-256-cbc
After the encryption the generated file can NOT be read, and the only way to recover the file is with the
key (password). Now I will perform the deception of the files, and create new plain-text files to
compare with the originals.
Figure 7 command line to decrypt in different types of encryption
The files after the encryption can’t be read and then when it is decrypted. It can be read again, as the
original file.
Figure 9 Commands to encrypt the picture with different modes and command to create a new picture
from the encrypted file that can be viewed to compare with the original.
I can see that the picture that was encripted with ECB still can show the picture even if it is
encripted, but the picure that was encripted with CBC can NOT be see.
Conclusion
We could observe that not all the cipher methods are similar and even if they encrypt at 128
bits, the information can be restore in some way, then we have to be careful and look for the right
encryption mode that assure our information or data will not see by others who are not authorize.
Reference