0% found this document useful (0 votes)
3 views12 pages

DES Algorithm

DES is a block cipher that encrypts 64-bit plaintext into 64-bit ciphertext using a 56-bit key. The encryption process involves initial and final permutations, 16 rounds of processing with a Feistel structure, and the use of substitution and expansion functions. Key generation includes parity drop and compression to derive round keys from the original key.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views12 pages

DES Algorithm

DES is a block cipher that encrypts 64-bit plaintext into 64-bit ciphertext using a 56-bit key. The encryption process involves initial and final permutations, 16 rounds of processing with a Feistel structure, and the use of substitution and expansion functions. Key generation includes parity drop and compression to derive round keys from the original key.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DES

64-bit plain text

DES is a Block cipher, which takes


64-bit plain text and creates a 64-bit
cipher text
DES Cipher
56-bit key

64-bit cipher text


DES

General Structure of DES


64-bit plain text

DES Cipher
Initial permutation

K1
Round 1
48-bit

K2
Round 2 Round-key Generator 56-bit key
48-bit


K16
Round 16
48-bit

Final permutation

64-bit cipher text


DES

Initial and Final permutations


Initial permutation table

58 50 42 34 26 18 10 02 The 58th bit of the input 64-bit plain text becomes the 1st bit,
60 52 44 36 28 20 12 04 the 50th bit becomes the 2nd bit and so on according to the
62 54 46 38 30 22 14 06 initial permutation table
64 56 48 40 32 24 16 08
57 49 41 33 25 17 09 01
59 51 43 35 27 19 11 03
61 53 45 37 29 21 13 05
63 55 47 39 31 23 15 07

Final permutation table

40 08 48 16 56 24 64 32
39 07 47 15 55 23 63 31
38 06 46 14 54 22 62 30 The 40th bit of the 64-bit output of the Round 16 becomes the
37 05 45 13 53 21 61 29 1st bit, the 8th bit becomes the 2nd bit and so on according to
The final permutation table
36 04 44 12 52 20 60 28
35 03 43 11 51 19 59 27
34 02 42 10 50 18 58 26
33 01 41 09 49 17 57 25
DES

One round in DES (Feistel structure)


32 bits 32 bits

Li-1 Ri-1

f:DES
f(Ri-1 , function
ki) ki
48-bit

Li-1 Ri-1

32 bits 32 bits
DES

DES Function

Ri-1

32 bits f
Expansion P-box
48 bits

ki
48 bits 48-bit

S-boxes

32 bits

Straight P-box

32 bits
DES

DES Function : Expansion permutation

The input 32-bits are expanded to 48 bits in the Expansion P-Box module in the following way

The 32-bit input is


divided into eight
4-bit blocks
32-Bit

Bit 32 Bit 1

48-bit

The resulting 48-bit output is permuted using the Expansion P-Box


DES

DES Function : Expansion Permutation and Straight permutation

Expansion P-box

32 01 02 03 04 05 Straight P-box
04 05 06 07 08 09
08 09 10 11 12 13 16 07 20 21 29 12 28 17
12 13 14 15 16 17 01 15 23 26 05 18 31 10
16 17 18 19 20 21 02 08 24 14 32 27 03 09
20 21 22 23 24 25 19 13 30 06 22 11 04 25
24 25 26 27 28 29
28 29 30 31 32 01
DES

DES Function : Substitution Boxes


The 48-bit input is divided
Into 8 chunks of 6 bits each
48-bit input and the 8 chunks are given
as input to the 8 s-boxes

S-Box 1 S-Box 2 S-Box 3 S-Box 4 S-Box 5 S-Box 6 S-Box 7 S-Box 8

32-bit output

The output of each S-box is 4-bit. When these are combined the result is a 32-bit output
DES

DES Function : Substitution Boxes

Each S-box uses a corresponding 4 row by 16 column table


Given a 6-bit input, the 1st and the 6th bits are used to address one of the rows and the
remaining 4 bits are used to address one of the 16 columns. Finally, the value found in
the corresponding location of the table is the 4bit output of the S-box
6-bit input
bit 1 bit 2 bit 3 bit 4 bit 5 bit 6

S-Box The remaining 4


bits give the
column number
0 1 2 15

1 The location of
The 1st and last table as given by
bits give the row the 6-bit input
number 2

4-bit output (the value in the corresponding location of the 4x16 table)
DES
DES Function : Substitution Boxes

An Example
Consider the 6-bit input to s-box 1 is 100011
The 1st and last bits put together is 11 which is ‘3’ in decimal. So we select the 3rd row
The middle bits are 00001 which is ‘1’ in decimal. So we select the 1st column

The corresponding table for S-box 1 is shown below

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

0 14 04 13 01 02 15 11 08 03 10 06 12 05 09 00 07

1 00 15 07 04 14 02 13 10 03 06 12 11 09 05 03 08

The value in the 3rd


2 row
04 and
01 1st 08
14 column
13 is 12.
06 02 Hence
11 15 the
12 4-bit
09 output
07 03 is
10 1100
05 (12
00 in binary)

3 15 12 08 02 04 09 01 07 05 11 03 14 10 00 06 13
DES

Key Generation 56bits


28 bits 28 bits

Parity Drop
Shift left Shift left
64bits 28 bits 28 bits
Key with
Parity bits
Compression
P-Box
48 bits
Round key 1

Shift left Shift left

Compression
Shifting
P-Box
Rounds Shift 48 bits
Round key 2
1,2,9,16 One bit
.. ..
Others Two bits

Shift left Shift left


28 bits 28 bits

Compression
P-Box
48 bits
Round key 16
DES
Parity Drop and Compression Permutation

The parity drop module drops the parity bits (bits 8,16,24,..,64) from the 64-bit key and permutes
the rest of the 56 bits according to the parity drop table

The Compression permutation module changes the 56 bits to 48 bits using the key compression
table, which are used as the key for a round

Parity drop table


Key compression table
57 49 41 33 25 17 09 01
58 50 42 34 26 18 10 02 14 17 11 24 01 05 03 28
59 51 43 35 27 19 11 03 15 06 21 10 23 19 12 04
60 52 44 36 63 55 47 39 26 08 16 07 27 20 13 02
31 23 15 07 62 54 46 38 41 52 31 37 47 55 30 40
30 22 14 06 61 53 45 37 51 45 33 48 44 49 39 56
29 21 13 05 28 20 12 04 34 53 46 42 50 36 29 32

You might also like