Data Encryption Standard (DES)
Data Encryption Standard (DES)
Data Encryption Standard (DES)
(DES)
6.1
Chapter 6
Objectives
❏ To analyze DES
6.2
6-1 INTRODUCTION
6.3
6.1.1 History
6.4
6.1.2 Overview
6.5
6-2 DES STRUCTURE
6.7
6.2.1 Initial and Final Permutations
6.8
6.2.1 Continue
6.9
6.2.1 Continued
Example 6.1
Find the output of the initial permutation box when the input
is given in hexadecimal as
as::
Solution
Only bit 25 and bit 64 are 1s; the other bits are 0s. In the final
permutation, bit 25 becomes bit 64 and bit 63 becomes bit 15 15..
The result is
6.10
6.2.1 Continued
Example 6.2
Prove that the initial and final permutations are the inverse
of each other by finding the output of the final permutation if
the input is
Solution
The input has only two 1s; the output must also have only two
1s. Using Table 6.1, we can find the output related to these
two bits
bits.. Bit 15 in the input becomes bit 63 in the output
output.. Bit
64 in the input becomes bit 25 in the output
output.. So the output
has only two 1s, bit 25 and bit 63
63.. The result in hexadecimal is
6.11
6.2.1 Continued
Note
6.12
6.2.2 Rounds
Figure 6.4
A round in DES
(encryption site)
6.13
6.2.2 Continued
DES Function
The heart of DES is the DES function. The DES function
applies a 48-bit key to the rightmost 32 bits to produce a
32-bit output.
Figure 6.5
DES function
6.14
6.2.2 Continue
Expansion P-box
Since RI−1 is a 32-bit input and KI is a 48-bit key, we first
need to expand RI−1 to 48 bits.
6.15
6.2.2 Continue
6.16
6.2.2 Continue
XOR Operation
After the expansion permutation, DES uses the XOR
operation on the expanded right section and the round
key. Note that both the right section and the key are 48-
bits in length. Also note that the round key is used only in
this operation.
6.17
6.2.2 Continue
S-Boxes
The S-boxes do the real mixing (confusion). DES uses 8
S-boxes, each with a 6-bit input and a 4-bit output. See
Figure 6.7.
6.18
6.2.2 Continue
6.19
6.2.2 Continue
Table 6.3 shows the permutation for S-box 1. For the rest
of the boxes see the textbook.
6.20
6.2.2 Continued
Example 6.3
Solution
If we write the first and the sixth bits together, we get 11 in
binary, which is 3 in decimal
decimal.. The remaining bits are 0001 in
binary, which is 1 in decimal
decimal.. We look for the value in row 3,
column 1, in Table 6.3 (S
(S--box 1). The result is 12 in decimal,
which in binary is 1100
1100.. So the input 100011 yields the output
1100..
1100
6.21
6.2.2 Continued
Example 6.4
Solution
If we write the first and the sixth bits together, we get 00 in
binary, which is 0 in decimal
decimal.. The remaining bits are 0000 in
binary, which is 0 in decimal
decimal.. We look for the value in row 0,
column 0, in Table 6.10 (S(S--box 8). The result is 13 in decimal,
which is 1101 in binary
binary.. So the input 000000 yields the output
1101..
1101
6.22
6.2.2 Continue
Straight Permutation
6.23
6.2.3 Cipher and Reverse Cipher
First Approach
To achieve this goal, one approach is to make the last
round (round 16) different from the others; it has only a
mixer and no swapper.
Note
6.25
6.2.3 Continued
6.26
6.2.3 Continued
6.27
6.2.3 Continued
6.28
6.2.3 Continued
6.29
6.2.3 Continued
Alternative Approach
We can make all 16 rounds the same by including one
swapper to the 16th round and add an extra swapper after
that (two swappers cancel the effect of each other).
Key Generation
The round-key generator creates sixteen 48-bit keys out
of a 56-bit cipher key.
6.30
6.2.3 Continued
Figure 6.10
Key generation
6.31
6.2.3 Continued
6.32
6.2.3 Continued
6.33
6.2.3 Continued
6.34
6.2.3 Continued
6.35
6.2.4 Examples
Example 6.5
We choose a random plaintext block and a random key, and
determine what the ciphertext block would be (all in
hexadecimal)::
hexadecimal)
6.36
6.2.4 Continued
Example 6.5 Continued
6.37
6.2.4 Continued
Example 6.6
Let us see how Bob, at the destination, can decipher the
ciphertext received from Alice using the same key
key.. Table 6.16
shows some interesting points
points..
6.38
DES Round Structure
6-3 DES ANALYSIS
6.40
6.3.1 Properties
Example 6.7
To check the avalanche effect in DES, let us encrypt two
plaintext blocks (with the same key) that differ only in one bit
and observe the differences in the number of bits in each
round..
round
6.41
6.3.1 Continued
Example 6.7 Continued
6.42
6.3.1 Continued
Completeness effect
Completeness effect means that each bit of the ciphertext
needs to depend on many bits on the plaintext.
6.43
6.3.2 Design Criteria
S-Boxe
The design provides confusion of bits from each round to
the next.
P-Boxes
They provide diffusion of bits.
Number of Rounds
DES uses sixteen rounds of Feistel ciphers. the ciphertext
is thoroughly a random function of plaintext and
ciphertext.
6.44
6.3.3 DES Weaknesses
6.45
6.3.3 Continued
Example 6.8
Let us try the first weak key in Table 6.18 to encrypt a block
two times
times.. After two encryptions
with the same key the original plaintext block is created
created.. Note
that we have used the encryption algorithm two times, not
one encryption followed by another decryption
decryption..
6.46
6.3.3 Continued
6.47
6.3.3 Continued
6.48
6.3.3 Continued
6.49
6.3.3 Continued
6.50
6.3.3 Continued
Example 6.9
DES has a key domain of 256. The total number of the above
keys are 64 (4 + 12 + 4848)). The probability of choosing one of
these keys is 8.8 × 10−16, almost impossible
impossible..
6.51
6.3.3 Continued
6.52
6.3.3 Continued
Example 6.10
6.53
6-4 Multiple DES
6.54
6-4 Continued
A substitution that maps every possible input to every
possible output is a group
group..
Figure 6.13 Composition of mapping
6.55
6.4.1 Double DES
6.56
6.4.1 Continued
Figure 6.14 Meet-in-the-middle attack for double DES
6.57
6.4.1 Continued
6.58
6.4.2 Triple DES
Figure 6.16 Triple DES with two keys
6.59
6.4.2 Continuous
6.60
6-5 Security of DES
6.61
6.5.1 Brute-Force Attack
6.62
6.5.2 Differential Cryptanalysis
6.63
Differential Cryptanalysis
6.68
Linear Cryptanalysis