Attacking one-time pad reuse
The concept of a one-time pad was a fundamental core to early cryptography. Basically, a phrase is memorized by the various parties and when a message is sent, it is shifted with that phrase for each step. For example, if the phrase is apple
and the message is i like them
, then we add a
to i
to get j
and so on to eventually receive the encoded message.
More recently, a lot of malware engineers and bad software engineers used XORing to perform the same activity. Where the vulnerability lies and where we can create scripts to be useful is where the same key has been used multiple times. If multiple ascii-based strings have been XORed with the same ascii-based strings, we can brute the strings at the same time by XORing all of them with ascii values character by character.
The following script will take a list of XORed values from a file and brute them character by character.
Getting ready
Put a list of XORed phrases in a file. Place that file in the same folder as...