Example illustrating the Vernam encryption algorithm

This section provides an example illustrating the use of the Vernam encryption algorithm. To make it easier to follow the steps that need to be performed with CrypTool, the example is illustrated with a number of screenshots.

We will open a document, encrypt it and then decrypt it again. To this end we open a document which contains a part of the CrypTool Help text ”Introduction to CrypTool”. As the Vernam encryption algorithm achieves encryption through use of the binary Exclusive-OR logical operation, a document encrypted with the Vernam method can also be decrypted again using the Exclusive-OR. However, in CrypTool this is only the case if the key has a maximum length of 1024 bytes.

The file name of the document to be opened is CrypTool-en.txt. This file is opened via the menu selection File \ Open.

szenariovernam1.gif

As the Vernam encryption algorithm (unlike encryption using the binary Exclusive-OR logical operation) works with a file which contains the key, we need first of all to create a new document by selecting File \ New. The key
Schlüssel für das Vernam Verschlüsselungsverfahren
is now typed into this document.

The document is then saved in a file called Key.Vernam.txt (via menu selection File \ Save As).

szenariovernam2.gif

We now have a key file which can be used for encryption. Now, with the window containing the plaintext version of the document as the active window (this is achieved by clicking on the document with the mouse), select Crypt/Decrypt \ Symmetric (classic) \ Vernam. In the dialog box which opens enter the name of the file that was just saved Key.Vernam.txt as the key file.

szenariovernam3.gif

Clicking on the OK button opens a new window containing the encrypted text.

szenariovernam4.gif

With this window as the active window, decryption is performed in the same way as encryption. Selection of the key file results in the plaintext being displayed once more.

szenariovernam5.gif

We now return to the fact mentioned above, that the Vernam encryption algorithm uses the binary Exclusive-OR method of encryption. Click on the document containing the encrypted text to make it the active window again. Select Crypt/Decrypt \ Symmetric (classic) \ XOR and enter the key into the dialog box which appears. However, the key has to be entered in hexadecimal form The key used here,
Schlüssel für das Vernam Verschlüsselungsverfahren.
has the following hexadecimal representation:

53 63 68 6C FC 73 73 65 6C 20 66 FC 72 20 64 61 73 20 56 65 72 6E 61 6D 20 56 65 72 73 63 68 6C FC 73 73 65 6C 75 6E 67 73 76 65 72 66 61 68 72 65 6E 2E.

These values can be copied to the clipboard and then pasted directly into the dialog box.

szenariovernam5a.gif

Clicking on the OK displays the plaintext.

szenariovernam6.gif

As we see, the plaintext can be obtained by this route as well.