Question: SEEDS Lab - Secret Key Encryption Lab ( Can be found online ) It is well - known that monoalphabetic substitution cipher ( also known
SEEDS Lab Secret Key Encryption Lab Can be found online
It is wellknown that monoalphabetic substitution cipher also known as monoalphabetic cipher is not
secure because it can be subjected to frequency analysis. In this lab, you are given a ciphertext that is encrypted
using a monoalphabetic cipher; namely, each letter in the original text is replaced by another letter, where the
replacement does not vary ie a letter is always replaced by the same letter during the encryption Your job is
to find out the original text using frequency analysis. It is known that the original text is an English article.
In the following, we describe how we encrypt the original article, and what simplification we have made.
Step : let us generate the encryption key, ie the substitution table. We will permute the alphabet
from a to z using Python, and use the permuted alphabet as the key. See the following program.
#binenv python
import random
s "abcdefghijklmnopqrstuvwxyz"
list random.samples lens
key joinlist
printkey
Step : we use the tr command to do the encryption. We only encrypt letters, while leaving the space
and return characters alone.
$ tr abcdefghijklmnopqrstuvwxyzsxtrwinqbedpvgkfmalhyuojzc
plaintext.txt ciphertext.txt
We have created a ciphertext using a different encryption key not the one described above It is included in
files.zip, which can be downloaded from Canvas. Your job is to use the frequency analysis to figure out the
encryption key and the original plaintext.
We have created a ciphertext using a different encryption key not the one described above It is included in
files.zip, which can be downloaded from Canvas. Your job is to use the frequency analysis to figure out the
encryption key and the original plaintext.
$ tr aetXGE intxt out.txt
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
