I have heard about people starting encryption and thought it may be something I would like, so I checked XOR and can't make any sense of it. So can someone explain to me what XOR is ?
you take a key, such as 0101, then you use that to XOR your string (in binary format) to achieve an encrypted string.
0101 XOR <-- key
1011 <---- original message
----
1110 <-- send message
You send 1110 to your receiver. That receiver, then takes the received string and XORs it with the key to obtain the original message:
1110 XOR <--- received message
0101 <-- key
----
1011 <--- original message
XOR, or 'exclusive or' is a 2 operand logical operation defined as:
(a and b) or (not a and not b)
a b result
0 0 0
1 0 1
0 1 1
1 1 0
The critical feature of XOR with respect to encryption is it is reversible, ie where C = A XOR B, then you can get back A using A = C XOR B.
So for a stream of plaintext A, and a key of the same length B, you can generate cryptotext C, and send that to the recipient.
The recipient, who has a copy of B in his safe, can do C XOR B and regenerate A.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With