SlideShare a Scribd company logo
Chapter 2
Data Encryption Standard
(DES)
❏ To review a short history of DES
❏ To define the basic structure of DES
❏ To describe the details of building elements of DES
❏ To describe the round keys generation process
❏ To analyze DES
Objectives:
Introduction
The Data Encryption Standard (DES) is a
symmetric-key block cipher published by the
National Institute of Standards and Technology
(NIST).
 In 1973, NIST published a request for proposals
for a national symmetric-key cryptosystem. A
proposal from IBM, a modification of a project
called Lucifer, was accepted as DES.
 DES was published in the Federal Register in
March 1975 as a draft of the Federal Information
Processing Standard (FIPS).
History
DES is a block cipher, as shown in Figure
DES
Figure Encryption and decryption with DES
DES
•The Data Encryption Standard (DES) is a
symmetric-key block cipher
•DES is an implementation of a Feistel
Cipher. It uses 16 round Feistel
structure.
Feistel Cipher Structure
Horst Feistel devised the Feistel cipher
 based on concept of invertible product cipher
partitions input block into two halves
Process halves through multiple rounds
which perform a substitution on left half
based on round function of right half &
subkey
Then have permutation swapping halves.
6.7
Feistel Cipher Structure
Feistel Cipher Design Elements
block size
key size
number of rounds
subkey generation algorithm
round function
fast software en/decryption
ease of analysis
Confusion and Diffusion
cipher needs to completely obscure statistical properties of
original message
more practically Shannon suggested combining S & P
elements to obtain:
diffusion – dissipates statistical structure of plaintext over
bulk of ciphertext
confusion – makes relationship between ciphertext and key
as complex as possible
General structure of DES
Figure General structure of DES
Initial and Final Permutation
•The initial and final permutations are straight
Permutation boxes (P-boxes) that are
inverses of each other.
•They have no cryptography significance in
DES.
Initial and Final Permutations
Initial and final permutation steps in DES
6.14
Round Function
•The heart of this cipher is the DES
function, f.
•The DES function applies a 48-bit key to
the rightmost 32 bits to produce a 32-bit
output.
DES uses 16 rounds. Each round of DES is a Feistel
cipher.
A round in DES
(encryption site)
Rounds
DES Function
DES function
Expansion P Box
•Since right input is 32-bit and round key is a
48-bit, we first need to expand right input to
48 bits.
Expansion P-box
Expansion permutation
Although the relationship between the input and
output can be defined mathematically, DES uses
Table to define this P-box.
Continue
Table Expansion P-box table
Whitener (XOR)
 After the expansion permutation, DES uses the
XOR operation on the expanded right section
and the round key.
 Note that both the right section and the key are
48-bits in length.
 Also the round key is used only in this operation.
Continue
Substitution Boxes. − The S-boxes carry out the
real mixing (confusion). DES uses 8 S-boxes, each
with a 6-bit input and a 4-bit output.
Continue
S-boxes
Continue
S-box rule
Following Table shows the permutation for S-box 1.
Continue
S-box 1
Continued
Example : The input to S-box 1 is 100011. What is the
output?
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.
Solution
Straight Permutation − The 32 bit output of S-boxes
is then subjected to the straight permutation with rule
shown in the following illustration:
Continue
Straight permutation table
S1 S2 S3 S4 S5 S6 S7 S8
16 1 2 3 4
5 6
7 8 9
10 11
12 13
14
15
17 18 19
20 21 22
23 24 25
26 27
28
29 30
31 32
16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
Permutation Box P
P-box applied at end of each round
1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32
29 30
1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32
29 30
28
29
24
25
21 20
16
17
13 12
4
5 8
9
32 1
1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32
29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48
39 40
1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32
29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48
39 40
S4
control
input symbol
output symbol
1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32
29 30
S3
control
input symbol
output symbol
input symbol
S5
control
input symbol
output symbol
input symbol
S6
control
input symbol
output symbol
input symbol
S7
control
input symbol
output symbol
input symbol
S8
control
input symbol
output symbol
input symbol
S1
control
input symbol
output symbol
input symbol
S2
control
input symbol
output symbol
input symbol
1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32
29 30
Right Half i-1
Round Key i
1 2 3 4
5 6
7 8 11
12 13
14
15
16 17 18 9
10
21 22
23 24 25
26 27
28 19
20 31 32
29 30
1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32
29 30
1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32
29 30
O
+
O
+
Left Half i-1
Right Half i
DES round in full
1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32
29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48
39 40 51 52 53 54 55 56 57 58
49 50 61 62
59 60 63 64
1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32
29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48
39 40 51 52 53 54 55 56
49 50
64-bit key with parity bits
56-bit key
1 2 3 4
5
6
7
11 12
13
14
15
17 18
9 10 21
22
23
25 26 27 28
19 20
31 29
30
33 34 35 36 37
38
41 42 43 44 45
46
47 39
51 52 53
54
55
49 50
57 58 61
62
59 60 63
permuted
choice 1
1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32
29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48
39 40 51 52 53 54 55 56
49 50
1
2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32 29
30 33 34 35 36 37 38 41 42 43 44 45 46 47 48
39 40 51 52 53 54 55 56
49 50
Left
Shift
1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32
29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48
39 40 51 52 53 54 55 56
49 50
1 2
3 4
5 6 7
8
11 12 13
14 15 16
17 10
21 23
24 26 27
28 19 20 31 32
29
30 33 34 36
37
41 42
44
45 46
47 48 39
40 51
52 53
55 56
49 50
1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18
9 10 21 22 23 24 25 26 27 28
19 20 31 32
29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48
39 40
permuted
choice 2
48-bit subkey
DES Key Schedule
Using mixers and swappers, we can create the cipher and
reverse cipher, each having 16 rounds.
Cipher and Reverse Cipher
First 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.
Continued
DES cipher and reverse cipher for the first approach
Continued
Algorithm Pseudocode for DES cipher
Continued
Algorithm Pseudocode for DES cipher (Continued)
Continued
Algorithm Pseudocode for DES cipher (Continued)
Continued
Algorithm Pseudocode for DES cipher (Continued)
Alternative Approach
Continued
We can make all 16 rounds the same by including
one swapper to the 16th round and add an extra
swapper after that (two swappers cancel the effect
of each other).
Key Generation
The round-key generator creates sixteen 48-bit keys
out of a 56-bit cipher key.
Key Generation Process
Continued
Key generation
Continued
• Parity bit drop: it drops parity bits (bits 8,16,24,…64) from 64 bit key
and permutes the rest of the bits according to Parity-bit drop table.
Continued
Table Parity-bit drop table
continued
• Shift left:
1. Key is divided into two 28 bit parts.
2. Each part is shifted left (circular) one or two bits.
3. The two parts are then combined to form a 56-bit part.
Continued
Table Key-compression table
Compression D-Box:
It changes 56 bits to 48 bits which are used as a key
for a round. (drops bits 9,18,22,25,35,38,43,54)
DES (Data Encryption Standard) Algorithm
Continued
Algorithm Algorithm for round-key generation
Continued
Algorithm Algorithm for round-key generation (Continue)
We choose a random plaintext block and a random key, and
determine what the ciphertext block would be (all in
hexadecimal):
Trace of data for Example
Example
Trace of data for Example (Conintued )
Continued
Continued
Let us see how Bob, at the destination, can decipher the
ciphertext received from Alice using the same key. Table
shows some interesting points.
Example:
DES Design Controversy
DES was subjected to intense and
continuing criticism over :
choice of 56-bit key (vs Lucifer 128-bit)
the classified design criteria
subsequent events and public analysis
show in fact design was appropriate
use of DES has flourished
especially in financial applications
still standardized for legacy application use
3DES still strong (112 bit key)
6.49
DES ANALYSIS
Critics have used a strong magnifier to
analyze DES. Tests have been done to
measure the strength of some desired
properties in a block cipher.
Two desired properties of a block cipher are
the avalanche effect and the completeness.
Properties
•Avalanche effect − A small change in
plaintext results in the very great
change in the ciphertext.
•Completeness − Each bit of
ciphertext depends on many bits of
plaintext.
avalanche effect
Properties (continued…)
To check the avalanche effect in DES, let us encrypt two
plaintext blocks (with the same key) that differ only in one bit
and observe the differences in the number of bits in each
round.
Example
Continued
Although the two plaintext blocks differ only in the rightmost
bit, the ciphertext blocks differ in 29 bits. This means that
changing approximately 1.5 percent of the plaintext creates a
change of approximately 45 percent in the ciphertext.
Number of bit differences for Example
Design Criteria
S-Boxes
The design provides confusion and diffusion of bits from each
round to the next.
D-Boxes
They provide diffusion of bits.
Number of Rounds
DES uses sixteen rounds of
Feistel ciphers. the ciphertext is
thoroughly a random function of
plaintext and ciphertext.
During the last few years critics have found some
weaknesses in DES.
DES Weaknesses
Weaknesses in Cipher Design
1. Weaknesses in S-boxes
2. Weaknesses in D-boxes
3. Weaknesses in Key
Continued
Double encryption and decryption with a weak key
Continued
Let us try the first weak key in previous table to encrypt a
block two times. After two encryptions
with the same key the original plaintext block is created. Note
that we have used the encryption algorithm two times, not
one encryption followed by another decryption.
Example
Continued
Continued
Continued
A pair of semi-weak keys in encryption and decryption
Possible weak keys
There are 48 keys that are called
possible weak keys. It is a key that
creates only four distinct round
keys.
Continued
What is the probability of randomly selecting a weak, a semi-
weak, or a possible weak key?
Solution
DES has a key domain of 256. The total number of the above
keys are 64 (4 + 12 + 48). The probability of choosing one of
these keys is 8.8 × 10−16, almost impossible.
Example
6.63
Key Compliment
• It is observed that half of the keys are
compliment of the other half.
• It simplifies job of the cryptanalysis
Multiple DES
 The major criticism of DES regards its key
length.
 We can use double or triple DES to increase
the key size.
The first approach is to use double DES (2DES).
Double DES
Meet-in-the-Middle Attack
However, using a known-plaintext attack called
meet-in-the-middle attack proves that double DES
improves this vulnerability slightly (to 257 tests),
but not tremendously (to 2112).
Continued
Figure Meet-in-the-middle attack for double DES
Continued
Figure Tables for meet-in-the-middle attack
6.68
Triple DES
There are two variants of Triple DES
known as 3-key Triple DES (3TDES) and
2-key Triple DES (2TDES).
Triple DES
Figure Triple DES with two keys
6.70
Continuous
Triple DES with Three Keys
 Before using 3TDES, user first
generate and distribute a 3TDES key
K, which consists of three different
DES keys K1, K2 and K3.
 This means that the actual 3TDES
key has length 3×56 = 168 bits.
Figure Triple DES with three keys
Continued…
• Encrypt the plaintext blocks using single DES with
key K1.
•Now decrypt the output of step 1 using single DES
with key K2.
•Finally, encrypt the output of step 2 using single
DES with key K3.
•The output of step 3 is the ciphertext.
•Decryption of a ciphertext is a reverse process.
User first decrypt using K3, then encrypt with
K2, and finally decrypt with K1.
The encryption-decryption process
Continued…
Security of DES
DES, as the first important block cipher,
has gone through much scrutiny. Among
the attempted attacks, three are of interest:
brute-force, differential cryptanalysis, and
linear cryptanalysis.
Combining key size weakness with the key
complement weakness, it is clear that DES can be
broken using 255 encryptions.
Brute-Force Attack
• It has been revealed that the designers of DES
already knew about this type of attack and
designed S-boxes and chose 16 as the number of
rounds to make DES specifically resistant to this
type of attack.
• It has been shown that DES can be broken using
247 pairs of chosen plaintexts or 255 known
plaintexts.
•
Differential Cryptanalysis
6.76
• Linear cryptanalysis is newer than differential
cryptanalysis. DES is more vulnerable to linear
cryptanalysis than to differential cryptanalysis.
• S-boxes are not very resistant to linear cryptanalysis.
• It has been shown that DES can be broken using 243
pairs of known plaintexts.
• However, from the practical point of view, finding so
many pairs is very unlikely.
Linear Cryptanalysis
References:
1. Stallings
2. Forouzan

More Related Content

PPT
ch03_block_ciphers_nemo (2) (1).ppt
PPTX
information security lecture 7 & 8 .pptx
PDF
1 DES.pdf
PPTX
Information and network security 20 data encryption standard des
PDF
3-Block Ciphers and DES.pdf
PPTX
Data Encryption Standards (1).pptx
PDF
sheet4.pdf
PDF
paper4.pdf
ch03_block_ciphers_nemo (2) (1).ppt
information security lecture 7 & 8 .pptx
1 DES.pdf
Information and network security 20 data encryption standard des
3-Block Ciphers and DES.pdf
Data Encryption Standards (1).pptx
sheet4.pdf
paper4.pdf

Similar to DES (Data Encryption Standard) Algorithm (20)

PDF
lecture3.pdf
PDF
doc4.pdf
PDF
doc4.pdf
PDF
cryptography2 WHICH IS VERY IMPOTRANT.pdf
PDF
2 DES.pdf
PDF
4-DES.pdf
PPT
Data encryption standard
PPT
Chapter 3: Block Ciphers and the Data Encryption Standard
PPTX
DES Presentation.pptx for Information Security, A common Subject
PPT
Cryptography Symmetric Key Algorithm (CSE)
PPTX
Block Cipher.cryptography_miu_year5.pptx
PPTX
Trible data encryption standard (3DES)
PPT
block ciphers
PDF
Proposing an Encryption Algorithm based on DES
PPT
CNS_06 DES ALGORITHM AND ITS IMPLEMENTAT
PPTX
data ebncryption standard with example.pptx
PPTX
Cryptographic algorithms
PPTX
Cryptographic algorithms
PDF
chap3.pdf
lecture3.pdf
doc4.pdf
doc4.pdf
cryptography2 WHICH IS VERY IMPOTRANT.pdf
2 DES.pdf
4-DES.pdf
Data encryption standard
Chapter 3: Block Ciphers and the Data Encryption Standard
DES Presentation.pptx for Information Security, A common Subject
Cryptography Symmetric Key Algorithm (CSE)
Block Cipher.cryptography_miu_year5.pptx
Trible data encryption standard (3DES)
block ciphers
Proposing an Encryption Algorithm based on DES
CNS_06 DES ALGORITHM AND ITS IMPLEMENTAT
data ebncryption standard with example.pptx
Cryptographic algorithms
Cryptographic algorithms
chap3.pdf
Ad

Recently uploaded (20)

PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
PDF
Electronic commerce courselecture one. Pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Advanced IT Governance
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Cloud computing and distributed systems.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Modernizing your data center with Dell and AMD
PPTX
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
GamePlan Trading System Review: Professional Trader's Honest Take
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
NewMind AI Monthly Chronicles - July 2025
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
Electronic commerce courselecture one. Pdf
Understanding_Digital_Forensics_Presentation.pptx
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Advanced IT Governance
MYSQL Presentation for SQL database connectivity
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
20250228 LYD VKU AI Blended-Learning.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Cloud computing and distributed systems.
Review of recent advances in non-invasive hemoglobin estimation
The Rise and Fall of 3GPP – Time for a Sabbatical?
NewMind AI Weekly Chronicles - August'25 Week I
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Modernizing your data center with Dell and AMD
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
Ad

DES (Data Encryption Standard) Algorithm

  • 1. Chapter 2 Data Encryption Standard (DES)
  • 2. ❏ To review a short history of DES ❏ To define the basic structure of DES ❏ To describe the details of building elements of DES ❏ To describe the round keys generation process ❏ To analyze DES Objectives:
  • 3. Introduction The Data Encryption Standard (DES) is a symmetric-key block cipher published by the National Institute of Standards and Technology (NIST).
  • 4.  In 1973, NIST published a request for proposals for a national symmetric-key cryptosystem. A proposal from IBM, a modification of a project called Lucifer, was accepted as DES.  DES was published in the Federal Register in March 1975 as a draft of the Federal Information Processing Standard (FIPS). History
  • 5. DES is a block cipher, as shown in Figure DES Figure Encryption and decryption with DES
  • 6. DES •The Data Encryption Standard (DES) is a symmetric-key block cipher •DES is an implementation of a Feistel Cipher. It uses 16 round Feistel structure.
  • 7. Feistel Cipher Structure Horst Feistel devised the Feistel cipher  based on concept of invertible product cipher partitions input block into two halves Process halves through multiple rounds which perform a substitution on left half based on round function of right half & subkey Then have permutation swapping halves. 6.7
  • 9. Feistel Cipher Design Elements block size key size number of rounds subkey generation algorithm round function fast software en/decryption ease of analysis
  • 10. Confusion and Diffusion cipher needs to completely obscure statistical properties of original message more practically Shannon suggested combining S & P elements to obtain: diffusion – dissipates statistical structure of plaintext over bulk of ciphertext confusion – makes relationship between ciphertext and key as complex as possible
  • 11. General structure of DES Figure General structure of DES
  • 12. Initial and Final Permutation •The initial and final permutations are straight Permutation boxes (P-boxes) that are inverses of each other. •They have no cryptography significance in DES.
  • 13. Initial and Final Permutations Initial and final permutation steps in DES
  • 14. 6.14
  • 15. Round Function •The heart of this cipher is the DES function, f. •The DES function applies a 48-bit key to the rightmost 32 bits to produce a 32-bit output.
  • 16. DES uses 16 rounds. Each round of DES is a Feistel cipher. A round in DES (encryption site) Rounds
  • 18. Expansion P Box •Since right input is 32-bit and round key is a 48-bit, we first need to expand right input to 48 bits.
  • 20. Although the relationship between the input and output can be defined mathematically, DES uses Table to define this P-box. Continue Table Expansion P-box table
  • 21. Whitener (XOR)  After the expansion permutation, DES uses the XOR operation on the expanded right section and the round key.  Note that both the right section and the key are 48-bits in length.  Also the round key is used only in this operation. Continue
  • 22. Substitution Boxes. − The S-boxes carry out the real mixing (confusion). DES uses 8 S-boxes, each with a 6-bit input and a 4-bit output. Continue S-boxes
  • 24. Following Table shows the permutation for S-box 1. Continue S-box 1
  • 25. Continued Example : The input to S-box 1 is 100011. What is the output? 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. Solution
  • 26. Straight Permutation − The 32 bit output of S-boxes is then subjected to the straight permutation with rule shown in the following illustration: Continue Straight permutation table
  • 27. S1 S2 S3 S4 S5 S6 S7 S8 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Permutation Box P P-box applied at end of each round
  • 28. 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 28 29 24 25 21 20 16 17 13 12 4 5 8 9 32 1 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48 39 40 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48 39 40 S4 control input symbol output symbol 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 S3 control input symbol output symbol input symbol S5 control input symbol output symbol input symbol S6 control input symbol output symbol input symbol S7 control input symbol output symbol input symbol S8 control input symbol output symbol input symbol S1 control input symbol output symbol input symbol S2 control input symbol output symbol input symbol 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 Right Half i-1 Round Key i 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 O + O + Left Half i-1 Right Half i DES round in full
  • 29. 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48 39 40 51 52 53 54 55 56 57 58 49 50 61 62 59 60 63 64 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48 39 40 51 52 53 54 55 56 49 50 64-bit key with parity bits 56-bit key 1 2 3 4 5 6 7 11 12 13 14 15 17 18 9 10 21 22 23 25 26 27 28 19 20 31 29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 39 51 52 53 54 55 49 50 57 58 61 62 59 60 63 permuted choice 1 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48 39 40 51 52 53 54 55 56 49 50 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48 39 40 51 52 53 54 55 56 49 50 Left Shift 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48 39 40 51 52 53 54 55 56 49 50 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 10 21 23 24 26 27 28 19 20 31 32 29 30 33 34 36 37 41 42 44 45 46 47 48 39 40 51 52 53 55 56 49 50 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 9 10 21 22 23 24 25 26 27 28 19 20 31 32 29 30 33 34 35 36 37 38 41 42 43 44 45 46 47 48 39 40 permuted choice 2 48-bit subkey DES Key Schedule
  • 30. Using mixers and swappers, we can create the cipher and reverse cipher, each having 16 rounds. Cipher and Reverse Cipher First 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.
  • 31. Continued DES cipher and reverse cipher for the first approach
  • 33. Continued Algorithm Pseudocode for DES cipher (Continued)
  • 34. Continued Algorithm Pseudocode for DES cipher (Continued)
  • 35. Continued Algorithm Pseudocode for DES cipher (Continued)
  • 36. Alternative Approach Continued We can make all 16 rounds the same by including one swapper to the 16th round and add an extra swapper after that (two swappers cancel the effect of each other). Key Generation The round-key generator creates sixteen 48-bit keys out of a 56-bit cipher key.
  • 39. Continued • Parity bit drop: it drops parity bits (bits 8,16,24,…64) from 64 bit key and permutes the rest of the bits according to Parity-bit drop table.
  • 41. continued • Shift left: 1. Key is divided into two 28 bit parts. 2. Each part is shifted left (circular) one or two bits. 3. The two parts are then combined to form a 56-bit part.
  • 42. Continued Table Key-compression table Compression D-Box: It changes 56 bits to 48 bits which are used as a key for a round. (drops bits 9,18,22,25,35,38,43,54)
  • 44. Continued Algorithm Algorithm for round-key generation
  • 45. Continued Algorithm Algorithm for round-key generation (Continue)
  • 46. We choose a random plaintext block and a random key, and determine what the ciphertext block would be (all in hexadecimal): Trace of data for Example Example
  • 47. Trace of data for Example (Conintued ) Continued
  • 48. Continued Let us see how Bob, at the destination, can decipher the ciphertext received from Alice using the same key. Table shows some interesting points. Example:
  • 49. DES Design Controversy DES was subjected to intense and continuing criticism over : choice of 56-bit key (vs Lucifer 128-bit) the classified design criteria subsequent events and public analysis show in fact design was appropriate use of DES has flourished especially in financial applications still standardized for legacy application use 3DES still strong (112 bit key) 6.49
  • 50. DES ANALYSIS Critics have used a strong magnifier to analyze DES. Tests have been done to measure the strength of some desired properties in a block cipher.
  • 51. Two desired properties of a block cipher are the avalanche effect and the completeness. Properties •Avalanche effect − A small change in plaintext results in the very great change in the ciphertext. •Completeness − Each bit of ciphertext depends on many bits of plaintext.
  • 52. avalanche effect Properties (continued…) To check the avalanche effect in DES, let us encrypt two plaintext blocks (with the same key) that differ only in one bit and observe the differences in the number of bits in each round. Example
  • 53. Continued Although the two plaintext blocks differ only in the rightmost bit, the ciphertext blocks differ in 29 bits. This means that changing approximately 1.5 percent of the plaintext creates a change of approximately 45 percent in the ciphertext. Number of bit differences for Example
  • 54. Design Criteria S-Boxes The design provides confusion and diffusion of bits from each round to the next. D-Boxes They provide diffusion of bits. Number of Rounds DES uses sixteen rounds of Feistel ciphers. the ciphertext is thoroughly a random function of plaintext and ciphertext.
  • 55. During the last few years critics have found some weaknesses in DES. DES Weaknesses Weaknesses in Cipher Design 1. Weaknesses in S-boxes 2. Weaknesses in D-boxes 3. Weaknesses in Key
  • 56. Continued Double encryption and decryption with a weak key
  • 57. Continued Let us try the first weak key in previous table to encrypt a block two times. After two encryptions with the same key the original plaintext block is created. Note that we have used the encryption algorithm two times, not one encryption followed by another decryption. Example
  • 60. Continued A pair of semi-weak keys in encryption and decryption
  • 61. Possible weak keys There are 48 keys that are called possible weak keys. It is a key that creates only four distinct round keys.
  • 62. Continued What is the probability of randomly selecting a weak, a semi- weak, or a possible weak key? Solution DES has a key domain of 256. The total number of the above keys are 64 (4 + 12 + 48). The probability of choosing one of these keys is 8.8 × 10−16, almost impossible. Example
  • 63. 6.63 Key Compliment • It is observed that half of the keys are compliment of the other half. • It simplifies job of the cryptanalysis
  • 64. Multiple DES  The major criticism of DES regards its key length.  We can use double or triple DES to increase the key size.
  • 65. The first approach is to use double DES (2DES). Double DES Meet-in-the-Middle Attack However, using a known-plaintext attack called meet-in-the-middle attack proves that double DES improves this vulnerability slightly (to 257 tests), but not tremendously (to 2112).
  • 67. Continued Figure Tables for meet-in-the-middle attack
  • 68. 6.68 Triple DES There are two variants of Triple DES known as 3-key Triple DES (3TDES) and 2-key Triple DES (2TDES).
  • 69. Triple DES Figure Triple DES with two keys
  • 70. 6.70 Continuous Triple DES with Three Keys  Before using 3TDES, user first generate and distribute a 3TDES key K, which consists of three different DES keys K1, K2 and K3.  This means that the actual 3TDES key has length 3×56 = 168 bits.
  • 71. Figure Triple DES with three keys Continued…
  • 72. • Encrypt the plaintext blocks using single DES with key K1. •Now decrypt the output of step 1 using single DES with key K2. •Finally, encrypt the output of step 2 using single DES with key K3. •The output of step 3 is the ciphertext. •Decryption of a ciphertext is a reverse process. User first decrypt using K3, then encrypt with K2, and finally decrypt with K1. The encryption-decryption process Continued…
  • 73. Security of DES DES, as the first important block cipher, has gone through much scrutiny. Among the attempted attacks, three are of interest: brute-force, differential cryptanalysis, and linear cryptanalysis.
  • 74. Combining key size weakness with the key complement weakness, it is clear that DES can be broken using 255 encryptions. Brute-Force Attack
  • 75. • It has been revealed that the designers of DES already knew about this type of attack and designed S-boxes and chose 16 as the number of rounds to make DES specifically resistant to this type of attack. • It has been shown that DES can be broken using 247 pairs of chosen plaintexts or 255 known plaintexts. • Differential Cryptanalysis
  • 76. 6.76 • Linear cryptanalysis is newer than differential cryptanalysis. DES is more vulnerable to linear cryptanalysis than to differential cryptanalysis. • S-boxes are not very resistant to linear cryptanalysis. • It has been shown that DES can be broken using 243 pairs of known plaintexts. • However, from the practical point of view, finding so many pairs is very unlikely. Linear Cryptanalysis