https://en.wikipedia.org/wiki/XOR_cipher If you xor data with a key and get ciphertext, to decrypt it, just xor it again with the same key. However, in order to decrypt it, you will need to know the key that was used to encrypt it.