SlideShare a Scribd company logo
1 of 33
30.1
Chapter 30
Cryptography
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
30.2
30-1 INTRODUCTION
Let us introduce the issues involved in cryptography.
First, we need to define some terms; then we give some
taxonomies.
Definitions
Two Categories
Topics discussed in this section:
30.3
Figure 30.1 Cryptography components
30.4
Figure 30.2 Categories of cryptography
30.5
Figure 30.3 Symmetric-key cryptography
30.6
In symmetric-key cryptography, the
same key is used by the sender
(for encryption)
and the receiver (for decryption).
The key is shared.
Note
30.7
Figure 30.4 Asymmetric-key cryptography
30.8
Figure 30.6 Comparison between two categories of cryptography
30.9
30-2 SYMMETRIC-KEY CRYPTOGRAPHY
Symmetric-key cryptography started thousands of years
ago when people needed to exchange secrets (for
example, in a war). We still mainly use symmetric-key
cryptography in our network security.
Traditional Ciphers
Simple Modern Ciphers
Modern Round Ciphers
Mode of Operation
Topics discussed in this section:
30.10
Figure 30.7 Traditional ciphers
30.11
A substitution cipher replaces one
symbol with another.
Monoalphabetic replaces the same symbol
with the same another symbol.
Polyalphabetic replaces the same symbol
with different symbols at each occurrence.
Note
30.12
The shift cipher is sometimes referred to
as the Caesar cipher. (monoalphabetic)
Note
30.13
Use the shift cipher with key = 15 to encrypt the message
“HELLO.”
Solution
We encrypt one character at a time. Each character is
shifted 15 characters “down”. Letter H is encrypted to W.
Letter E is encrypted to T. The first L is encrypted to A.
The second L is also encrypted to A. And O is encrypted to
D. The cipher text is WTAAD.
Example 30.3
30.14
Use the shift cipher with key = 15 to decrypt the message
“WTAAD.”
Solution
We decrypt one character at a time. Each character is
shifted 15 characters “up”. Letter W is decrypted to H.
Letter T is decrypted to E. The first A is decrypted to L.
The second A is decrypted to L. And, finally, D is
decrypted to O. The plaintext is HELLO.
Example 30.4
30.15
A transposition cipher reorders
(permutes) symbols in a block of
symbols (shuffle poker cards)
Note
30.16
Figure 30.8 Transposition cipher
30.17
Encrypt the message “HELLO MY DEAR,” using the key
shown in Figure 30.8.
Solution
We first remove the spaces in the message. We then divide
the text into blocks of four characters. We add a bogus
character Z at the end of the third block. The result is
HELL OMYD EARZ. We create a three-block ciphertext
ELHLMDOYAZER.
Example 30.5
30.18
Using Example 30.5, decrypt the message
“ELHLMDOYAZER”.
Solution
The result is HELL OMYD EARZ. After removing the
bogus character and combining the characters, we get the
original message “HELLO MY DEAR.”
Example 30.6
30.19
Modern Cryptography
30.20
Figure 30.9 XOR cipher
30.21
Figure 30.10 Rotation cipher
30.22
Figure 30.11 S-box (substitution box)
30.23
Figure 30.12 P-boxes (permutation box): straight, expansion, and compression
30.24
Figure 30.13 DES (Data Encryption Standard)
30.25
Figure 30.14 One round in DES ciphers
30.26
Figure 30.16 Triple DES (to resolve the short key issue for DES)
30.27
Table 30.1 AES (advanced encryption standard) configuration
AES is the replacement of DES
AES has three different configurations
with respect to the number of rounds
and key size.
Note
30.28
30-3 ASYMMETRIC-KEY CRYPTOGRAPHY
An asymmetric-key (or public-key) cipher uses two
keys: one private and one public. We discuss two
algorithms: RSA and Diffie-Hellman.
RSA
Diffie-Hellman
Topics discussed in this section:
30.29
Figure 30.24 RSA
RSA: Choosing keys
1. Choose two large prime numbers p, q.
(e.g., 1024 bits each)
2. Compute n = pq, F = (p-1)(q-1)
3. Choose e (with e<n) that has no common factors
with F. (e, F are “relatively prime”).
4. Choose d such that ed-1 is exactly divisible by F.
(in other words: ed mod F = 1 ).
5. Public key is (n,e). Private key is (n,d).
KB
+
KB
-
RSA: Encryption, decryption
0. Given (n,e) and (n,d) as computed above
1. To encrypt bit pattern, m, compute
c = m mod n
e
(i.e., remainder when m is divided by n)
e
2. To decrypt received bit pattern, c, compute
m = c mod n
d
(i.e., remainder when c is divided by n)
d
m = (m mod n)
e mod n
d
Magic
happens! c
RSA example:
Bob chooses p=5, q=7. Then n=35, F =24.
e=5 (so e, F relatively prime).
d=29 (so ed-1 exactly divisible by F).
letter m m
e c = m mod n
e
l 12 1524832 17
c m = c mod n
d
17 481968572106750915091411825223071697
12
cd letter
l
encrypt:
decrypt:
Computational very extensive
30.33
In RSA, e and n are announced to the
public; d and F are kept secret.
Public cryptography is very
computational expensive.
Note

More Related Content

Similar to ch30.ppt

Similar to ch30.ppt (20)

Unit 3
Unit 3Unit 3
Unit 3
 
Ch 29
Ch 29Ch 29
Ch 29
 
New ppt.ppt
New ppt.pptNew ppt.ppt
New ppt.ppt
 
Number Theory In Cryptography
Number Theory In CryptographyNumber Theory In Cryptography
Number Theory In Cryptography
 
Presentation on Cryptography_Based on IEEE_Paper
Presentation on Cryptography_Based on IEEE_PaperPresentation on Cryptography_Based on IEEE_Paper
Presentation on Cryptography_Based on IEEE_Paper
 
Stallings Kurose and Ross
Stallings Kurose and RossStallings Kurose and Ross
Stallings Kurose and Ross
 
F010243136
F010243136F010243136
F010243136
 
Threshold-optimal DSAECDSA signatures and an application to Bitcoin wallet se...
Threshold-optimal DSAECDSA signatures and an application to Bitcoin wallet se...Threshold-optimal DSAECDSA signatures and an application to Bitcoin wallet se...
Threshold-optimal DSAECDSA signatures and an application to Bitcoin wallet se...
 
Chapter 8 v6.0
Chapter 8 v6.0Chapter 8 v6.0
Chapter 8 v6.0
 
RSA Algorithem and information about rsa
RSA Algorithem and information about rsaRSA Algorithem and information about rsa
RSA Algorithem and information about rsa
 
Rsa
RsaRsa
Rsa
 
encryption and decryption
encryption and decryptionencryption and decryption
encryption and decryption
 
Rsa cryptosystem
Rsa cryptosystemRsa cryptosystem
Rsa cryptosystem
 
Senior Research Final Draft3
Senior Research Final Draft3Senior Research Final Draft3
Senior Research Final Draft3
 
Chapter 8 - Computer Networking a top-down Approach 7th
Chapter 8 - Computer Networking a top-down Approach 7thChapter 8 - Computer Networking a top-down Approach 7th
Chapter 8 - Computer Networking a top-down Approach 7th
 
How to invent a new cryptosystem.pdf
How to invent a new cryptosystem.pdfHow to invent a new cryptosystem.pdf
How to invent a new cryptosystem.pdf
 
Encryption
EncryptionEncryption
Encryption
 
Computer Security (Cryptography) Ch02
Computer Security (Cryptography) Ch02Computer Security (Cryptography) Ch02
Computer Security (Cryptography) Ch02
 
Rsa
RsaRsa
Rsa
 
Interest Rate Modeling With Cox Ingersoll Ross
Interest Rate Modeling With Cox Ingersoll RossInterest Rate Modeling With Cox Ingersoll Ross
Interest Rate Modeling With Cox Ingersoll Ross
 

Recently uploaded

OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 

Recently uploaded (20)

★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 

ch30.ppt

  • 1. 30.1 Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
  • 2. 30.2 30-1 INTRODUCTION Let us introduce the issues involved in cryptography. First, we need to define some terms; then we give some taxonomies. Definitions Two Categories Topics discussed in this section:
  • 4. 30.4 Figure 30.2 Categories of cryptography
  • 6. 30.6 In symmetric-key cryptography, the same key is used by the sender (for encryption) and the receiver (for decryption). The key is shared. Note
  • 8. 30.8 Figure 30.6 Comparison between two categories of cryptography
  • 9. 30.9 30-2 SYMMETRIC-KEY CRYPTOGRAPHY Symmetric-key cryptography started thousands of years ago when people needed to exchange secrets (for example, in a war). We still mainly use symmetric-key cryptography in our network security. Traditional Ciphers Simple Modern Ciphers Modern Round Ciphers Mode of Operation Topics discussed in this section:
  • 11. 30.11 A substitution cipher replaces one symbol with another. Monoalphabetic replaces the same symbol with the same another symbol. Polyalphabetic replaces the same symbol with different symbols at each occurrence. Note
  • 12. 30.12 The shift cipher is sometimes referred to as the Caesar cipher. (monoalphabetic) Note
  • 13. 30.13 Use the shift cipher with key = 15 to encrypt the message “HELLO.” Solution We encrypt one character at a time. Each character is shifted 15 characters “down”. Letter H is encrypted to W. Letter E is encrypted to T. The first L is encrypted to A. The second L is also encrypted to A. And O is encrypted to D. The cipher text is WTAAD. Example 30.3
  • 14. 30.14 Use the shift cipher with key = 15 to decrypt the message “WTAAD.” Solution We decrypt one character at a time. Each character is shifted 15 characters “up”. Letter W is decrypted to H. Letter T is decrypted to E. The first A is decrypted to L. The second A is decrypted to L. And, finally, D is decrypted to O. The plaintext is HELLO. Example 30.4
  • 15. 30.15 A transposition cipher reorders (permutes) symbols in a block of symbols (shuffle poker cards) Note
  • 17. 30.17 Encrypt the message “HELLO MY DEAR,” using the key shown in Figure 30.8. Solution We first remove the spaces in the message. We then divide the text into blocks of four characters. We add a bogus character Z at the end of the third block. The result is HELL OMYD EARZ. We create a three-block ciphertext ELHLMDOYAZER. Example 30.5
  • 18. 30.18 Using Example 30.5, decrypt the message “ELHLMDOYAZER”. Solution The result is HELL OMYD EARZ. After removing the bogus character and combining the characters, we get the original message “HELLO MY DEAR.” Example 30.6
  • 22. 30.22 Figure 30.11 S-box (substitution box)
  • 23. 30.23 Figure 30.12 P-boxes (permutation box): straight, expansion, and compression
  • 24. 30.24 Figure 30.13 DES (Data Encryption Standard)
  • 25. 30.25 Figure 30.14 One round in DES ciphers
  • 26. 30.26 Figure 30.16 Triple DES (to resolve the short key issue for DES)
  • 27. 30.27 Table 30.1 AES (advanced encryption standard) configuration AES is the replacement of DES AES has three different configurations with respect to the number of rounds and key size. Note
  • 28. 30.28 30-3 ASYMMETRIC-KEY CRYPTOGRAPHY An asymmetric-key (or public-key) cipher uses two keys: one private and one public. We discuss two algorithms: RSA and Diffie-Hellman. RSA Diffie-Hellman Topics discussed in this section:
  • 30. RSA: Choosing keys 1. Choose two large prime numbers p, q. (e.g., 1024 bits each) 2. Compute n = pq, F = (p-1)(q-1) 3. Choose e (with e<n) that has no common factors with F. (e, F are “relatively prime”). 4. Choose d such that ed-1 is exactly divisible by F. (in other words: ed mod F = 1 ). 5. Public key is (n,e). Private key is (n,d). KB + KB -
  • 31. RSA: Encryption, decryption 0. Given (n,e) and (n,d) as computed above 1. To encrypt bit pattern, m, compute c = m mod n e (i.e., remainder when m is divided by n) e 2. To decrypt received bit pattern, c, compute m = c mod n d (i.e., remainder when c is divided by n) d m = (m mod n) e mod n d Magic happens! c
  • 32. RSA example: Bob chooses p=5, q=7. Then n=35, F =24. e=5 (so e, F relatively prime). d=29 (so ed-1 exactly divisible by F). letter m m e c = m mod n e l 12 1524832 17 c m = c mod n d 17 481968572106750915091411825223071697 12 cd letter l encrypt: decrypt: Computational very extensive
  • 33. 30.33 In RSA, e and n are announced to the public; d and F are kept secret. Public cryptography is very computational expensive. Note