Write about Key generation program,Encryption program,Decryption program,Break program

Takes as input the name of the file containing the plaintext

 

Order Now
SKU: Ques16

Write the following four small programs:

1. Key generation program (gen). Takes as input no parameters, and outputs a file key.txt that contains a random key encoded as follows. The file is composed of a single line of 26 characters. Each character is a lowercase letter of the English alphabet. The first letter corresponds to how ‘a’ is encrypted, and so on. (In the example on my slides, key.txt would contain ejinbmo…)

 

2. Encryption program (enc). Takes as input the name of the file containing the plaintext, loads the key from key.txt (stored in the same directory as the program) and outputs ciphertext.txt, which is a file containing the encryption of the plaintext under the key in key.txt. All characters that are not letters or whitespaces (spaces, tabs, newlines, etc.) are removed from the plaintext prior to encryption, then the input is converted to lowercase characters.

 

3. Decryption program (dec). Takes as input the name of the file containing the ciphertext, loads the key from key.txt (stored in the same directory as the program) and outputs plaintext.txt, which is a file containing the decryption of the ciphertext under the key in key.txt.

 

4. Break program (break). Takes as input the name of the file containing the ciphertext, and outputs the decryption of the file. The break program does not have access to key.txt, or to the original plaintext. This program only works on English text.

 

Reviews

There are no reviews yet.

Be the first to review “Write about Key generation program,Encryption program,Decryption program,Break program”

Your email address will not be published. Required fields are marked *

Sorry no more offers available