SlideShare a Scribd company logo
6.1
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 6
Data Encryption Standard
(DES)
6.3
6-1 INTRODUCTION
The Data Encryption Standard (DES) is a symmetric-
key block cipher published by the National Institute of
Standards and Technology (NIST).
6.1.1 History
6.1.2 Overview
Topics discussed in this section:
6.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).
6.1.1 History
6.5
DES is a block cipher, as shown in Figure 6.1.
6.1.2 Overview
Figure 6.1 Encryption and decryption with DES
6.6
6-2 DES STRUCTURE
The encryption process is made of two permutations
(P-boxes), which we call initial and final
permutations, and sixteen Feistel rounds.
6.2.1 Initial and Final Permutations
6.2.2 Rounds
6.2.3 Cipher and Reverse Cipher
6.2.4 Examples
Topics discussed in this section:
6.7
6-2 Continue
Figure 6.2 General structure of DES
6.8
6.2.1 Initial and Final Permutations
Figure 6.3 Initial and final permutation steps in DES
6.9
6.2.1 Continue
Table 6.1 Initial and final permutation tables
6.12
6.2.1 Continued
The initial and final permutations are
straight P-boxes that are inverses
of each other.
They have no cryptography significance in
DES.
Note
6.13
DES uses 16 rounds. Each round of DES is a Feistel
cipher.
6.2.2 Rounds
Figure 6.4
A round in DES
(encryption site)
6.14
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.
6.2.2 Continued
DES Function
Figure 6.5
DES function
6.15
Expansion P-box
Since RI−1 is a 32-bit input and KI is a 48-bit key, we first
need to expand RI−1 to 48 bits.
6.2.2 Continue
Figure 6.6 Expansion permutation
6.16
Although the relationship between the input and output
can be defined mathematically, DES uses Table 6.2 to
define this P-box.
6.2.2 Continue
Table 6.6 Expansion P-box table
6.17
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 note that the round key is used only in
this operation.
6.2.2 Continue
6.18
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.
6.2.2 Continue
Figure 6.7 S-boxes
6.19
6.2.2 Continue
Figure 6.8 S-box rule
6.20
Table 6.3 shows the permutation for S-box 1. For the rest
of the boxes see the textbook.
6.2.2 Continue
Table 6.3 S-box 1
6.23
Straight Permutation
6.2.2 Continue
Table 6.11 Straight permutation table
6.24
Using mixers and swappers, we can create the cipher and
reverse cipher, each having 16 rounds.
6.2.3 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.
In the first approach, there is no swapper in
the last round.
Note
6.25
6.2.3 Continued
Figure 6.9 DES cipher and reverse cipher for the first approach
6.26
6.2.3 Continued
Algorithm 6.1 Pseudocode for DES cipher
6.27
6.2.3 Continued
Algorithm 6.1 Pseudocode for DES cipher (Continued)
6.28
6.2.3 Continued
Algorithm 6.1 Pseudocode for DES cipher (Continued)
6.29
6.2.3 Continued
Algorithm 6.1 Pseudocode for DES cipher (Continued)
6.30
Alternative Approach
6.2.3 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.
6.31
6.2.3 Continued
Figure 6.10
Key generation
6.32
6.2.3 Continued
Table 6.12 Parity-bit drop table
Table 6.13 Number of bits shifts
6.33
6.2.3 Continued
Table 6.14 Key-compression table
6.34
6.2.3 Continued
Algorithm 6.2 Algorithm for round-key generation
6.35
6.2.3 Continued
Algorithm 6.2 Algorithm for round-key generation (Continue)
6.36
Example 6.5
6.2.4 Examples
We choose a random plaintext block and a random key, and
determine what the ciphertext block would be (all in
hexadecimal):
Table 6.15 Trace of data for Example 6.5
6.37
Example 6.5
Table 6.15 Trace of data for Example 6.5 (Conintued
6.2.4 Continued
Continued
6.38
Example 6.6
6.2.4 Continued
Let us see how Bob, at the destination, can decipher the
ciphertext received from Alice using the same key. Table 6.16
shows some interesting points.
6.39
6-3 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.
6.3.1 Properties
6.3.2 Design Criteria
6.3.3 DES Weaknesses
Topics discussed in this section:
6.40
Two desired properties of a block cipher are the
avalanche effect and the completeness.
6.3.1 Properties
Example 6.7
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.
6.41
Example 6.7
6.3.1 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.
Table 6.17 Number of bit differences for Example 6.7
Continued
6.42
6.3.1 Continued
Completeness effect
Completeness effect means that each bit of the ciphertext
needs to depend on many bits on the plaintext.
6.43
6.3.2 Design Criteria
S-Boxe
The design provides confusion and diffusion of bits from
each round to the next.
P-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.
6.44
During the last few years critics have found some
weaknesses in DES.
6.3.3 DES Weaknesses
Weaknesses in Cipher Design
1. Weaknesses in S-boxes
2. Weaknesses in P-boxes
3. Weaknesses in Key
6.46
6.3.3 Continued
Figure 6.11 Double encryption and decryption with a weak key
6.47
6.3.3 Continued
6.48
6.3.3 Continued
6.49
6.3.3 Continued
Figure 6.12 A pair of semi-weak keys in encryption and decryption
6.51
6.3.3 Continued
6.53
6-4 Multiple DES
The major criticism of DES regards its key length.
Fortunately DES is not a group. This means that we
can use double or triple DES to increase the key size.
6.4.1 Double DES
6.4.4 Triple DES
Topics discussed in this section:
6.55
The first approach is to use double DES (2DES).
6.4.1 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).
6.56
6.4.1 Continued
Figure 6.14 Meet-in-the-middle attack for double DES
6.57
6.4.1 Continued
Figure 6.15 Tables for meet-in-the-middle attack
6.58
6.4.2 Triple DES
Figure 6.16 Triple DES with two keys
6.59
6.4.2 Continuous
Triple DES with Three Keys
The possibility of known-plaintext attacks on triple DES
with two keys has enticed some applications to use triple
DES with three keys. Triple DES with three keys is used
by many applications such as PGP (See Chapter 16).

More Related Content

PPTX
DES.pptx
PPT
Data encryption standard
PDF
cryptography2 WHICH IS VERY IMPOTRANT.pdf
PPTX
AC-Unit2 AC-Unit1.pptx CRYPTOGRAPHIC NOTES FOR ALL1).pptx
PDF
DES Cipher
PDF
DES (Data Encryption Standard) Algorithm
PPT
AES Cryptosystem
PPTX
information security lecture 7 & 8 .pptx
DES.pptx
Data encryption standard
cryptography2 WHICH IS VERY IMPOTRANT.pdf
AC-Unit2 AC-Unit1.pptx CRYPTOGRAPHIC NOTES FOR ALL1).pptx
DES Cipher
DES (Data Encryption Standard) Algorithm
AES Cryptosystem
information security lecture 7 & 8 .pptx

Similar to CNS_06 DES ALGORITHM AND ITS IMPLEMENTAT (20)

PDF
Comparative Study on DES and Triple DES Algorithms and Proposal of a New Algo...
PPT
ch03_block_ciphers_nemo (2) (1).ppt
PDF
Renas Rajab Asaad
PPTX
b0e51366-166f-469b-9ea1-14a24e624a3e.pptx
PDF
2 DES.pdf
PDF
Enhancement of DES Algorithm with Multi State Logic
PPTX
Block Cipher.cryptography_miu_year5.pptx
PPT
MKG_ISS_04.ppt
PDF
The Understanding of GOST Cryptography Technique
PPTX
M tech2
PPTX
Module 1-Block Ciphers and the Data Encryption Standard.pptx
PDF
chap3.pdf
PDF
Ijnsa050206
PPT
Network Security Lec4
PDF
Aes128 bit project_report
PPTX
Unit 2
PDF
Lab 4 Three-Bit Binary Adder
PDF
CRYPTOGRAPHY & NETWOK SECURITY- Symmetric key Ciphers
PDF
Implementation of rainbow tables to crack md5 codes
Comparative Study on DES and Triple DES Algorithms and Proposal of a New Algo...
ch03_block_ciphers_nemo (2) (1).ppt
Renas Rajab Asaad
b0e51366-166f-469b-9ea1-14a24e624a3e.pptx
2 DES.pdf
Enhancement of DES Algorithm with Multi State Logic
Block Cipher.cryptography_miu_year5.pptx
MKG_ISS_04.ppt
The Understanding of GOST Cryptography Technique
M tech2
Module 1-Block Ciphers and the Data Encryption Standard.pptx
chap3.pdf
Ijnsa050206
Network Security Lec4
Aes128 bit project_report
Unit 2
Lab 4 Three-Bit Binary Adder
CRYPTOGRAPHY & NETWOK SECURITY- Symmetric key Ciphers
Implementation of rainbow tables to crack md5 codes
Ad

More from tpvvsreenivasarao (11)

PPT
funcrttionadl asfkjoefweno alsdfjoweefwf
PPTX
unit-4-part-1- spectroscopy2chemist.pptx
PPTX
BASIC TREE AND TYPES OF DI CONCEPTS.pptx
PPT
SOFTWAREENGINEERING CONCEPTS INJNTUK MO
PPT
ch-15 Key-Management IN CNS STUDENTSASEE
PPT
ch-13 Digital Signature FOR CNS STUDENTS
PPT
AI algorithms with alpha beta stratagy 1
PPT
concepts-of-computer.ppt
PPTX
lec-9.pptx
PPT
i-Twin-Limitless-Pendrive-Technology.ppt
PPT
CSE WIBREE ppt.ppt
funcrttionadl asfkjoefweno alsdfjoweefwf
unit-4-part-1- spectroscopy2chemist.pptx
BASIC TREE AND TYPES OF DI CONCEPTS.pptx
SOFTWAREENGINEERING CONCEPTS INJNTUK MO
ch-15 Key-Management IN CNS STUDENTSASEE
ch-13 Digital Signature FOR CNS STUDENTS
AI algorithms with alpha beta stratagy 1
concepts-of-computer.ppt
lec-9.pptx
i-Twin-Limitless-Pendrive-Technology.ppt
CSE WIBREE ppt.ppt
Ad

Recently uploaded (20)

PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Pre independence Education in Inndia.pdf
PPTX
Lesson notes of climatology university.
PPTX
Pharma ospi slides which help in ospi learning
PDF
01-Introduction-to-Information-Management.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
master seminar digital applications in india
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Complications of Minimal Access Surgery at WLH
Renaissance Architecture: A Journey from Faith to Humanism
Pre independence Education in Inndia.pdf
Lesson notes of climatology university.
Pharma ospi slides which help in ospi learning
01-Introduction-to-Information-Management.pdf
RMMM.pdf make it easy to upload and study
STATICS OF THE RIGID BODIES Hibbelers.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
master seminar digital applications in india
Final Presentation General Medicine 03-08-2024.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Abdominal Access Techniques with Prof. Dr. R K Mishra
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Insiders guide to clinical Medicine.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Complications of Minimal Access Surgery at WLH

CNS_06 DES ALGORITHM AND ITS IMPLEMENTAT

  • 1. 6.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 6 Data Encryption Standard (DES)
  • 2. 6.3 6-1 INTRODUCTION The Data Encryption Standard (DES) is a symmetric- key block cipher published by the National Institute of Standards and Technology (NIST). 6.1.1 History 6.1.2 Overview Topics discussed in this section:
  • 3. 6.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). 6.1.1 History
  • 4. 6.5 DES is a block cipher, as shown in Figure 6.1. 6.1.2 Overview Figure 6.1 Encryption and decryption with DES
  • 5. 6.6 6-2 DES STRUCTURE The encryption process is made of two permutations (P-boxes), which we call initial and final permutations, and sixteen Feistel rounds. 6.2.1 Initial and Final Permutations 6.2.2 Rounds 6.2.3 Cipher and Reverse Cipher 6.2.4 Examples Topics discussed in this section:
  • 6. 6.7 6-2 Continue Figure 6.2 General structure of DES
  • 7. 6.8 6.2.1 Initial and Final Permutations Figure 6.3 Initial and final permutation steps in DES
  • 8. 6.9 6.2.1 Continue Table 6.1 Initial and final permutation tables
  • 9. 6.12 6.2.1 Continued The initial and final permutations are straight P-boxes that are inverses of each other. They have no cryptography significance in DES. Note
  • 10. 6.13 DES uses 16 rounds. Each round of DES is a Feistel cipher. 6.2.2 Rounds Figure 6.4 A round in DES (encryption site)
  • 11. 6.14 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. 6.2.2 Continued DES Function Figure 6.5 DES function
  • 12. 6.15 Expansion P-box Since RI−1 is a 32-bit input and KI is a 48-bit key, we first need to expand RI−1 to 48 bits. 6.2.2 Continue Figure 6.6 Expansion permutation
  • 13. 6.16 Although the relationship between the input and output can be defined mathematically, DES uses Table 6.2 to define this P-box. 6.2.2 Continue Table 6.6 Expansion P-box table
  • 14. 6.17 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 note that the round key is used only in this operation. 6.2.2 Continue
  • 15. 6.18 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. 6.2.2 Continue Figure 6.7 S-boxes
  • 17. 6.20 Table 6.3 shows the permutation for S-box 1. For the rest of the boxes see the textbook. 6.2.2 Continue Table 6.3 S-box 1
  • 18. 6.23 Straight Permutation 6.2.2 Continue Table 6.11 Straight permutation table
  • 19. 6.24 Using mixers and swappers, we can create the cipher and reverse cipher, each having 16 rounds. 6.2.3 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. In the first approach, there is no swapper in the last round. Note
  • 20. 6.25 6.2.3 Continued Figure 6.9 DES cipher and reverse cipher for the first approach
  • 21. 6.26 6.2.3 Continued Algorithm 6.1 Pseudocode for DES cipher
  • 22. 6.27 6.2.3 Continued Algorithm 6.1 Pseudocode for DES cipher (Continued)
  • 23. 6.28 6.2.3 Continued Algorithm 6.1 Pseudocode for DES cipher (Continued)
  • 24. 6.29 6.2.3 Continued Algorithm 6.1 Pseudocode for DES cipher (Continued)
  • 25. 6.30 Alternative Approach 6.2.3 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.
  • 27. 6.32 6.2.3 Continued Table 6.12 Parity-bit drop table Table 6.13 Number of bits shifts
  • 28. 6.33 6.2.3 Continued Table 6.14 Key-compression table
  • 29. 6.34 6.2.3 Continued Algorithm 6.2 Algorithm for round-key generation
  • 30. 6.35 6.2.3 Continued Algorithm 6.2 Algorithm for round-key generation (Continue)
  • 31. 6.36 Example 6.5 6.2.4 Examples We choose a random plaintext block and a random key, and determine what the ciphertext block would be (all in hexadecimal): Table 6.15 Trace of data for Example 6.5
  • 32. 6.37 Example 6.5 Table 6.15 Trace of data for Example 6.5 (Conintued 6.2.4 Continued Continued
  • 33. 6.38 Example 6.6 6.2.4 Continued Let us see how Bob, at the destination, can decipher the ciphertext received from Alice using the same key. Table 6.16 shows some interesting points.
  • 34. 6.39 6-3 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. 6.3.1 Properties 6.3.2 Design Criteria 6.3.3 DES Weaknesses Topics discussed in this section:
  • 35. 6.40 Two desired properties of a block cipher are the avalanche effect and the completeness. 6.3.1 Properties Example 6.7 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.
  • 36. 6.41 Example 6.7 6.3.1 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. Table 6.17 Number of bit differences for Example 6.7 Continued
  • 37. 6.42 6.3.1 Continued Completeness effect Completeness effect means that each bit of the ciphertext needs to depend on many bits on the plaintext.
  • 38. 6.43 6.3.2 Design Criteria S-Boxe The design provides confusion and diffusion of bits from each round to the next. P-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.
  • 39. 6.44 During the last few years critics have found some weaknesses in DES. 6.3.3 DES Weaknesses Weaknesses in Cipher Design 1. Weaknesses in S-boxes 2. Weaknesses in P-boxes 3. Weaknesses in Key
  • 40. 6.46 6.3.3 Continued Figure 6.11 Double encryption and decryption with a weak key
  • 43. 6.49 6.3.3 Continued Figure 6.12 A pair of semi-weak keys in encryption and decryption
  • 45. 6.53 6-4 Multiple DES The major criticism of DES regards its key length. Fortunately DES is not a group. This means that we can use double or triple DES to increase the key size. 6.4.1 Double DES 6.4.4 Triple DES Topics discussed in this section:
  • 46. 6.55 The first approach is to use double DES (2DES). 6.4.1 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).
  • 47. 6.56 6.4.1 Continued Figure 6.14 Meet-in-the-middle attack for double DES
  • 48. 6.57 6.4.1 Continued Figure 6.15 Tables for meet-in-the-middle attack
  • 49. 6.58 6.4.2 Triple DES Figure 6.16 Triple DES with two keys
  • 50. 6.59 6.4.2 Continuous Triple DES with Three Keys The possibility of known-plaintext attacks on triple DES with two keys has enticed some applications to use triple DES with three keys. Triple DES with three keys is used by many applications such as PGP (See Chapter 16).