1. Computer Security
Prepared by: Assistant Prof. Eman Sanad
Faculty of computers and Artificial Intelligence
Cairo University 1
2. Lecture 6
• Feistel cipher
• DES
• DES encryption overview
• DES Round structure
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
2
3. Feistel cipher cont…
Example:
The fifteenth round of encryption, corresponding to the second round of
decryption. “prove that”
• Suppose that the blocks at each stage are 32 bits (two 16-bit halves)
• the key size is 24 bits.
• at the end of encryption round fourteen, the value of the intermediate
block (in hexadecimal) is DE7F03A6.
LE 14 = DE7F and RE 14 = 03A6.
• Also assume that the value of K 15 is 12DE52.
• After round 15, we have LE 15 = 03A6
RE 15 = F(03A6, 12DE52) ⊕ DE7F.
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
3
4. Feisel cipher cont…
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
4
5. Feisel cipher cont…
• assume that :
LD 1 = RE 15 , RD 1 = LE 15
• prove that:
LD 2 = RE 14 , RD 2 = LE 14
• start with:
LD 1 = F(03A6, 12DE52) ⊕ DE7F
RD 1 = 03A6
LD 2 = 03A6 = RE 14 ,
RD 2 = F(03A6, 12DE52) ⊕ [F(03A6, 12DE52) ⊕ DE7F]
= DE7F = LE14
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
5
6. Feisel cipher cont…
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
6
7. Data Encryption Standard (DES)
• Most widely used block cipher in world
• Adopted in 1977 by NBS (now NIST)
• Encrypts 64-bit data using 56-bit key
• Has widespread use
• has been considerable controversy over
its security
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
7
8. DES Encryption Overview
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
8
9. Initial Permutation IP
• first step of the data computation
• IP reorders the input data bits
• quite regular in structure (easy in h/w)
Example:
IP(675a6967 5e5a6b5a) = (ffb2194d 004df6fb)
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
9
10. Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
10
12. DES Round Structure
• uses two 32-bit L & R halves
• As for any Feistel cipher can describe as:
L i = R i–1
R i = L i–1 ⊕ F(R i–1 , K i )
• F takes 32-bit R half and 48-bit subkey:
• expands R to 48-bits using perm E
• adds to subkey using XOR
• passes through 8 (S-boxes) to get 32-bit result
• finally permutes using 32-bit perm P
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
12
13. Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
13
14. Single round of DES algorithm
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
14
15. 8 S-Boxes
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
15
16. Substitution Boxes S
• have eight S-boxes which map 6 to 4 bits
o each S-box is actually 4 little 4 bit boxes
o outer bits 1 & 6 (row bits) select one row of 4
o inner bits 2-5 (col bits) are substituted
o result is 8 lots of 4 bits, or 32 bits
• row selection depends on both data & key
• feature known as autoclaving (autokeying)
Example:
S(18 09 12 3d 11 17 38 39) = 5fd25e03
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
16
18. Substitution Boxes S
• The S-boxes are the core of DES in
terms of cryptographic strength. They
are the only nonlinear element in the
algorithm and provide confusion.
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
18
19. Substitution Boxes S
Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
19
20. Dr. Eman Sanad, faculty of computers and
Artificial Intelligence , Cairo University
20
Thank you