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


XOR in ch is just ^ example: str[i] = str [i] ^ key[i]; Exclusive-OR encryption works by using the boolean algebra function exclusive-OR (XOR). XOR is a binary operator (meaning that it takes two arguments similar to the addition sign, for example). By its name, exclusive-Or, it is easy to infer (correctly, no less) that it will return true if one, and only one, of the two operators is true. The truth table is as follows: 1 2 3 4 5 A T T F F B T F T F A XOR B F T (A truth table works like a multiplication or addition table: the top row is one list of possible inputs, the side column is one list of possible inputs. The intersection of the rows and columns contains the result of the operation when done performed with the inputs from each row and column) Write a program to 1. Encrypt a text file using vigenere cipher method 2. Break the ciphertext that was generated using the Vigenre cipher. Assume key and length of the key are unknown. Use Byte wise Vigenere cipher scheme described in the class for encryption and decryption Vigenere Encryption takes a key as an argument and generates a ciphertext file. VigenereBreaking takes a ciphertext file as an input and generates a key file. Use the attached plaintext: USAmendments.txt Submit both, the programs and screenshots of running and output of the programs in a single word/pdf file. We the People of the United States Amendment 1 Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redrens of grievances. Amendment 2 A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed. Amendment 3 No Soldier shall, in time of peace be quartered in any house, without the consent of the Owner, nor in time of war, but in a manner to be prescribed by law. 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) eeeeeeeeee
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
