Des
Des
In 1973, NBS (NIST) issues a public request for proposals for a national
cipher standard, which must be
Secure
Public
Completely specified
Easy to understand
Available to all users
Economic and efficient in hardware
Able to be validated
Exportable
IBM submitted LUCIFER (Feistel) (which was redesigned to become
the DES)
In 1977, adopted by NBS (NIST) as DES (Data Encryption Standard,
Federal Information Processing Standard 46 (FIPS PUB 46))
DES History
Chronolgy
1973: NBS publishes a first request for a standard encryption algorithm
1974: NBS publishes a second request for encryption algorithms
1975: DES is published in the Federal Register for comment
1976: First and second workshop on DES
1976: DES is approved as a standard
1977: DES is published as a FIPS standard FIPS PUB 46
1983: DES reaffirmed for the first time
1986: Videocipher II, a TV satellite scrambling system based upon DES
begins use by HBO
1988: DES is reaffirmed for the second time as FIPS 46-1, superseding
FIPS PUB 46
1992: Biham and Shamir publish the first theoretical attack with less
complexity than brute force: differential cryptanalysis. However, it requires
an unrealistic 247 chosen plaintexts
1993: DES is reaffirmed for the third time as FIPS 46-2
DES History
1994: The first experimental cryptanalysis of DES is performed using
64-bit Plaintext
Initial Permutation
Iteration 1
Iteration 2
Iteration 16
32-bit Swap
64-bit Ciphertext
Permuted Choice 1
K1
K2
K16
Permuted Choice 2
Permuted Choice 2
Permuted Choice 2
Problem No. 1
Find the output of the initial permutation box when the input is given in
hexadecimal as:
Input has only two 1s (Bit 15 and bit 64): the output must also have only two
1s(the nature straight permutation).
The bit 15 in the input becomes bit 63 in the output. Bit 64 in the input
becomes bit 25 in the output. So the output has only two 1s, bit 25 and bit 63.
6.2.1 Continued
Problem No. 2
Problem No. 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 bit 25 in the input becomes bit 64 in the output. Bit 63 in the input
becomes bit 15 in the output. So the output has only two 1s, bit 15 and bit 64.
DES Contd.
Ri-1
32 bits Li
32 bits Ri
Ri-1
32 bits Li
32 bits Ri
32 bits
28 bits
28 bits
Li-1
Ri-1
Ci-1
Di-1
Left Shift(s)
Left Shift(s)
32 bits
Expansion
Permutation
(E-Table)
48 bits
XOR
48 bits
Permutation Choice
(PC-2)
Ki
48 bits
Substitution Box
(S-Box)
32 bits
Permutation Box
(P)
32 bits
XOR
32 bits
Li
Ri
Ci
Di
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.
6.2.2 Continue
Expansion P-box
Since RI1 is a 32-bit input and KI is a 48-bit key, we first need to expand R I1 to 48
bits.
10
11
12
13
12
13
14
15
16
17
16
17
18
19
20
21
20
21
22
23
24
25
24
25
26
27
28
29
28
29
30
31
32
6.2.2 Continue
Whitener (XOR)
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.
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.
6.20
S-Box 1
Table shows the permutation for S-box 1. For the rest of the boxes see the
textbook.
Problem No. 3
The input to S-box 1 is 100011.
What is the output?
S-Box Structure
S1
00(0)
01(2)
10(3)
11(4)
0
14
0
4
15
1
4
15
1
12
2
13
7
14
8
3
1
4
8
2
4 5
2 15
14 2
13 6
4 9
6 7 8 9 10 11 12
11 8 3 10 6 12 5
13 1 10 6 12 11 9
2 11 15 12 9 7 3
1 7 5 11 3 14 10
13 14 15
9 0 7
5 3 8
10 5 0
0 6 13
For example, for input 011011 the row is 01, that is row 1, and
the column is determined by 1101, that is column 13. In row 1
column 13 appears 5 so that the output is 0101.
6.2.2 Continued
If we write the first and the sixth bits together, we get 11 in binary, which is 3
in decimal. The remaining bits are 0001 in binary, which is 1 in decimal. We
look for the value in row 3, column 1, (S-box 1). The result is 12 in decimal,
which in binary is 1100. So the input 100011 yields the output 1100.
S-Box Structure
S-Box Structure
Solution
If we write the first and the sixth bits together, we get 00 in binary, which is 0
in decimal. The remaining bits are 0000 in binary, which is 0 in decimal. We
look for the value in row 0, column 0, in Table 6.10 (S-box 8). The result is 13
in decimal, which is 1101 in binary. So the input 000000 yields the output
1101.
Straight Permutation
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.
6.2.3 Continued
DES Cipher
and Reverse Cipher for the First Approach
Key Generation
Permutation 1
PC-1
57
1
10
19
49
58
2
11
41
50
59
3
33
42
51
60
25
34
43
52
17
26
35
44
9
18
27
36
63
7
14
21
55
62
6
13
47
54
61
5
39
46
53
28
31
38
45
20
23
30
37
12
15
22
29
4
PC-1
58 50 42 34
IP
26 18 10 2
60 52 44 36 28 20
12 4
62 54 46 38 30 22
14 6
64 56 48 40 32 24
16 8
57 49 41 33 25 17
57
49
41
33
25
17
58
50
42
34
26
18
10
59
51
43
35
27
19
11
60
52
44
36
63
55
47
39
31
23
15
62
54
46
38
30
22
14
61
53
45
37
29
21
13
28
20
12
Permutation Choice 2
PC-2
14
3
23
16
41
30
44
46
17
28
19
7
52
40
49
42
11
15
12
27
31
51
39
50
24
6
4
20
37
45
56
36
1
5
21 10
26
8
13
2
47 55
33 48
34 53
29 32
10 11 12 13 14 15 16
Number
of 1
Left Shifts
Total Number 1
of Shifts
10 12 14 15 17 19 21 23 25 27 28
4 5 6 7
2 2 2 2
8
2
9 10
1 2
11 12 13 14 15 16
2 2 2 2 2 1
Avalanche Effect
DES exhibits strong avalanche, where a change of one input or
key bit results in changing approx half output bits
Avalanche Effect
DES exhibits strong avalanche, where a change of one input or key bit results in
changing approx half output bits.
Two desired properties of a block cipher are the avalanche effect and the
completeness.
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.
6.3.1 Continued
Although the two plaintext blocks differ only in the rightmost bit, the
ciphertext blocks differ in 29 bits. This means that changing
approximately 1.5 percent of the plaintext creates a change of
approximately 45 percent in the ciphertext.
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 shows a very strong completeness effect.
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
the middle bits of an S-box in the next round.
6.40
An output bit from Sj-1 goes to one of the last two bits
of Sj (in the next round).
6.41
DES Weaknesses
During the last few years critics have found some
weakness in DES
Weakness in S-Boxes
Weakness in P-boxes
6.43
Weakness in Keys
6.44
6.45
6.46
6.3.3 Continued
6.47
What is the probability of randomly selecting a weak, a semiweak, or a possible weak key?
6.3.3 Continued
Solution
DES has a key domain of 256. The total number of the above keys
are 64 (4 + 12 + 48). The probability of choosing one of these
keys is 8.8 1016, almost impossible.
6.3.3 Continued
Key Complement
6.51
Let us test the claim about the complement keys. We have used an
arbitrary key and plaintext to find the corresponding ciphertext. If we
have the key complement and the plaintext, we can obtain the
complement of the previous ciphertext (Table 6.20).
6.52
Problem 1
Solution
a. First, pass the 64-bit input through PC-1 to produce a 56-bit
result. Then perform a left circular shift separately on the two
28-bit halves. Finally, pass the 56-bit result through PC-2 to
produce the 48-bit
K1.: in binary notation: 0000 1011 0000 0010 0110 0111 1001
1011 0100 1001 1010 0101
in hexadecimal notation: 0 B 0 2 6 7 9 B 4 9 A 5
b. L0, R0 are derived by passing the 64-plaintext through IP
L0 = 1100 1100 0000 0000 1100 1100 1111 1111
R0 = 1111 0000 1010 1010 1111 0000 1010 1010
c. The E table (Table 3.2c) expands R0 to 48 bits:
E(R0) = 01110 100001 010101 010101 011110 100001 010101
010101
d. A = 011100 010001 011100 110010 111000 010101 110011
110000
F (Rn, Kn+1) = 1
We have
Ln+1 = Rn; Rn+1 = Ln Ex-OR F (Rn, Kn+1) = Ln Ex-OR 1 = Ln'
Thus
Ln+2 = Rn+1 = Ln' ; Rn+2 = Ln+1 = Rn'
i.e., after each two rounds we obtain the bit complement of the original
input, and every four rounds we obtain back the original input:
Ln+4 = Ln+2' = Ln ; Rn+2 = Rn+2' = Rn
6.55
6.56
Ex-OR Rn'
We have
Ln+1 = Rn; Rn+1 = Ln Ex-OR F(Rn, Kn+1) = Ln
Solution to a.
Solution b.
T16(L15 || R15) = L16 || R16
IP [IP1 (L16 || R16)] = L16 || R16
TD1(R16 || L16) = R16 || L16 Ex-OR f(R16, K16)
L15 || R15
6.58