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 well-known 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 cipher-text 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 (i.e., 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 1: let us generate the encryption key, i.e., 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.
#!/bin/env python3
import random
s = "abcdefghijklmnopqrstuvwxyz"
list = random.sample(s, len(s))
key =.join(list)
print(key)
Step 2: 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< in.txt > out.txt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!