On 15 May 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:
In late 1974, IBM proposed "Lucifer", which, thanks to the NSA (National Security Agency), was modified on 23 November 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).
It is a symmetric encryption system that uses 64bit 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 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 made of 16 blocks of 4 bits, generally denoted k_{1} to k_{16}. Given that "only" 56 bits are actually used for encrypting, there can be 2^{56} (or 7.2*10^{16}) different keys!
The main parts of the algorithm are as follows:
Firstly, each bit of a block is subject to initial permutation, which can be represented by the following initial permutation (IP) table:
IP 

This permutation table shows, when reading the table from left to right then from top to bottom, that the 58^{th} bit of the 64bit block is in first position, the 50^{th} in second position and so forth.
Once the initial permutation is completed, the 64bit block is divided into two 32bit blocks, respectively denoted L and R (for left and right). The initial status of these two blocks is denoted L_{0} and R_{0}:
L_{0} 

R_{0} 

It is interesting to note that L_{0} contains all bits having an even position in the initial message, whereas R_{0} contains bits with an odd position.
The L_{n} and R_{n} 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 R_{0} block are expanded to 48 bits thanks to a table called an expansion table (denoted E), in which the 48 bits are mixed together and 16 of them are duplicated:
E 

As such, the last bit of R_{0} (that is, the 7^{th}
bit of the original block) becomes the first, the first becomes the second, etc.
In addition, the bits 1,4,5,8,9,12,13,16,17,20,21,24,25,28 and 29 of R_{0} (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.
The resulting 48bit table is called R'_{0} or E[R_{0}]. The DES algorithm then exclusive ORs the first key K_{1} with E[R_{0}]. The result of this exclusive OR is a 48bit table we will call R_{0} out of convenience (it is not the starting R_{0}!).
R_{0} is then divided into 8 6bit blocks, denoted R_{0i}. Each of these blocks is processed by selection functions (sometimes called
substitution boxes or compression functions), generally denoted S_{i}.
The first and last bits of each R_{0i} 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 4by16 table:
S_{1} 

Let R_{01} equal 101110. 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 binary.
Each of the 8 6bit 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:
S_{2} 

S_{3} 

S_{4} 

S_{5} 

S_{6} 

S_{7} 

S_{8} 

Each 6bit block is therefore substituted in a 4bit block. These bits are combined to form a 32bit block.
The obtained 32bit block is then subject to a permutation P here is the table:
P 

All of these results output from P are subject to an Exclusive OR with the starting L_{0} (as shown on the first diagram) to give R1, whereas the initial R_{0} gives L_{1}.
All of the previous steps (rounds) are repeated 16 times.
At the end of the iterations, the two blocks L_{16} and R_{16} are rejoined, then subject to inverse initial permutation:
IP1 

The output result is a 64bit ciphertext!
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 64bit key (made of any 64 alphanumeric characters), 8 different 48bit 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 PC1 whose table is presented below:
PC1 

This table may be written in the form of two tables L_{i} and R_{i} (for left and right) each made of 28 bits:
L_{i} 

R_{i} 

The result of this first permutation is denoted L_{0} and R_{0}.
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 2 28bit blocks are then grouped into one 56bit block. This passes through a permutation, denoted PC2, giving a 48bit block as output, representing the key K_{i}.
PC2 

Repeating the algorithm makes it possible to give the 16 keys K_{1} to K_{16} used in the DES algorithm.
LS 

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 56bit key gives an enormous amount of possibilities, many processors can compute more than 10^{6} 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 shortterm solution involves catenating three DES encryptions using two 56bit keys (which equals one 112bit key). This process is called Triple DES, denoted TDES (sometimes 3DES or 3DES).
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:
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 5 years. In 2000, during the most recent revision, after an evaluation process that lasted for 3 years, the algorithm that was jointly designed by two Belgian candiates, 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.