Question: I need help to design a simple Vigenre Cipher C++ program. For this program, it should both encrypt and decrypt using this cipher using a

I need help to design a simple Vigenre Cipher C++ program.

For this program, it should both encrypt and decrypt using this cipher using a combination of letter to number mappings and modulo arithmetic. For example, we can map the letter 'a' to the number 0, 'b' to 1, . . . , 'z' to 25. For example, to encrypt a plaintext 't' when the corresponding key letter is 'b':

Convert 't' into a number (19)

Convert 'b' into a number (1).

Add the two numbers (mod 26): (19 + 1)%26.

Convert the result back into a letter (20 represents the letter 'u').

Example of working program for both encrypting and decrypting:

I need help to design a simple Vigenre Cipher C++ program. Forthis program, it should both encrypt and decrypt using this cipher using

Do you wish to encrypt er decrypt? encrypt What is the key for this encryption? {all lowercase letters, no spaces] elephant Please type your plaintext message.r all on one line; when you are finishedIr hit = abortattackatdawn The encryption for your input is ***emsgaagmenopadnpr*** All done Do you wish to encrypt or decrypt? decrypt What is the key for this decryption? {all lowercase letters, no spaces) elephant Please type your encrypted message, all on one line; when you are finished, hit

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