input files: "cwords.txt" , "encrypt_matrix.txt"

The purpose of this short project is to decrypt a file that has been encrypted. The encryption method used is a polyalpabetic substitution method. To find the answer to this problem you must read, understand, and then reverse the procedure that was used to encrypt the file.

Encryption Procedure:

1. An 26 X 26 encryption matrix of capital letters was created.

2. When a file was read character by character a modulus of the location of the character in the file was calculated using the number 26. This provided a row index for the encryption matrix. The position of the character in the alphabet provided the column index.

The character in the encryption matrix at the row and column was used to replace the input character. In reading the input file no substitutions were made for spaces or for punctuation. The case of the letters was preserved.

Instructions:

1. Write code to read the content of the file "encrypt_matrix.txt" into a two dimensional [26][26] array.

2. Write code to read and decrypt the content of the file "cwords.txt". Write your answer to a file called "final_translation.txt".

Hints:

1. The ASCII value for the capital letter 'A' is 65.

2. The funtions isalpha(), isupper(), islower(), toupper(), and tolower() can be used to save a great deal of time.

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.