1. Computing

Discuss in my forum

xor (exclusive-or)


xor (exclusive-or): In computer science, an XOR is a mathematical operation that combines two bits. The resulting value is TRUE if either of the two bits is TRUE, but false if both are equal. In cryptography, one generally talks about doing an XOR combining two strings of bits: plaintext 11100101 01110101key 00001111 00001111 ------------------ciphertext 11101010 01111010XOR has the interesting property that XORing by the same pattern twice results in the original pattern: ciphertext 11101010 01111010key 00001111 00001111 ------------------plaintext 11100101 01110101Therefore, you can think of XOR as an extremely weak encryption algorithm. The above example shows using XOR as a way of encrypting the original data with the 8-bit key of "00001111". Many products use this technique to obfuscate data. However, it is extremely easy to recover the original key via a known plaintext attack, as show below: ciphertext 11101010 01111010plaintext 11100101 01110101 ------------------key 00001111 00001111Key point: XOR is a common mathematical operation used in cryptographic algorithms. In fact, the only 100% secure form of encryption is XORing against a one-time pad. Also, any hash algorithm can be converted into an encryption algorithm though a clever use of XOR. From Hacking-Lexicon

* Linux/Unix/Computing Glossary Index

Related Video
Create Bullet, Number, and Definition Lists in HTML

©2014 About.com. All rights reserved.