Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

THE PROGRAM SHOULD BE WRITTEN IN PYTHON OR LINUX COMPATIBLE C You will actually write 2 programs that will run separately, an encryption program and

image text in transcribed
THE PROGRAM SHOULD BE WRITTEN IN PYTHON OR LINUX COMPATIBLE C
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 As part of its operation, the decryption program MUST actually calculate the modular inverse (that is, you are NOT allowed to precalculate it all and save it in a big table). And similarly for the modular arithmetic in all parts of this program. Your data that is decrypted using your Block Affine cipher decrypter will be written to a file called finalplaintextoutput.txt

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

Statistical And Scientific Database Management International Working Conference Ssdbm Rome Italy June 21 23 1988 Proceedings Lncs 339

Authors: Maurizio Rafanelli ,John C. Klensin ,Per Svensson

1st Edition

354050575X, 978-3540505754

More Books

Students also viewed these Databases questions

Question

politeness and modesty, as well as indirectness;

Answered: 1 week ago