Question: pls C++ 1 Hill Cipher In this assignment youll write a program that encrypts the alphabetic letters in a file using the Hill cipher where

pls C++

1 Hill Cipher In this assignment youll write a program that encrypts the alphabetic letters in a file using the Hill cipher where the Hill matrix can be any size from 2x 2 up to 9x 9. Your program will take two command line parameters containing the names of the file storing the encryption key and the file to be encrypted. The program must generate output to the console (terminal) screen as specified below. 1.1 Command line parameters 1. Your program must compile and run from the terminal command line. 2. Input the required file names as command line parameters. Your program may NOT prompt the user to enter the file names. The first parameter must be the name of the encryption key file, as described below. The second parameter must be the name of the file to be encrypted, also described below. The sample run command near the end of this document contains an example of how the parameters should be entered and processed. 3. Your program should open the two files, echo the processed input to the screen, make the necessary calculations, and then output the ciphertext to the console (terminal) screen in the format described below.

Note If the plaintext file to be encrypted doesnt have the proper number of alphabetic characters to match the key size, pad the last block as necessary with the lowercase letter x. Make sure that all the input characters are lower case only. 1.2 Formats 1.2.1 Encryption Key File Formats The encryption key file will contain a single positive integer, n where (1

1.2.3 Output Format The program must output the following to the console (terminal) screen, also known as stdout: 1. Echo the numbers from the input key file. 2. Echo the lowercase alphabetic text derived from the input plaintext file. Remember to pad with x if the processed plaintext does not match the block size of the key. 3. Ciphertext output produced from encrypting the input key file against the input array specified in the key file. The output portion of the input plaintext file should consist of only lowercase letters in rows of exactly 80 letters per row, except for the last row, which may possibly have fewer. These characters should correspond to the ciphertext produced by encrypting using the numbers collected from the input key file and applied as a Hill cipher, via matrix multiplication (see additional notes and pseudocode at the end of the document). Please note that only the alphabetic letters in the input plaintext file will be encrypted. All other characters should be ignored.

1.2.4 Program Execution The program, pa01 expects two inputs at the command line. The first parameter is the name of the key file,which contains a single positive integer, n where (1

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