One of the simpler encryption techniques is based on exclusive-ORing (XORing) the plain-text data with a key value. If you do this on a file that has lots of blank space or repeated strings of the same character, it’s very possible to determine the encryption key. By simply re-XORing the repeated areas with their own value, the plain-text values cancel out, leaving the key.
You might think that with such a weakness, XORing against a key value wouldn’t continue to be used. But one advantage of XORing is its extreme speed; XOR is one of the most fundamental computer operations performed.
There are several ways to strengthen an XOR algorithm: