Gilbert Vernam - The Vernam Cipher

The Vernam Cipher

In modern terminology, a Vernam cipher is a symmetrical stream cipher in which the plaintext is combined with a random or pseudorandom stream of data (the "keystream") of the same length, to generate the ciphertext, using the Boolean "exclusive or" (XOR) function. This is symbolised by ⊕ and is represented by the following "truth table", where + represents "true" and - represents "false".

INPUT OUTPUT
A B AB
- - -
- + +
+ - +
+ + -

Other names for this function are: Not equal (NEQ), modulo 2 addition (without 'carry') and modulo 2 subtraction (without 'borrow').

The cipher is reciprocal in that the identical keystream is used both to encipher plaintext to ciphertext and to decipher ciphertext to yield the original plaintext:

Plaintext ⊕ Key = Ciphertext

and:

Ciphertext ⊕ Key = Plaintext

If the keystream is truly random and used only once, this is effectively a one-time pad. Substituting pseudorandom data generated by a cryptographically secure pseudo-random number generator is a common and effective construction for a stream cipher. RC4 is an example of a Vernam cipher that is widely used on the Internet.

If, however, the keystream is used for two messages, known to cryptanalysts as a depth, the effect of the keystream can be eliminated, leaving the two plaintexts XORed together. The result is equivalent to a Running key cipher and the two plaintexts may be separated by linguistic cryptanalytical techniques.

Ciphertext1 ⊕ Ciphertext2 = Plaintext1 ⊕ Plaintext2

An operator's mistake of this sort famously allowed the Cryptanalysis of the Lorenz cipher by the British at Bletchley Park during World War II. They diagnosed how the keystream was generated, worked out how to break the cipher, and read vast quantities of high-level messages to and from German high command without ever seeing an actual Lorenz machine.

Read more about this topic:  Gilbert Vernam

Famous quotes containing the word cipher:

    The eye is the first circle; the horizon which it forms is the second; and throughout nature this primary figure is repeated without end. It is the highest emblem in the cipher of the world.
    Ralph Waldo Emerson (1803–1882)