Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please mention which language has been use and the file name and everythings. 1 Hill Cipher In this assignment youll write a program that encrypts

Please mention which language has been use and the file name and everythings.

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. CIS3360 PA 01 1

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.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 1.2.5 Program execution - example Note that the commands below are also outlined later on in this document for either c, c++, Java, Go, or Python. Also note that the first parameter is the key filename and the second parameter is the plaintext filename. systemPrompt$ gcc -o pa01 pa01.c systemPrompt$ ./pa01 kX.txt pX.txt A sample program execution with outputs is shown below. It is explained in more detail later on in the Section Sample inputs and outputs on page 6. systemPrompt$./pa01 k1.txt p1.txt Key matrix: 2 4 3 5 Plaintext: notonlyistheuniversestrangerthanwethinkitisstrangerthanwecanthinkwernerheisenber gx Ciphertext: efqxsqciitepovwzytawitizyrytooaniiooqlassteocmancmgqovktqwanooqlekytqhkioaawesyt ad

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Prentice Hall Finance And Accounting Internet Guide

Authors: Brenda J. Mizgorski

1st Edition

0130952850, 978-0130952851

Students also viewed these Databases questions