Binary Exclusive-OR (Menu Crypt/Decrypt \ Symmetric (classic))

The key for this encryption algorithm consists of a sequence of bits. It is entered in the key entry dialog.

The key is combined bit by bit with the bits of the plaintext by means of an exclusive-OR (XOR). As with encryption using Vigenère, byte addition and Vernam the key is applied cyclically.

Decryption works in the same way, i.e. the exclusive-OR operation has to be repeated. The XOR operation is a mapping which is equal to its inverse (involution). This means that a = ((a XOR b) XOR b) applies for any boolean values a and b. This can be easily checked using the function table provided below.

The exclusive-OR works out a new boolean value from two boolean values (FALSE = 0 and TRUE = 1). The table below shows all possibilities:

a

b

a XOR b

0

0

0

0

1

1

1

0

1

1

1

0


Thus if both boolean values are different, the exclusive-OR delivers the boolean value TRUE, otherwise FALSE.

The key entry dialog allows to enter only 2048 hex digits (1024 bytes). You can enter longer keys using a file: See the Vernam encryption.

Analysis

If one knows the characters which occur most frequently in the plaintext, it is then possible to work out the key (and hence also the plaintext) with the aid of a computer (see Automatic analysis for exclusive-OR).

This encryption algorithm can be broken easily with a Ciphertext only attack (see Automatic analysis for exclusive-OR). An example of this can be found in the Examples chapter.