after XOR operation find C (and XOR reversability)

Posted by Jason z on Stack Overflow See other posts from Stack Overflow or by Jason z
Published on 2010-05-28T18:37:27Z Indexed on 2010/05/28 18:41 UTC
Read the original article Hit count: 331

Filed under:
|

Assume:

unsigned char A = 10;
unsigned char B = 11;
unsigned char C = 12;


unsigned char Diff1 = A ^ B;
unsigned char Diff2 = B ^ C;

//find any of A or B or C using Diff1 and Diff2

Question is: There were 3 values initially for which we found 2 differences. Is there any way we can find any if A or B or C using 2 differences Diff1 and Diff2?

I know XOR is not reversible unless you know the key, but keeping in view that unsigned __int8 is 0...255 maximum 256 different values.

stay well.

© Stack Overflow or respective owner

Related posts about c++

Related posts about xor