Question: Please program in C++ Thank you. The plain text and key are in seperate .txt files already on computer. The key is in binary. needed

 Please program in C++ Thank you. The plain text and key
are in seperate .txt files already on computer. The key is in

Please program in C++ Thank you. The plain text and key are in seperate .txt files already on computer. The key is in binary. needed for program: Encryption: encrypt a plain text file by XORing it with the key file - create an array for the ASCII characters that can be printed for the plain text file and the key file - read the plain text file and the key file write to the ciphertext file in binary Decryption: (assume key and key length are unknown) - find length of the key. you can guess on how long you think it is. ex. maxlength = 10 - try every key length up until the max. (every key length has one summation of Pi squared) - create a function to calculate Pi squared ex. int A[128]; (L = key length) Pi square (A[ ], L, "filename) create a function to calculate the distribution ex. double dist (maxlength]; void calc distribution (dist [], A[], L, filename) - read the ciphertext and sample L - find the max distribution (that is the key) can then use xor to get plaintext by XORing ciphertext and key. ex. p = c^k Vigenre cipher program: I need a C++ program that encrypts plaintext with the key by using XOR. Once the cipher text is created, it needs to be decrypted by first finding the key length and then finding each key character. Then use the key to decrypt the text using XOR. Read key from key.txt (binary) and message from ptext.txt (ASCII) Output cipher text to ctext.txt (binary)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!