Vigener cipher is a method of encryption base don several shiftings of the lette
ID: 3553359 • Letter: V
Question
Vigener cipher is a method of encryption base don several shiftings of the letters of the alphabet, and using a keyword to correlate the letters of a plain text message with the shifted letters. It is base don the table
Write a plan for a program (not code ) and then write the code of the program in wich you set up a doubly-subscripted array to sotre each carcter in the table. Use nested loops, and the most efiicient statements to do it. Include documentation(coments stmts.) in your program.
The keyword is PARKING
Have your program read in a message from the textfile you will find in Blackboard(please do not rename the file), and store its letters with no spaces or punctuation, in a singly-subscripted array. Then have your program use the keyword to encrypt the message and show the encrypted message on the screen. Here i show the encryption Works using paper and pencil: above the letters of the plain text message, write the letters of the keyword, repeating as much as necessary. For example, if the message is: meet me at midnight, yo would write:
P A R K I N G P A R K I N G P A
M E E T M E A T M I D N I G H T
Then look for the row in the table that begins with P and find the column headed M. Use the corresponding letter in the body of the table happens to give E. For the next letter, the row beginning with R and the column headed E give a . So your encrypted message starts BEV {Notice that frequency-of-occurence cannot be used to nreak this code.)
Follow these specifications:
In main, set up an arrayto hold the 7 characters of the keyword. In this program, do not make an array that stores the keyword repetitively. That would be ineficcient. Instead , you can manipulate subscripts.
Declare all your array variables in the main program. Assume the message you will encode has 100 characters r fewer.
In main, open a file for input, and include a trap to make sure it opened correcly.
Call a function t oread in the original message and store it in array. Skip spaces and punctuation. Make sure program general enough so it can be run with a differet-length message.
Back in the main program, print out the number that says how many characters are stored.
Call a function to set up and store the 2-dimensional Vigenere Table.
Back in the main program, print out the numbers that say how many rows and how many columns were used.
Call a function to do encoding.
Back in the main program, print out to the screen the original message( without space or punctuation), and in the line below it, print out to the screen the encrypted message.
Make sure there arent any extra characters or missing characters.
Check at least some of the results by hand.
Run the program again with the other files input data, and check results.
A recomendationto facilitate checking , try your program first with an input file containing just a short phrase, for example :
THE MESSAGE.
For the detailed Plan: The specifications above give a rough starting outline. In your plan , decide on variable names, types of variables, and in particular , how information from main will be passed down into the functions, and how information from the functions will be passed back to main. Use generic names for the arguments in the functions, that is, different names from what you use in main. You also need to plan in detail what steps neeed to be carried out inside each function. You plan is not to be C++ code.
A C D E F G H A A B c D E F G H K c c o E F G H 1 i K L M N o P a T u v w X Y Z A B c D D E F G H K L M N o P s u v w x z A B c D K L M N o o R s T G H I K M N o P a R s T u v w x z A 8 c D E F u M N o a s T u v x z A B c D E F G o a R s T u v w x Y z A B C D E F G H l J K L M N p J K L M N o p a K M N o P Q R S T U V G H I J K L L M N o p a R s T u v w x z A B c D E F H K L M M N o p a R u v w x Y z A B c D E F G J K L MM N N o P a R s s T G H K L M N T u v w x Y z A c D E F o o P a R s T u v w x Y z A B c D E F G H K L M N O P P a R s T u v w x z A B C D E F G H J L M N O P K a a R s T u v w x z A c D E F G H K L M N O P Q R R s T u v w x z A B c D E F G He L M N O P Q R J K s s u v w x Y z A B c o E J K L M N o P R S T u v w x Y z A B c o E F G H L M N o P a s T u u v w x Y z A 8 c o E F G H K M N o P Q R s T u v v w x Y z A B C D E F G H L. R s T u v w w z A B C D E F G H K L M N o R s T u v w F G H i s L M Ms o p a L o R s u v w x L o R s T u v w x Y z z A B c D E F G H J KExplanation / Answer
VigenRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.