Question: Write Python program which implements the following two classical cryptosystem a) Affine Cipher b) Vigenere Cipher Your program should consist of at least five functions:

Write  Python program which implements the following two classical cryptosystem

a) Affine Cipher

b) Vigenere Cipher

Your program should consist of at least five functions:

a) Two functions named encrypt, one for each of the two algorithms which accepts a lowercase alphabetical plaintext string and key as input and outputs a corresponding cipher text string.

b) Two functions named decrypt, one for each of the two algorithms which accepts a lowercase alphabetical ciphertext string and a key as input and outputs a corresponding plaintext string.

c) A main function which will offer users the option to select a cryptosystem, mode (encryption or decryption), and specify plaintext/ciphertext and key inputs using either the command line or a simple GUI. The output of each cryptosystem function should be display to stdout.

Note that the format of your key will vary depending on which ciphers you choose to implement.

For this problem you should submit your source code and a document containing:

a) Your compilation instructions.

b) Your execution instructions.

c) The output from a sample run in which you use your program to encrypt and decrypt a message using each of your cryptosystems which shows the input, output, and keys used in each.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To implement the Affine Cipher and Vigenere Cipher in Python you can follow this code example This code includes five functions as specified and a mai... View full answer

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