Data Encryption Standard (Des)
Data Encryption Standard (Des)
History
In 1971, IBM developed an algorithm, named LUCIFER which
operates on a block of 64 bits, using a 128-bit key
6.3
Encryption
[1]
Figure . Initial and final permutation steps in DES
Encryption (cont.)
64-bit plaintext (X)
[1]
Encryption (Round) (cont.)
Li-1 Ri-1
Expansion/permutation (E_table)
XOR Ki
F Substitution/choice (S-box)
Permutation (P)
XOR
Li Ri
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.
Expansion Expansion
Key Generation (cont.)
• Original Key: Key0
• Permuted Choice One: PC_1( )
• Permuted Choice Two: PC_2( )
• Schedule of Left Shift: SLS( )
•
(C0 , D0 ) PC _ 1( Key 0 )
•
(Ci , Di ) SLS (Ci 1 , Di 1 )
•
Keyi PC _ 2( SLS (Ci 1 , Di 1 ))
Key Generation
(Encryption)
[1]
Key Generation
The round-key generator creates sixteen 48-bit keys out of a 56-bit cipher key.
Key Generation (cont.)
Input Key
C0 D0
▪ ▪
▪ ▪
▪ ▪
Ci-1 Di-1
Permuted Choice Two (PC-2)
S-box
[1]
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.
Solution:
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, in Table 6.3 (S-box 1). The result is 12 in decimal,
which in binary is 1100. So the input 100011 yields the output
1100.
Encryption (Round) (cont.)
S-box
[1]
Table. Straight permutation table
An Inverse Initial Permutation:-
is a permutation which you will get by inserting position of an element at the
position specified by the element value in the array. ... Basically, An inverse
permutation is a permutation in which each number and the number of the place
which it occupies is exchanged.
Decryption
• The same algorithm as
encryption.
• Reversed the order of key
(Key16, Key15, … Key1).
• For example:
– IP undoes IP-1 step of
encryption.
– 1st round with SK16 undoes
16th encrypt round.
[1]