On May 15, 1973, the NBS
(National Bureau of Standards
, now called NIST
(National Institute of Standards and Technology
) published a request in the Federal Register
for an encryption algorithm that would meet the following criteria: have a high security level related to a small key used for encryption and decryption; be easily understood; not depend on the algorithm's confidentiality; be adaptable and economical; and be efficient and exportable.
In late 1974, IBM proposed "Lucifer", which was modified on November 23, 1976 to become the DES
(Data Encryption Standard
). The DES was approved by the NBS in 1978. The DES was standardized by the ANSI
(American National Standard Institute
) under the name of ANSI X3.92
, better known as DEA
(Data Encryption Algorithm
Principle of the DES
The DES is a symmetric encryption system that uses 64-bit blocks, 8 bits
(one octet) of which are used for parity checks (to verify the key's integrity). Each of the key's parity bits (1 every 8 bits) is used to check one of the key's octets by odd parity; that is, each of the parity bits is adjusted to have an odd number of '1's in the octet that it belongs to. The key, therefore, has a "useful" length of 56 bits, which means that only 56 bits are actually used in the algorithm.
The algorithm involves carrying out combinations, substitutions, and permutations between the text to be encrypted and the key, while making sure the operations can be performed in both directions (for decryption). The combination of substitutions and permutations is called a product cipher
The key is ciphered on 64 bits and is made of 16 blocks of 4 bits, generally denoted k1
. Given that only 56 bits are actually used for encrypting, there can be 256
) different keys.
The DES Algorithm
The main parts of the algorithm are as follows: fractioning of the text</a> into 64-bit (8 octet) blocks; initial permutation of blocks; breakdown of the blocks into two parts: left and right, named L
; permutation and substitution steps repeated 16 times (called rounds
); and re-joining of the left and right parts then inverse initial permutation.
Fractioning of the Text
Firstly, each bit of a block is subject to initial permutation, which can be represented by the following initial permutation (IP
This permutation table, when read from left to right, then from top to bottom, shows that the 58th
bit of the 64-bit block is in first position, the 50th
is in the second position, and so forth.
Division into 32-Bit Blocks
Once the initial permutation is completed, the 64-bit block is divided into two 32-bit blocks, respectively denoted L
(for left and right). The initial status of these two blocks is denoted L0
It is noteworthy that L0
contains all bits having an even position in the initial message, whereas R0
contains bits with an odd position
blocks are subject to a set of repeated transformations called rounds
, shown in this diagram, and the details of which are given below:
The 32 bits of the R0
block are expanded to 48 bits, thanks to a table called an expansion table
), in which the 48 bits are mixed together and 16 of them are duplicated:
As such, the last bit of R0
(that is, the 7th
bit of the original block) becomes the first, the first becomes the second, and so on.
In addition, bits 1, 4, 5, 8, 9, 12, 13, 16, 17, 20, 21, 24, 25, 28, and 29 of R0
(respectively 57, 33, 25, l, 59, 35, 27, 3, 6l, 37, 29, 5, 63, 39, 31, and 7 of the original block) are duplicated and scattered in the table.
Exclusive OR with the Key
The resulting 48-bit table is called R0
]. The DES algorithm then exclusive ORs
the first key K1
]. The result of this exclusive OR is a 48-bit table we will call R0
out of convenience (it is not the starting R0
is, then, divided into 8 6-bit blocks, denoted R0i
. Each of these blocks is processed by selection functions
(sometimes called substitution boxes
or compression functions
), generally denoted Si
The first and last bits of each R0i
determine (in binary value) the line of the selection function; the other bits (respectively 2, 3, 4, and 5) determine the column. As the selection of the line is based on two bits, there are 4 possibilities (0, 1, 2, 3). As the selection of the column is based on 4 bits, there are 16 possibilities (0 to 15). Thanks to this information, the selection function "selects" a ciphered value of 4 bits.
Here is the first substitution function, represented by a 4-by-16 table:
. The first and last bits give 10
, that is, 2 in binary value. The bits 2, 3, 4, and 5 give 0111
, or 7 in binary value. The result of the selection function is therefore the value located on line no. 2, in column no. 7. It is the value 11
, or 111
Each of the 8 6-bit blocks is passed through the corresponding selection function, which gives an output of 8 values with 4 bits each. Here are the other selection functions:
Each 6-bit block is, therefore, substituted in a 4-bit block. These bits are combined to form a 32-bit block.
The obtained 32-bit block is, then, subject to a permutation P
. Here is the table:
All of these results output from P
are subject to an Exclusive OR
, with the starting L0
(as shown on the first diagram) to give R1, whereas the initial R0
All of the previous steps (rounds
) are repeated 16 times.
Inverse Initial Permutation
At the end of the iterations, the two blocks L16
are re-joined, then subject to inverse initial permutation:
The output result is a 64-bit ciphertext.
Generation of Keys
Given that the DES algorithm presented above is public, security is based on the complexity of encryption keys.
The algorithm below shows how to obtain, from a 64-bit key (made of any 64 alphanumeric characters), 8 different 48-bit keys each used in the DES algorithm:
Firstly, the key's parity bits are eliminated so as to obtain a key with a useful length of 56 bits.
The first step is a permutation denoted PC-1
whose table is presented below:
This table may be written in the form of two tables Li
(for left and right) each made of 28 bits:
The result of this first permutation is denoted L0
These two blocks are, then, rotated to the left, such that the bits in second position take the first position, those in third position take the second, etc.
The bits in first position move to last position.
The two 28-bit blocks are, then, grouped into one 56-bit block. This passes through a permutation, denoted PC-2
, giving a 48-bit block as output, representing the key Ki
Repeating the algorithm makes it possible to give the 16 keys K1 to K16 used in the DES algorithm.
TDES, an Alternative to the DES
In 1990, Eli Biham and Adi Shamir developed differential cryptanalysis, which searches for plaintext pairs and ciphertext pairs. This method works with up to 15 rounds, while 16 rounds are present in the algorithm presented above.
Moreover, while a 56-bit key gives an enormous amount of possibilities, many processors can compute more than 106
keys per second; as a result, when they are used at the same time on a very large number of machines, it is possible for a large body (a State for example) to find the right key.
A short-term solution involves catenating three DES encryptions using two 56-bit keys (which equals one 112-bit key). This process is called Triple DES
, denoted TDES
TDES is much more secure than DES, but it has the major disadvantage of also requiring more resources for encryption and decryption.
Several types of triple DES encryption are generally recognized: DES-EEE3: 3 DES encryptions with 3 different keys; DES-EDE3: a different key for each of the 3 DES operations (encryption, decryption, encryption); and DES-EEE2 and DES-EDE2, a different key for the second operation (decryption).
In 1997, NIST
launched a new call for projects to develop the AES
(Advanced Encryption Standard
), an encryption algorithm intended to replace the DES.
The DES encryption system was updated every five years. In 2000, during the most recent revision, after an evaluation process that lasted for three years, the algorithm that was jointly designed by two Belgian candidates Sirs Vincent Rijmen and Joan Daemen was chosen as the new standard by NIST. This new algorithm, named RIJNDAEL
by its inventors, will replace the DES from now on.
Image: © Signs and Symbols - Shutterstock.com
Latest update on June 19, 2018 at 07:09 PM by owilson.