Chapter 6 - DeS
Chapter 6 - DeS
CIPHER - DES
CRYPTOGRAPH
Y D R. FAHEEM MUSHTAQ
AND
NETWORK
SECURITY
5.2
Block Cipher Principles
most symmetric block ciphers are based on a
Feistel Cipher Structure
needed since must be able to decrypt ciphertext
to recover messages efficiently
block ciphers look like an extremely large
substitution
would need table of 264 entries for a 64-bit block
instead create from smaller building blocks
using idea of a product cipher
Feistel Cipher Design Elements
block size
key size
number of rounds
subkey generation algorithm
round function
fast software encry / decryption
ease of correctness analysis
Feistel Cipher Design Elements
for DES
block size ….64
key size …….64/ 56
number of rounds ….16
subkey generation algorithm…1 per round
round function: Permutation,Substitution etc
fast software encry / decryption
ease of correctness analysis
General structure of DES
6.6
Initial & Final Permutations
IP is the first step of the data computation
IP reorders the input data bits
even bits to LH half, odd bits to RH half
quite regular in structure (easy in h/w)
Final permutation is the inverse of IP= IP-1
DES Rounds structure
DES uses 16 rounds. Each round of DES is a Feistel cipher.
uses two 32-bit L & R halves
as for any Feistel cipher can describe as:
Li = Ri–1 {where i is round number}
6.9
DES round Function
The heart of DES round is function f( Ri-1 , Ki ), which applies a 48-bit
round-key Ki to the rightmost 32-bits Ri-1 to produce a 32-bit output.
Round function takes 32-
RI-1 bit R half and 48-bit
subkey:
expands R to 48-bits using
perm E
KI
adds to subkey using XOR
passes through 8 S-boxes
to get 32-bit result
finally permutes using 32-
bit perm P
6.10
Round
subkeys
Generator
Substitution Boxes (S-box)
have eight S-boxes which map 6 to 4 bits
each S-box is actually 6 x 4 bit boxes
outer bits 1 & 6 (row bits) select one row of 4
inner bits 2-5 (col bits) are substituted
result is 8 lots of 4 bits, or 32 bits
example:
S(18 09 12 3d 11 17 38 39) = 5fd25e03
DES S-boxes
S-box rule
6.15
DES round function’s Eight S-box tables
DES Key-generation & Encryption overview
DES: Key generation
6.19
Parity-bit drop table
Key-compression table
6.20
DES Cipher and Reverse Cipher
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.22
Example: DES Encryption
We choose a random plaintext block and a random key, and
determine what the ciphertext block would be in hexadecimal
6.23
6.24
Example : DES Decryption
Let us see how Bob, at the destination, can decipher the
ciphertext received from Alice using the same key.
6.25