In this project you will be using a simple cipher: the block affine cipher. Your project MUST run on Linux in the CS department labs on a CS linux server (for example, dakota.cs.uah.edu). If your program won’t run on Linux in the CS labs then YOU WILL RECEIVE A GRADE of ZERO for the program. Your program MUST run using the linux command line. You will use EITHER python OR C++/C. If you use C++/C then your code must work using the gnu c compiler. You will actually write 2 programs that will run separately, an encryption program and a decryption program. Your plaintext will be in a file named plaintext.txt. This will be the input to your encryption program. Your alphabet will be the uppercase characters (A-Z). Count them starting with A=00, B=01, etc., with Z=25. Your encryption program will encrypt this plaintext using a Block Affine cipher with 3 letter blocks. If your plaintext has any leftover missing character(s) in a 3 letter block, you will pad that block with a capital letter B. NOTE: you will pad this in the ORIGINAL plaintext, that is, the plaintext that is stored in the plaintext.txt file. The ciphertext output from your encryption program will be written to a file called ciphertext.txt. This file, ciphertext.txt, will be the input to your decryption program. For both the encryption program and the decryption program, the user will input the multiplier from the console, as follows: Input multiplier for Block Affine cipher The user will input the offset from the console, as follows: Input offset for Block Affine cipher Your program will then check whether or the multiplier is relatively prime to the modulo. If it is NOT relatively prime to the modulo, then your program will print an error message to the console and will terminate
Get Free Quote!
272 Experts Online