Question: Background: The Caesar Cipher, said to be invented by Julius Caesar and was used by the ancient Roman Legion, is the earliest known method of
Background: The Caesar Cipher, said to be invented by Julius Caesar and was used by the ancient Roman Legion, is the earliest known method of "encrypting" a message the "plaintext" to something that is unintelligible the "cipertext" by using a secret number the "key" which is only known to the sender Alice and the expected receiver Bob of that message, but no one else.
The cipher works as such: first of all, Alice performs an "encryption" using the shared key. And after the encrypted message is delivered to Bob. Now, when Bob receives the message, he will apply the key to the cipher to perform a "decryption" and recover the original message fairly quickly and easily. However, if the message somehow was obtained by an adversary Cate in the middle, since Cate does not have the key, it will take her quite some effort to find out the original message. As well as that, if Cate altered the ciphertext, Bob will for sure know that, as the decrypted text from that altered one will most likely have no meanings.
In this project, you are asked to implement such a cipher with the said encryption and decryption functionalities on text and key being typed in from the keyboard.
Description: The flow of the program looks like this:
At the beginning of the program, you will be asked to type in either ED for calling the corresponding encryptiondecryption protocol via the prompt "Please select mode ED:
Then, in either case, you will be asked to input a string via the prompt "Please enter the plainciphertext where the string is terminated by an enter, or x A in LC
Then, similarly, you will be asked to type in the key, a number ranging from via the prompt "Please enter the key :
Lastly, depending on the initial selection, the system will print to the console either the encrypteddecrypted message with promopt "The encrypteddecrpted message is: where the dots represent the ciphertextplaintext
To give a specific use case scenario: We choose encryption with plaintext "HelloWorld" lets focus on letters only, upper and lower cases with key being After the program execution, the ciphertext with prompt "The encrypted message is: MjqqtBtwqi" should be printed to the console.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
