Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XOR reversibility operation question

I have heard somewhere that using XOR is not reversible (they spoke about encryption) but I do not understand how it was meant? AFAIK even with OR operation you cannot find out which of the two bits was 1. Please, could anyone who knows how it was meant explain it to me? Thank you

like image 346
Snake Avatar asked Feb 24 '10 14:02

Snake


2 Answers

if you do

z = x XOR y

then

x = z XOR y

so yes its reversible

like image 145
Peter Avatar answered Oct 06 '22 08:10

Peter


I think you have probably misquoted them slightly.

They probably meant that using a one-time pad is unbreakable because unless you have a copy of the one time pad there is absolutely no information in the ciphertext that you can use to recover the plaintext. You cannot use statistical analysis or even a brute-force search because all inputs could give the output with equal probability and there's no way to know which input is the right one.

One-time pads are typically implemented using XOR, but the irreversibility is because it is a one time pad, not because of the XOR operation.

like image 20
Mark Byers Avatar answered Oct 06 '22 08:10

Mark Byers