Lec 4 Data Encryption Standard 9oct24
Lec 4 Data Encryption Standard 9oct24
Fall 2024
Grading Policy
• Introduction to DES
• Overview of the DES
Algorithm
• Internal Structure of DES
• Decryption
• Security of DES
3/29
• Introduction to DES
• Overview of the DES
Algorithm
• Internal Structure of DES
• Decryption
• Security of DES
4/29
Cryptology
Cryptography Cryptanalysis
MD5, SSL/TLS,
Block Ciphers Stream Ciphers
SHA-1/2, S/MIME
SHA 256
• Claude Shannon: There are two primitive operations with which strong
encryption algorithms can be built:
1. Confusion: An encryption operation where the relationship
between key and ciphertext is obscured.
Today, a common element for achieving confusion is substitution,
which is found in both AES and DES.
7/29
Example:
9/29
• Introduction to DES
• Overview of the DES Algorithm
• Internal Structure of DES
• Decryption
• Security of DES
10/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS
Overview of the DES Algorithm
x
64
56
DES k
64
13/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS
Content of this Chapter
• Introduction to DES
• Overview of the DES
Algorithm
• Internal Structure of DES
• Decryption
• Security of DES
14/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS
Initial and Final Permutation
• Bitwise Permutations.
• Inverse operations.
• Described by tables IP and IP-1.
15/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS
The f-Function
• 4 Steps:
1.Expansion E
2.XOR with round
key
3.S-box substitution
4.Permutation
16/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS
The Expansion Function E
1. Expansion E
• main purpose:
increases diffusion
!
17/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS
Add Round Key
18/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS
The DES S-Boxes
3. S-Box substitution
• Eight substitution tables (Avalanche
effect?).
• 6 bits of input, 4 bits of output.
• Non-linear and resistant to
differential cryptanalysis
(1990 !!! ).
• Crucial element for DES security!
• Find all S-Box tables and S-Box design
criteria in Understanding Cryptography
Chapter 3.
19/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS
The Permutation P
4. Permutation P
• Bitwise permutation.
• Introduces diffusion.
• Output bits of one S-Box effect several S-
Boxes in next round
• Diffusion by E, S-Boxes and P guarantees
that after Round 5 every bit is a function
of each key bit and each plaintext bit.
20/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS
Key Schedule (1)
21/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS
Key Schedule (2)
• Split key into 28-bit halves C0 and D0.
• Introduction to DES
• Overview of the DES
Algorithm
• Internal Structure of DES
• Decryption
• Security of DES
23/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS
Decryption
• In Feistel ciphers only the
keyschedule has to be
modified for decryption.
• Generate the same 16 round
keys in reverse order.
(for a detailed discussion on why this
works see Understanding Crptography
Chapter 3)
• Introduction to DES
• Overview of the DES
Algorithm
• Internal Structure of DES
• Decryption
• Security of DES
25/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS
Security of DES
29/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS
Lessons Learned
• DES was the dominant symmetric encryption algorithm from the mid-
1970s to the mid-1990s. Since 56-bit keys are no longer secure,
the Advanced Encryption Standard (AES) was created.
• Standard DES with 56-bit key length can be broken relatively easily
nowadays through an exhaustive key search.
30/
29
Advanced Cryptography – 1, Fall 2024. Dr Muhammad Tayyab Ali, R&D Wing
MCS