Question: Using Python for this program: 1-The user will input a string containing a message of several words and punctuation. 2-Only the alphabetic characters in the

Using Python for this program:

1-The user will input a string containing a message of several words and punctuation.

2-Only the alphabetic characters in the string must be encrypted. The rest of the characters are left as is in the message.

3-You must use the Vigenere encryption algorithm .

4-The user will also enter the key needed which must contain only one word with only alphabetic characters.

5-The Vigenere square will only contain the lowercase letters. You should convert the message and key to lower case before the encryption.

6-The program will display the encrypted message.

7-Next, the encrypted message is decrypted and the decoded message should be displayed in lowercase.

System Design

In the vigenere.py file, the main function reads in the plaintext string to be encrypted and the key to use. Both are converted to lowercase. The main function then calls the create_vig_square function which returns the matrix setup , using the ord and chr functions. Next, it calls the encrypt function passing in the matrix, the string to be coded and the and the key. The encrypt method calls other methods that help it do the encryption (). The encrypt function then passes the encoded ciphertext message back to the main method where it is displayed.

You must breakdown the encrypt method into simpler tasks and create at least 2 other functions that are called from the encrypt method to do these tasks.

After the encrypted ciphertext message is displayed, the main method must call the decrypt method to convert the message back to its lowercase form.

Use Sample Output Below as Guide

Enter a multi-word message with punctuation:

The eagle has landed.

Enter a single word key with no punctuation:

LINKED

The encoded message is:

epr oejwm ukw olvqoh.

The decoded message is:

the eagle has landed.

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