XOR encryption

The binary operation exclusive OR (XOR) is a binary operand from Boole algebra. This operand will compare two bits and will produce one bit in return:

  • Two bits that are equal: 0
  • Two bits that are different: 1

This is the opposite to binary. For example, we are going to use the word tread in ASCII format and then we are going to insert a key using the word hello so that we can complete an XOR operation. See the following diagram:

Figure 10: XOR

XOR encryption is commonly used with AES, several symmetric ciphers, and a one-time pad.

Get CompTIA Security+ Certification Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.