Exlusive-or crypting
-
Ever1234 wrote: Anyone care to clear this up for me? An OR returns 1 if either of two binary values is 1, an XOR returns 1 if one and only one value is 1. What else did you want to know ? Christian I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOz
I live in Bob's HungOut now
-
Exclusive or is the binary equivalent of the old "chinese addition" used by the spies of old, which involves adding digits but ignoring any "carry" numbers. So you'd get (with the decimal version) 29232 + 56299 = 75421 the binary version would go like: 1011110 xor 0111010 = 1100101 It allows your data to be combined with a random stream of numbers so that it can be easilly retrieved by someone who has the same random stream of numbers. The convenience is that if you xor twice with the same data you get back to the original. This, of course, is the easy bit. The hard part is to ensure that the sender and the intended recipient have the same encoding stream and the bad guys don't. In the old days the spies had "one time pads", basically pages of random numbers which they had to smuggle physically and which they were supposed to destroy after use. These days we tend to generate pseudo-random sequences from seed codes like pass phrases.