Hi everyone, I’m having a problem with a challenge. Basically I have two encrypted messages and a message I know its clear text. Documenting myself on the network I discovered the attack xor with spread in clear. I’m trying to write the resolution in python but I’m having some problems. For the moment, I wrote this down:
encrypted_message = “655d5c4a185c4618584143155b5c4f19155a42585d50411448475a575114545b564b41454151585a114656515d5850”.encode()
respective_plaintext = “This is our new, bullet-proof encryption scheme”.encode()
Now, how do I get the key? I wrote:
key = encrypted_message ^ respective_plaintext but I get this error: TypeError: unsupported operand type (s) for : ‘bytes’ and ‘bytes’
I turned the two messages into bytes and then tried to do the XOR to find the key.
Then, knowing the key, I would like to make the XOR of the key with the other encrypted message so that I can discover the message in clear.
Can you help me please? Thank you very much