Question: This project is designed to take a user - provided message, a keyword used in the process, and then encrypts the message as per the
This project is designed to take a userprovided message, a keyword used in the process, and then encrypts the message as per the users request.
Description:
Encode messages using the following scheme:
ABCDE
FGHIJ
KLMNO
PQRST
UVWXY
To encode a letter, use the row number followed by the column number. For instance, G becomes and T becomes
Step :
Create the matrix shown above before encryption. To encrypt a message, convert each letter to its corresponding twodigit string, as shown below. Assume the users input message is GATES HILLMAN CENTER The encrypted string is
G A T E S H I L L M A N C E N T E R
Step : Using a keyword without repeated letters, create a grid of the digits using the numerical sequence of your converted message. Ensure the number of columns matches the length of the keyword. For instance, if the keyword is CORTINA, the grid would be:
C O R T I N A
Step : Rearrange the grid by alphabetizing the letters of the keyword and shifting the corresponding digit columns. In our example, the results in:
A C I N O R T
Step : Finally, the message would be written as a sequence of digits, column by column ignoring the letters at the top of each column:
This is the final encoded message transmitted. To decode, the decrypter works in reverse using the secret keyword. Without it cracking the code is challenging but not impossible.
What to do:
Message Input: Enter a message without numbers or symbols at program launch; they will be removed in processing.
Keyword input: Enter a keyword for encryption; it should not contain numbers, symbols, or duplicate characters. The program will convert it to uppercase, and if duplicates are found, it will prompt a new message.
EncryptionOutput: After reading the message and keyword, the program will output:
The original message in uppercase with spaces, excluding digits or punctuation.
The numerical sequence for the message.
The grid of numbers for the original keyword.
The sorted grid of numbers for the keyword.
The encrypted message as a sequence of digit "words".
The program will process the input data into an encrypted form, and each step of the process will be output to the user in order:
Message to Be Encrypted
Sequence from Letter Matrix
The Keyword
The Keyword Matrix
The Alphabetical Keyword
The Reordered Matrix
The Fully Encrypted Message
pts Processing user input:
o Message: No numbers or symbols allowed; they will be removed during processing.
o keyword: No numbers, symbols, or duplicate characters; program prompts for a new keyword if duplicates are found.
pts generateMessageMatrix: convert each letter to its corresponding twodigits.
pts generateKeyMatrix: create a grid of digits using the numerical sequence of the converted message, with the number of columns equal to the keyword length.
pts rearrangeMatrixOrder: rearrange the grid so that keyword letters are in alphabetical order, shifting corresponding columns of digits along with the letters.
pts printEncryptedMessage: write the message as a sequence of digits, column by column.
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
