Data Encryption Standard
Data Encryption Standard
Data Encryption Standard
• DES features
• It is a block cipher algorithm.
• DES is a symmetric key algorithm.
• Key length of 64 bit.
• Block size of 64 bit.(plaintext)
• DES encryption algorithm. (steps)
• Initial permutation.
• Iteration (16 round).
• Key transformation .
• 32 bit swap.
• Inverse permutation.
Iteration
No 1 1 2 2 2 2 2 2 1 2 2 2 2 2 2
of
key
bit
shift
ed
• After an appropriate shift 48 of the 56 bits are selected .
• After the shift bit number 14moves into the first position , bit
no. 17 moves into second position and so on .
• The table contains only 48 bit , bit no. 18 is discarded , like 7
others to reduce 56 bit key to 48 bit.
• The key transformation involves permutation as well as
selection of 48 bit subset of the original 56 bit key is called
compression permutation.
• Because of this compression permutation technique a different
subset of key is used in each round. That makes DES not so
easy to crack.
Compression permutation
14 17 11 24 1 5
3 28 15 6 21 10
23 19 12 4 26 8
16 7 27 20 13 2
41 52 31 37 47 55
30 40 51 45 33 48
44 49 39 56 34 53
46 42 50 36 29 32
Expansion permutation
•
• S1
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7
1 0 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8
2 4 1 14 8 13 6 2 11 15 12 9 7 3 10 5 0
3 15 12 8 2 4 9 1 7 5 11 3 14 10 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. the output of each S-box is combined to
form a 32 bit block which is given to P-box.
• The permutation function P yields a 32-bit output
from a 32-bit input by permuting the bits of the input
block. eg. A 16 in the first block that the bit at position
16 of the original input movs to the bit at position 1 in
the output.
• P 16 7 20 21
29 12 28 17
1 15 23 26
5 18 31 10
2 8 24 14
32 27 3 9
19 13 30 6
22 11 4 25
DES key schedule calculation -the original
key is 64 bit
PC-1 permuted choice1
57 49 41 33 25 17 9
1 58 50 42 34 26 18
10 2 59 51 43 35 27
19 11 3 60 52 44 36
63 55 47 39 31 23 15
7 62 54 46 38 30 22
14 6 61 53 45 37 29
21 13 5 28 20 12 4
• PC-2 permuted choice 2
14 17 11 24 1 5
3 28 15 6 21 10
23 19 12 4 26 8
16 7 27 20 13 2
41 52 31 37 47 55
30 40 51 45 33 48
44 49 39 56 34 53
46 42 50 36 29 32
• Iteration corresponds to left shifts:
1 2 3 4 5 6 7 8
1 1 2 2 2 2 2 2
9 10 11 12 13 14 15 16
1 2 2 2 2 2 2 1
XOR and swap