m033 Des
m033 Des
DES Decryption
As with any Feistel cipher, decryption uses the same algorithm as encryption, except that the application of the subkeys
is reversed. Additionally, the initial and final permutations are reversed.
Properties
Two desired properties of a block cipher are the avalanche effect and the completeness.
Avalanche Effect
Avalanche effect means a small change in the plaintext (or key) should create a significant change in the ciphertext.
DES has been proved to be strong with regard to this property.
Completeness effect
Completeness effect means that each bit of the ciphertext needs to depend on many bits on the plaintext. The diffusion
and confusion produced by P-boxes and S-boxes in DES, show a very strong completeness effect.
Design Criteria
The design of DES was revealed by IBM in 1994. Many tests on DES have proved that it satisfies some of the required
criteria as claimed. We briefly discuss some of these design issues.
S-Boxes
The design provides confusion and diffusion of bits from each round to the next. According to this revelation and some
research, we can mention several properties of S-boxes.
1. The entries of each row are permutations of values between 0 and 15.
2. S-boxes are non-linear.
3. If we change a single bit in the input, two or more bits will be changed in the output.
4. If two inputs to an S-box differ only in two middle bits (bits 3 and 4), the output must differ in at least two bits. In
other words, S(x) and S(x ⊕ 001100) must differ in at least two bits where x is the input and S(x) is the output.
5. If two inputs to an S-box differ in the first two bits (bits 1 and 2) and are the same in the last two bits (5 and 6), the
two outputs must be different. In other words, we need to have the following relation S(x) ≠ S(x ⊕ 11bc00), in which b
and c are arbitrary bits.
6. There are only 32 6-bit input-word pairs (xi and xj), in which xi ⊕ xj ≠ (000000)2. These 32 input pairs create 32 4-
bit output-word pairs. If we create the difference between the 32 output pairs, d = yi ⊕ yj, no more than 8 of these d’s
should be the same.
7. A criterion similar to # 6 is applied to three S-boxes. 8. In any S-box, if a single input bit is held constant (0 or 1) and
the other bits are changed randomly, the differences between the number of 0s and 1s are minimized.
P-Boxes
Between two rows of S-boxes (in two subsequent rounds), there are one straight P-box (32 to 32) and one expansion P-
box (32 to 48). These two P-boxes together provide diffusion of bits. The following criteria were implemented in the
design of P-boxes to achieve this goal:
1. Each S-box input comes from the output of a different S-box (in the previous round).
2. No input to a given S-box comes from the output from the same box (in the previous round).
3. The four outputs from each S-box go to four different S-boxes (in the next round).
4. No two output bits from an S-box go to the same S-box (in the next round).
5. For each S-box, the two output bits go to the first or last two bits of an S-box in the next round. The other two output
bits go to the middle bits of an S-box in the next round.
6. If an output bit from Sj goes to one of the middle bits in Sk (in the next round), then an output bit from Sk cannot go
to the middle bit of Sj. If we let j = k, this implies that none of the middle bits of an S-box can go to one of the middle
bits of the same S-box in the next round.
Number of Rounds
DES uses sixteen rounds of Feistel ciphers. It has been proved that after eight rounds, each ciphertext is a function of
every plaintext bit and every key bit; the ciphertext is thoroughly a random function of plaintext and ciphertext.
DES Weaknesses
During the last few years critics have found some weaknesses in DES.
P-boxes
One mystery and one weakness were found in the design of P-boxes:
1. It is not clear why the designers of DES used the initial and final permutations; these have no security benefits.
2. In the expansion permutation (inside the function), the first and fourth bits of every 4-bit series are repeated.
Weak Keys Four out of 256 possible keys are called weak keys. A weak key is the one that, after parity drop operation
(using Table 6.12), consists either of all 0s, all 1s, or half 0s and half 1s.
MULTIPLE DES
As we have seen, the major criticism of DES regards its key length. With available technology and the possibility of
parallel processing, a brute-force attack on DES is feasible. One solution to improve the security of DES is to abandon
DES and design a new cipher. The second solution is to use multiple (cascaded) instances of DES with multiple keys;
this solution, which has been used for a while, does not require an investment in new software and hardware. We study
the second solution here.
Double DES
The first approach is to use double DES (2DES). In this approach, we use two instances of DES ciphers for encryption
and two instances of reverse ciphers for decryption. Each instance uses a different key, which means that the size of the
key is now doubled (112 bits). However, double DES is vulnerable to a known-plain text attack, known as the Meet-in-
the-as discussed in the next section.
Meet-in-the-Middle Attack
Triple DES
To improve the security of DES, triple DES (3DES) was proposed. This uses three stages of DES for encryption and
decryption. Two versions of triple DES are in use today: triple DES with two keys and triple DES with three keys.
SECURITY OF DES
DES, as the first important block cipher, has gone through much scrutiny. Among the attempted attacks, three are of
interest: brute-force, differential cryptanalysis, and linear cryptanalysis.
Brute-Force Attack
We have discussed the weakness of short cipher key in DES. Combining this weakness with the key complement
weakness, it is clear that DES can be broken using 255 encryptions. However, today most applications use either 3DES
with two keys (key size of 112) or 3DES with three keys (key size of 168). These two multiple-DES versions make
DES resistant to brute-force attacks.
Differential Cryptanalysis
DES is not immune to that kind of attack. However, it has been revealed that the designers of DES already knew about
this type of attack and designed S-boxes and chose 16 as the number of rounds to make DES specifically resistant to
this type of attack. Today, it has been shown that DES can be broken using differential cryptanalysis if we have 247
chosen plaintexts or 255 known plaintexts. Although this looks more efficient than a brute-force attack, finding 247
chosen plaintexts or 255 know plaintexts is impractical. Therefore, we can say that DES is resistant to differential
cryptanalysis. It has also been shown that increasing the number of rounds to 20 require more than 264 chosen
plaintexts for this attack, which is impossible because the possible number of plaintext blocks in DES is only 264.
Linear Cryptanalysis
Linear cryptanalysis is newer than differential cryptanalysis. DES is more vulnerable to linear cryptanalysis than to
differential cryptanalysis, probably because this type of attack was not known to the designers of DES. S-boxes are not
very resistant to linear cryptanalysis. It has been shown that DES can be broken using 243 pairs of known plaintexts.
However, from the practical point of view, finding so many pairs is very unlikely.