Given k ciphertexts encrypted using a OTP style stream cipher using the same key, decrypt the k+1th ciphertext.
- exploit-two-time-pad.py - the main script
- ciphers.txt - txt file to enter ciphertexts one per line
- target.txt - target ciphertext to decrypt
- decrypt.txt - output file for the decrypted message.
The key is guessed using:
- Given two ciphertexts c1 and c2 for plaintext messages m1 and m2 respectively, c1 xor c2 gives m1 xor m2.
- For any character c in [a-zA-Z], c xor (space) reverses the case of the character.