This section provides an example which illustrates the use of the Triple-DES encryption algorithm in CBC mode. To make it easier to follow the steps that need to be performed with CrypTool, the example is illustrated with a number of screenshots.
The use of the Triple-DES encryption algorithm in CBC mode for encryption and decryption will be demonstrated as applied to a text document. Furthermore, it will be shown using the frequency distribution and autocorrelation of the letters in the encrypted document that an attack on Triple-DES encryption in CBC mode is more difficult than an attack on the classical encryption algorithms. On this point, see the examples provided for the Caesar encryption algorithm or encryption through binary addition. It is possible to work out a key using a Brute Force attack, provided that it is short, or that the set out of which the key originates does not contain many keys.
First of all we load a part of the Help text for CrypTool, ”Introduction to CrypTool”, which is contained in the CrypTool-en.txt
file. To open this document in CrypTool, select File \ Open.
Before the document is encrypted, let us have a look at the frequency distribution of the characters in the histogram (accessed via Analysis \ General \ Histogram).
To encrypt the document using Triple-DES encryption in CBC mode, we now select Crypt/Decrypt \ Symmetric (classic) \ Triple DES (CBC). We enter 12
34
AB
CD
into the dialog box as the key.
This causes a window containing the encrypted document to open.
We now obtain a histogram of the encrypted document.
This bears no resemblance at all to the histogram of the unencrypted document as, for example, was the case in the example we used to illustrate the Caesar encryption algorithm.
The autocorrelation of the encrypted document is calculated by selecting Analysis \ General \ Autocorrelation.
The autocorrelation exhibits no regularity which could provide a clue as to the key length, as, for example, was the case in the example of encryption using binary addition.
Decryption of an encrypted document functions like encryption except that the Decrypt field must be selected in the dialog box.
A click on the OK button produces a new window containing the plaintext.
Having seen how encryption and decryption work, we want to determine the key from the encrypted document using a Brute Force attack.
To do this, first of all we return to the encrypted document.
We now select Analysis \ Symmetric \ Triple DES (CBC). In the dialog box which appears, we enter ** ** AB CD as the range to be searched through(see also the Key range dialog box.
The Brute Force attack is initiated by clicking on the OK button or pressing the RETURN key. After CrypTool has searched through the range of keys, a dialog box opens with the key it has found.
User confirmation results in decryption of the encrypted document. As the correct key has been found, our original plaintext is restored.