SlideShare a Scribd company logo
1 of 35
Data Encryption Standard (DES)
• Most widely used block cipher in the world
• Adopted in 1977 by National Bureau
Standards (NBS)
• Encrypts 64-bit data using 56-bit key
• Has widespread use
• Has been considerable controversy over its
security
2
DES
Details of A Single Iteration
• First the left and right half of each 64-bit are
treated as separate 32-bit quantities labelled L
(left) and R (Right).
• The overall process at each iteration can be
summarized in:
Where denotes the bitwise XOR function
)
,
( 1
1
1
i
i
i
i
i
i
K
R
f
L
R
R
L







Single Iteration of DES Algorithm
Algorithm in Details
Initial Permutation (see the permutation tables)
• The output bit 1 for example is the input bit
58
• If we take the inverse permutation:
It can be seen that the original ordering is
restored.
)
(M
IP
X 
))
(
(
)
( 1
1
M
IP
IP
X
IP
Y 



Permutation Tables of DES
Calculation of f (R,K) and S-Boxes
• First R input is expanded to 48 bit to be equal
to the iteration key by using the permutation
table.
• The resulting 48-bit of R is XOR ed with the
key and the result passes through a substitution
function (S-box) that produces 32-bit output.
• The 32-bit output is permuted as defined in the
permutation table also to produce the output.
i
K
i
K
Calculation of f (R,k)
S-Box Detail
• The input to each S-Box is 6 bits and the
output is 4 bits.
• The first and last bits of the input to box
from a 2-bit binary number to select a
particular row in the DES S-Box table.
• The middle 4 bit selects a particular column.
• The decimal value in the selected cell is
converted to a 4-bit binary output
i
S
Continue…
Example
• The input of 011011, the row is 01(row 1).
• The column is 1101 (column 13).
• The value in the row 1 and column 13 in the S-Box
table cell is 5 , so the output is (0101).
• The first and the last bit of the output select one of
four permutations for rows of the S-Box table
Definition of DES S-Boxes
12
Function f
S-Box Detail (Row 0 of S1)
Cryptography and Network Security 14
Sub-key Generation
• Given a 64 bits key (with parity-check bit)
– Discard the parity-check bits
– Permute the remaining bits using fixed table P1
– Let C0D0 be the result (total 56 bits)
• Let Ci =Shifti(Ci-1); Di =Shifti(Di-1) and Ki be
another permutation P2 of CiDi (total 56
bits)
– Where cyclic shift one position left if i=1,2,9,16
– Else cyclic shift two positions left
Key Generation
Key Generation
• First the 56-bit key is subjected to a
permutation governed by the DES key
calculation table.
• Then the 56-bit is treated as 28-bit quantities
labelled Co and Do.
• C and D are separately subjected to a circular
shift or rotation of 1 or 2 bit governed by the
DES key calculation table.
• They are also serve as input to another
permutation to produce the 48-bit output.
Table Used for DES Key Calculation
Cryptography and Network Security 17
DES Weak Keys
• With many block ciphers there are some
keys that should be avoided, because of
reduced cipher complexity
• These keys are such that the same sub-key
is generated in more than one round, and
they include:
Cryptography and Network Security 18
Continue….
• Weak keys
– The same sub-key is generated for every round
– DES has 4 weak keys
• Semi-weak keys
– Only two sub-keys are generated on alternate
rounds
– DES has 12 of these (in 6 pairs)
• Demi-semi weak keys
– Have four sub-keys generated
Cryptography and Network Security 19
Continue….
• None of these causes a problem since they
are a tiny fraction of all available keys
• However they MUST be avoided by any key
generation program
DES Decryption
• The process of decryption is the same as the
encryption process.
• The rule is as follows: use the cipher text as
input to the DES algorithm but use the keys
in reverse order. That is use on the first
iteration and on the second and son on
i
K
16
K
15
K
DES Encryption and Decryption
22
DES in Practice
• DEC (Digital Equipment Corp. 1992) built a
chip with 50k transistors
– Encrypt at the rate of 1G/second
– Clock rate 250 Mhz
– Cost about $300
• Applications
– ATM transactions (encrypting PIN and so on)
The Strength of DES
• Concerns about the strength of DES fall into two
categories:
–Concerns about the algorithm itself (nothing so
far).
–Concerns about the use of 56-bit key.
• Electronic Frontier Foundation (EFF) announced
that it had broken a new DES encryption using a
“DES Cracker” machine for less than $250,000.
• A 128 bit key is guaranteed for unbreakable
algorithm by Brute-Force.
Time To Break A Code
(106 decryption/ s)
Cryptography and Network Security 25
DES Attacks
1998:
The EFF's US$250,000
DES cracking machine
contained 1,536 custom chips
and could brute force a DES key in a
matter of days —
the photo shows a DES Cracker
circuit board fitted
with several Deep Crack chips.
Cryptography and Network Security 26
DES Attacks:
The COPACOBANA machine,
built for US$10,000 by the
Universities of Bochum and
Kiel, contains 120 low-cost
FPGAs and can perform an
exhaustive key search on
DES in 9 days on average.
The photo shows the
backplane of the machine
with the FPGAs
Cryptography and Network Security 27
Attack Faster than Brute Force
• Differential cryptanalysis
– was discovered in the late 1980s by Eli Biham and Adi Shamir, although
it was known earlier to both IBM and the NSA and kept secret. To
break the full 16 rounds, differential cryptanalysis requires 247 chosen
plaintexts. DES was designed to be resistant to DC.
• Linear cryptanalysis
– was discovered by Mitsuru Matsui, and needs 243 known plaintexts
(Matsui, 1993); the method was implemented (Matsui, 1994), and was
the first experimental cryptanalysis of DES to be reported. There is no
evidence that DES was tailored to be resistant to this type of attack.
28
Possible Techniques for Improving DES
• Multiple enciphering with DES
• Extending DES to 128-bit data paths and 112-bit
keys
• Extending the key expansion calculation
Double DES
• The simplified form of multiple encryption has
two encryption stage and two keys.
• Given a plaintext P and two keys K1 and K2
one can generate a cipher text C as:
Decryption equation is :
• The key length is 562= 112 bits
]]
[
[ 1
2
P
E
E
C K
K

]]
[
[ 2
1
C
D
D
P K
K

Double Encryption
E E C
P
X
K1 K2
Encryption
D D P
C
X
K2 K1
Decryption
Cryptography and Network Security 31
Double DES
• Using two encryption stages and two keys
– C=Ek2(Ek1(P))
– P=Dk1(Dk2(C))
• It is proved that there is no key k3 such that
– C=Ek2(Ek1(P))=Ek3(P)
• But Meet-in-the-middle attack
Cryptography and Network Security 32
Meet-in-the-Middle Attack
• Assume C=Ek2(Ek1(P))
• Given the plaintext P and ciphertext C
• Encrypt P using all possible keys k1
• Decrypt C using all possible keys k2
– Check the result with the encrypted plaintext
lists
– If found match, they test the found keys again
for another plaintext and ciphertext pair
– If it turns correct, then find the keys
– Otherwise keep decrypting C
Continue….
• Given a known pair (P,C), the attack proceeds
as follows:
• Encrypt all the 256 possible values of K1store
the results in a table.
• Next decrypt C using all the 256 possible
values of K2 .
• Check the matching between the two tables. If
the matching occurs then you recognized the
two keys.
Cryptography and Network Security 34
Triple DES
• DES variant
• Standardized in ANSI X9.17 & ISO 8732 and
in PEM for key management
• Proposed for general EFT standard by ANSI
X9
• Backwards compatible with many DES
schemes
• Uses 2 or 3 keys
Cryptography and Network Security 35
Continue….
• No known practical attacks
• Brute force search impossible (very hard)
• Meet-in-the-middle attacks need 256
Plaintext-Cipher text pairs per key
• Popular current alternative

More Related Content

Similar to section-8.ppt

4. Block Ciphers
4. Block Ciphers 4. Block Ciphers
4. Block Ciphers Sam Bowne
 
Chapter 3: Block Ciphers and the Data Encryption Standard
Chapter 3: Block Ciphers and the Data Encryption StandardChapter 3: Block Ciphers and the Data Encryption Standard
Chapter 3: Block Ciphers and the Data Encryption StandardShafaan Khaliq Bhatti
 
Two fish & Rijndael (AES) Encryption Algorithm
Two fish & Rijndael (AES) Encryption AlgorithmTwo fish & Rijndael (AES) Encryption Algorithm
Two fish & Rijndael (AES) Encryption AlgorithmRifat Tasnim
 
Cybersecurity cyberlab3
Cybersecurity cyberlab3Cybersecurity cyberlab3
Cybersecurity cyberlab3rayborg
 
3. The Data Encryption Standard (DES) and Alternatives
3. The Data Encryption Standard (DES) and Alternatives3. The Data Encryption Standard (DES) and Alternatives
3. The Data Encryption Standard (DES) and AlternativesSam Bowne
 
Block ciphers & public key cryptography
Block ciphers & public key cryptographyBlock ciphers & public key cryptography
Block ciphers & public key cryptographyRAMPRAKASHT1
 
Jaimin chp-8 - network security-new -use this - 2011 batch
Jaimin   chp-8 - network security-new -use this -  2011 batchJaimin   chp-8 - network security-new -use this -  2011 batch
Jaimin chp-8 - network security-new -use this - 2011 batchJaimin Jani
 
Different types of Symmetric key Cryptography
Different types of Symmetric key CryptographyDifferent types of Symmetric key Cryptography
Different types of Symmetric key Cryptographysubhradeep mitra
 
Block Cipher.cryptography_miu_year5.pptx
Block Cipher.cryptography_miu_year5.pptxBlock Cipher.cryptography_miu_year5.pptx
Block Cipher.cryptography_miu_year5.pptxHodaAhmedBekhitAhmed
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
block ciphers
block ciphersblock ciphers
block ciphersAsad Ali
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 

Similar to section-8.ppt (20)

Cryptography - 101
Cryptography - 101Cryptography - 101
Cryptography - 101
 
03 UNIT-2.pdf
03 UNIT-2.pdf03 UNIT-2.pdf
03 UNIT-2.pdf
 
4. Block Ciphers
4. Block Ciphers 4. Block Ciphers
4. Block Ciphers
 
chap3.pdf
chap3.pdfchap3.pdf
chap3.pdf
 
Chapter 3: Block Ciphers and the Data Encryption Standard
Chapter 3: Block Ciphers and the Data Encryption StandardChapter 3: Block Ciphers and the Data Encryption Standard
Chapter 3: Block Ciphers and the Data Encryption Standard
 
Two fish & Rijndael (AES) Encryption Algorithm
Two fish & Rijndael (AES) Encryption AlgorithmTwo fish & Rijndael (AES) Encryption Algorithm
Two fish & Rijndael (AES) Encryption Algorithm
 
Cybersecurity cyberlab3
Cybersecurity cyberlab3Cybersecurity cyberlab3
Cybersecurity cyberlab3
 
Network Security Lec4
Network Security Lec4Network Security Lec4
Network Security Lec4
 
3. The Data Encryption Standard (DES) and Alternatives
3. The Data Encryption Standard (DES) and Alternatives3. The Data Encryption Standard (DES) and Alternatives
3. The Data Encryption Standard (DES) and Alternatives
 
Block ciphers & public key cryptography
Block ciphers & public key cryptographyBlock ciphers & public key cryptography
Block ciphers & public key cryptography
 
Symmetric
SymmetricSymmetric
Symmetric
 
Jaimin chp-8 - network security-new -use this - 2011 batch
Jaimin   chp-8 - network security-new -use this -  2011 batchJaimin   chp-8 - network security-new -use this -  2011 batch
Jaimin chp-8 - network security-new -use this - 2011 batch
 
Blockchain Technology - Week 9 - Blockciphers
Blockchain Technology - Week 9 - BlockciphersBlockchain Technology - Week 9 - Blockciphers
Blockchain Technology - Week 9 - Blockciphers
 
Different types of Symmetric key Cryptography
Different types of Symmetric key CryptographyDifferent types of Symmetric key Cryptography
Different types of Symmetric key Cryptography
 
Block Cipher.cryptography_miu_year5.pptx
Block Cipher.cryptography_miu_year5.pptxBlock Cipher.cryptography_miu_year5.pptx
Block Cipher.cryptography_miu_year5.pptx
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
block ciphers
block ciphersblock ciphers
block ciphers
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
Des1
Des1Des1
Des1
 

Recently uploaded

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 

Recently uploaded (20)

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 

section-8.ppt

  • 1. Data Encryption Standard (DES) • Most widely used block cipher in the world • Adopted in 1977 by National Bureau Standards (NBS) • Encrypts 64-bit data using 56-bit key • Has widespread use • Has been considerable controversy over its security
  • 3. Details of A Single Iteration • First the left and right half of each 64-bit are treated as separate 32-bit quantities labelled L (left) and R (Right). • The overall process at each iteration can be summarized in: Where denotes the bitwise XOR function ) , ( 1 1 1 i i i i i i K R f L R R L       
  • 4. Single Iteration of DES Algorithm
  • 5. Algorithm in Details Initial Permutation (see the permutation tables) • The output bit 1 for example is the input bit 58 • If we take the inverse permutation: It can be seen that the original ordering is restored. ) (M IP X  )) ( ( ) ( 1 1 M IP IP X IP Y    
  • 7. Calculation of f (R,K) and S-Boxes • First R input is expanded to 48 bit to be equal to the iteration key by using the permutation table. • The resulting 48-bit of R is XOR ed with the key and the result passes through a substitution function (S-box) that produces 32-bit output. • The 32-bit output is permuted as defined in the permutation table also to produce the output. i K i K
  • 9. S-Box Detail • The input to each S-Box is 6 bits and the output is 4 bits. • The first and last bits of the input to box from a 2-bit binary number to select a particular row in the DES S-Box table. • The middle 4 bit selects a particular column. • The decimal value in the selected cell is converted to a 4-bit binary output i S
  • 10. Continue… Example • The input of 011011, the row is 01(row 1). • The column is 1101 (column 13). • The value in the row 1 and column 13 in the S-Box table cell is 5 , so the output is (0101). • The first and the last bit of the output select one of four permutations for rows of the S-Box table
  • 11. Definition of DES S-Boxes
  • 13. S-Box Detail (Row 0 of S1)
  • 14. Cryptography and Network Security 14 Sub-key Generation • Given a 64 bits key (with parity-check bit) – Discard the parity-check bits – Permute the remaining bits using fixed table P1 – Let C0D0 be the result (total 56 bits) • Let Ci =Shifti(Ci-1); Di =Shifti(Di-1) and Ki be another permutation P2 of CiDi (total 56 bits) – Where cyclic shift one position left if i=1,2,9,16 – Else cyclic shift two positions left Key Generation
  • 15. Key Generation • First the 56-bit key is subjected to a permutation governed by the DES key calculation table. • Then the 56-bit is treated as 28-bit quantities labelled Co and Do. • C and D are separately subjected to a circular shift or rotation of 1 or 2 bit governed by the DES key calculation table. • They are also serve as input to another permutation to produce the 48-bit output.
  • 16. Table Used for DES Key Calculation
  • 17. Cryptography and Network Security 17 DES Weak Keys • With many block ciphers there are some keys that should be avoided, because of reduced cipher complexity • These keys are such that the same sub-key is generated in more than one round, and they include:
  • 18. Cryptography and Network Security 18 Continue…. • Weak keys – The same sub-key is generated for every round – DES has 4 weak keys • Semi-weak keys – Only two sub-keys are generated on alternate rounds – DES has 12 of these (in 6 pairs) • Demi-semi weak keys – Have four sub-keys generated
  • 19. Cryptography and Network Security 19 Continue…. • None of these causes a problem since they are a tiny fraction of all available keys • However they MUST be avoided by any key generation program
  • 20. DES Decryption • The process of decryption is the same as the encryption process. • The rule is as follows: use the cipher text as input to the DES algorithm but use the keys in reverse order. That is use on the first iteration and on the second and son on i K 16 K 15 K
  • 21. DES Encryption and Decryption
  • 22. 22 DES in Practice • DEC (Digital Equipment Corp. 1992) built a chip with 50k transistors – Encrypt at the rate of 1G/second – Clock rate 250 Mhz – Cost about $300 • Applications – ATM transactions (encrypting PIN and so on)
  • 23. The Strength of DES • Concerns about the strength of DES fall into two categories: –Concerns about the algorithm itself (nothing so far). –Concerns about the use of 56-bit key. • Electronic Frontier Foundation (EFF) announced that it had broken a new DES encryption using a “DES Cracker” machine for less than $250,000. • A 128 bit key is guaranteed for unbreakable algorithm by Brute-Force.
  • 24. Time To Break A Code (106 decryption/ s)
  • 25. Cryptography and Network Security 25 DES Attacks 1998: The EFF's US$250,000 DES cracking machine contained 1,536 custom chips and could brute force a DES key in a matter of days — the photo shows a DES Cracker circuit board fitted with several Deep Crack chips.
  • 26. Cryptography and Network Security 26 DES Attacks: The COPACOBANA machine, built for US$10,000 by the Universities of Bochum and Kiel, contains 120 low-cost FPGAs and can perform an exhaustive key search on DES in 9 days on average. The photo shows the backplane of the machine with the FPGAs
  • 27. Cryptography and Network Security 27 Attack Faster than Brute Force • Differential cryptanalysis – was discovered in the late 1980s by Eli Biham and Adi Shamir, although it was known earlier to both IBM and the NSA and kept secret. To break the full 16 rounds, differential cryptanalysis requires 247 chosen plaintexts. DES was designed to be resistant to DC. • Linear cryptanalysis – was discovered by Mitsuru Matsui, and needs 243 known plaintexts (Matsui, 1993); the method was implemented (Matsui, 1994), and was the first experimental cryptanalysis of DES to be reported. There is no evidence that DES was tailored to be resistant to this type of attack.
  • 28. 28 Possible Techniques for Improving DES • Multiple enciphering with DES • Extending DES to 128-bit data paths and 112-bit keys • Extending the key expansion calculation
  • 29. Double DES • The simplified form of multiple encryption has two encryption stage and two keys. • Given a plaintext P and two keys K1 and K2 one can generate a cipher text C as: Decryption equation is : • The key length is 562= 112 bits ]] [ [ 1 2 P E E C K K  ]] [ [ 2 1 C D D P K K 
  • 30. Double Encryption E E C P X K1 K2 Encryption D D P C X K2 K1 Decryption
  • 31. Cryptography and Network Security 31 Double DES • Using two encryption stages and two keys – C=Ek2(Ek1(P)) – P=Dk1(Dk2(C)) • It is proved that there is no key k3 such that – C=Ek2(Ek1(P))=Ek3(P) • But Meet-in-the-middle attack
  • 32. Cryptography and Network Security 32 Meet-in-the-Middle Attack • Assume C=Ek2(Ek1(P)) • Given the plaintext P and ciphertext C • Encrypt P using all possible keys k1 • Decrypt C using all possible keys k2 – Check the result with the encrypted plaintext lists – If found match, they test the found keys again for another plaintext and ciphertext pair – If it turns correct, then find the keys – Otherwise keep decrypting C
  • 33. Continue…. • Given a known pair (P,C), the attack proceeds as follows: • Encrypt all the 256 possible values of K1store the results in a table. • Next decrypt C using all the 256 possible values of K2 . • Check the matching between the two tables. If the matching occurs then you recognized the two keys.
  • 34. Cryptography and Network Security 34 Triple DES • DES variant • Standardized in ANSI X9.17 & ISO 8732 and in PEM for key management • Proposed for general EFT standard by ANSI X9 • Backwards compatible with many DES schemes • Uses 2 or 3 keys
  • 35. Cryptography and Network Security 35 Continue…. • No known practical attacks • Brute force search impossible (very hard) • Meet-in-the-middle attacks need 256 Plaintext-Cipher text pairs per key • Popular current alternative