Question: Write a Python script that will encrypt and decrypt a plaintext message using the Caesar cipher. 2 . The following ciphertext splsoeib Is a permutation

Write a Python script that will encrypt and decrypt a plaintext message using the Caesar
cipher.
2. The following ciphertext
splsoeib
Is a permutation of a plaintext word.
a. Try to guess the word
b. Write a Python program that will determine the original plaintext from the ciphertext.
The following code can be used to start the exhaustive search process:
import itertools
from nltk.corpus import words
# Ensure you have the 'words' corpus from nltk
import nltk
nltk.download('words')
permuted_text = 'splsoeib' #the ciphertext
# Load the list of valid English words from nltk corpus
english_words = set(words.words())
# Generate all possible permutations of the length of the permuted_text
all_permutations = itertools.permutations(range(len(permuted_text)))
c. What happens to your program if the ciphertext is of length 20 characters? Explain your
observation.

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 Finance Questions!