C program only!
ECE 175: Computer Programming for Engineering Applications Conventions: Name your C programs as huz py.c where z corresponds to the homework number and y corresponds to the problem number. As an example the C program for hwl problem 1 should be named as hul-ple Submission Instructions: Use the dropbox on D2L to submit the c files and a PDF of your peeudocode 1 Caesar's Cipher (70 points) The Caesar's cipher is a cryptographic method for encrypting text such that it becomes unreadable to a party with- out access to the cryptographic key. It is named after Julius Caesar, who allegedly used it to protect messages of military significance. The encryption and decryption operations are simple shifts of the alphabet letters in a cyclic fashion. Mathematically, for a key k, the encryption and decryption are defined as: Encryption: c= (z + k) mod 26 , Decryption: z = (c-k) mod 26. To illustrate the use of the Ceasar's cipher, consider the encryption of "fry" with key k = 3. Letters f, r, y correspond to the 5th, 16th, and 24th letter of the alphabet (letter a being the 0th). f:(5 + 3) r:(16 + 3) y:(24 + 3) mod 26 mod 26 mod 26 8i 19 u 1b = = = Similarly, the decryption of ,b follows the reverse process i:(8-3) u: (19-3) b:(1-3) mod 26-5-+/ mod 26 = 16 r mod 26 = 24 V NOTE: The modulo operation for negative numbers is different from the % arithmetic operator in C. Write a C program that decrypts a file named 'encrypted.txt and places the decryption output to a file called "decrypted txt". A file encrypted with k . 3 is provided with the assigment. You can use it to test your decryption function. You will know when you have succeeded because the text becomes readable. In your program . Ask the user to enter the decryption key . Repeat the request until the right key is entered. . Display a message when file decryption is over Ask the user to enter a key to re-encrypt the file. . Re-encrypt file "decrypted.txt" and store it at "encrypted.txt