Which works just fine, like: string ciphertext = XOR('test', '1234'); will return the ciphertext and when decrypting:string plaintext = XOR(ciphertext, '1234'); it will return 'test'. So, I wanted to create an algorithm that would break the xor cipher by brute forcing, so basically trying to decrypt the ciphertext with every possible key.
![Brute Brute](/uploads/1/2/4/1/124154655/683588093.png)
This project evolved from my time in the Cyber Security class at Marshall University. The goal was to create an implementation of a simple encryption scheme as well as brute force methods for decrypting the ciphertext without the original key. To use it:. Select a text file as the active file for encryption/decryption. Enter your choice of operation. If the file has been previously encrypted, you can decrypt it as long as you know the key. If you don’t know the key to an encrypted file, select the brute force method to have the program try all possible combinations to detemine which key was originally used to decrypt the file.This program uses a wordlist of more than 58,000 words from the English language when brute forcing, which is parsed into a java TreeSet for maximum speed.
As such, a text file containing words to match it to is required. I’ve used the one found at this link.