SlideShare a Scribd company logo
1 of 28
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 10
Asymmetric-Key
Cryptography
10.1
Objectives
 Present asymmetric-key cryptography.
 Distinguish between symmetric-key cryptography
and asymmetric-key cryptography.
 Introduce trapdoor one-way functions and their
use in asymmetric-key cryptosystems
 Discuss the RSAcryptosystem
10.2
10-1 INTRODUCTION
The advent of asymmetric-key cryptography does not eliminate
the need for symmetric-key cryptography. Symmetric and
asymmetric-key cryptography will exist in parallel and continue
to serve the community. We actually believe that they are
complements of each other; the advantages of one can
compensate for the disadvantages of the other.
Topics discussed in this section:
Keys
General Idea
Asymmetric Cryptography Practices
Symmetric Cryptography Versus Asymmetric Cryptography
Trapdoor One-Way Function
10.3
10.1.1 Keys
Asymmetric key cryptography, known as public key
cryptography, uses two separate keys: one private and one
public.
Figure 10.1 Locking and unlocking in asymmetric-key cryptosystem
10.4
10.1.2 General Idea
Figure 10.2 General idea of asymmetric-key cryptosystem
C = f (Kpublic , P)
P = g(Kprivate , C)
10.5
Asymmetric Cryptography Practices [2]
10.6
Symmetric Cryptography Versus Asymmetric
Cryptography
Symmetric-key cryptography is based on sharing secrecy;
asymmetric-key cryptography is based on personal secrecy.
Note-1
In symmetric-key cryptography system, the number of keys
needed for each user is 1.
In asymmetric-key cryptography system, the number of
keys needed for each user is 2.
Note-2
10.7
Symmetric Cryptography Versus Asymmetric
Cryptography (cont.)
Symmetric-key cryptography is appropriate for long
messages, and the speed of encryption/decryption is fast.
Asymmetric-key cryptography is appropriate for short
messages, and the speed of encryption/decryption is slow.
Note-4
In symmetric-key cryptography, symbols in plaintext and
ciphertext are permuted or substituted.
In asymmetric-key cryptography, plaintext and ciphertext
are treated as integers.
Note-3
10.8
The main idea behind asymmetric-key cryptography is the
concept of the trapdoor one-way function.
10.1.4 Trapdoor One-Way Function
Functions
Figure 10.3 A function as rule mapping a domain to a range
10.9
Trapdoor One-Way Function (TOWF(
10.1.4 Continued
One-Way Function (OWF(
1. f is easy to compute  y=f(x)
2.
10.10
is difficult to compute  x=f (y)
f −1
3. Given y and a trapdoor, x can be
computed easily.
-1
10.1.4 Continued
10.11
Example 10. 1
Example 10. 2
When n is large and p&q are prime numbers, such that
n = p × q is a one-way function. Given p and q , it is
always easy to calculate n ; given n, it is very difficult to
compute p and q. This is the factorization problem.
y mod n to find x. (Note: Φ(n)=(p-1)(q-1))
k
When n is large, the function y = x mod n is a trapdoor
one-way function. Given x, k, and n, it is easy to calculate
y. Given y, k, and n, it is very difficult to calculate x. This is
the discrete logarithm problem. However, if we know the
trapdoor, k′ such that k × k ′ = 1 mod Φ(n), we can use x =
k’
10-2 RSA CRYPTOSYSTEM
The most common public-key algorithm is the RSA
cryptosystem, named for its inventors (Rivest, Shamir,
and Adleman).
Topics discussed in this section:
1. Introduction
2. Procedure
3. Some Trivial Examples
4. Attacks on RSA
5. Recommendations
10.12
10.2.1 Introduction
Figure 10.5 Complexity of operations in RSA
10.13
10.2.2
Procedure
Figure 10.6
Encryption, decryption, and key generation in RSA
10.14
10.2.2 Continued
In RSA, e and n are announced to the public; d and Φ are
kept secret.
10.15
When Alice wants Bob to send her a message, she:
 Selects two (large) primes p, q, TOP SECRET,
 Computes n = pq and (n) = (p-1)(q-1). (n) is TOP SECRET.
 Selects an integer e, 1 < e < (n), such that gcd(e, (n)) = 1,
 Computes d, such that d*e (mod (n))=1, d also TOP SECRET,
 Gives public key (e, n) to Bob, and keeps her private key d.
10.2.2 Continued
10.16
Encryption
10.2.2 Continued
If the plaintext P is larger than n, then P has to be encrypted letter by
letter.
10.17
Decryption
10.2.2 Continued
10.18
10.2.3 Some Trivial Examples
Example 10. 5
Bob chooses 7 and 11 as p and q and calculates n = 77. The value of
f(n) = (7 − 1)(11 − 1) or 60. Now he chooses two exponents, e and d,
from Z60∗. If he chooses e to be 13, then d is 37. Note that e × d mod
60 = 1 (they are inverses of each Now imagine that Alice wants to
send the plaintext 5 to Bob. She uses the public exponent 13 to encrypt
5.
Bob receives the ciphertext 26 and uses the private key 37 to
decipher the ciphertext:
10.19
10.2.2 Fast Exponentiation Algorithm
Example 10. 5 (cont.)
10.20
52 = (5) =625 mod77 = 9
5 =(5 ) =(9) mod 77 =4
Calculate 513
mod 77:
51 = 5 mod77 = 5
52 = 25 mod77 = 5
5 =5 *5 *5 = 5*9*4 = 180 mod 77= 26
4 2
1 4 8
13
2
8 4 2 2
10.2.3 Some Trivial Examples
Example 10. 6
Now assume that another person, John, wants to send a message to Bob.
John can use the same public key announced by Bob (probably on his
website), 13; John’s plaintext is 63. John calculates the following:
Bob receives the ciphertext 28 and uses his private key 37 to
decipher the ciphertext:
10.21
10.2.3 Some Trivial Examples
Example 10. 7
10.22
Jennifer creates a pair of keys for herself. She chooses p = 397 and q
401 = She calculates n = 159197. She then calculates f(n) = 158400.
She then chooses e = 343 and d = 12007. Show how Ted can send a
message to Jennifer if he knows e and n.
Suppose Ted wants to send the message “NO” to Jennifer. He changes
each character to a number (from 00 to 25), with each character coded
as two digits. He then concatenates the two coded characters and gets
a four-digit number. The plaintext is 1314. Figure
10.7 shows the process.
10.2.3 Continued
Figure 10.7 Encryption and decryption in Example 10.7
10.23
Example: if P>n
10.24
Alice want to send Bob the message “NO”
Bob Public key (13,77) , Private key (37)
Alice:
Encoding “NO” => 1314
P has to be encrypted letter by letter:
C=4149
P Encoding P e mod n C
N 13 13 13 mod 77 41
O 14 14 13 mod 77 49
10.2.4 Attacks on RSA
Figure 10.8 Taxonomy of potential attacks on RSAl
10.25
10.2.4 Continued
10.26
Factorization Attack
 The security of RSA is based on the idea that the modulus is so
large that is infeasible to factor it in reasonable time.
 Even though n is public, p & q are secret. If Eve can factor n and
get p & q, she can calculate Φ(n). Then she can calculate d=e-1
mod Φ(n) because e is public.
Recommendations
10.27
 The number of bits in n should be at least 1024.
 Two primes p & q must be 512 bit at least.
 p & q should not be close to each other.
 Modulus n must not be shared.
 If d is leaked, immediately change n, e and d.
 Message must be padded by OAEP.
1Chapter 10, Introduction to CRYPTOGRAPHY and
NETWORK SECURITY, Behrouz A.Forouzan.
2Chapter 11, Security+ Guide to Network Security
Fundamentals, Third Edition.
References
10.28

More Related Content

What's hot

Data Encryption and Decryption using Hill Cipher
Data Encryption and Decryption using Hill CipherData Encryption and Decryption using Hill Cipher
Data Encryption and Decryption using Hill CipherAashirwad Kashyap
 
Key Management and Distribution
Key Management and DistributionKey Management and Distribution
Key Management and DistributionSyed Bahadur Shah
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network securitypatisa
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYKathirvel Ayyaswamy
 
block ciphers
block ciphersblock ciphers
block ciphersAsad Ali
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve CryptographyJorgeVillamarin5
 
13 asymmetric key cryptography
13   asymmetric key cryptography13   asymmetric key cryptography
13 asymmetric key cryptographydrewz lin
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and CryptographyAdam Reagan
 
Cs8792 cns - Public key cryptosystem (Unit III)
Cs8792   cns - Public key cryptosystem (Unit III)Cs8792   cns - Public key cryptosystem (Unit III)
Cs8792 cns - Public key cryptosystem (Unit III)ArthyR3
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.pptUday Meena
 

What's hot (20)

Data Encryption and Decryption using Hill Cipher
Data Encryption and Decryption using Hill CipherData Encryption and Decryption using Hill Cipher
Data Encryption and Decryption using Hill Cipher
 
Cryptography
CryptographyCryptography
Cryptography
 
Key Management and Distribution
Key Management and DistributionKey Management and Distribution
Key Management and Distribution
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
 
block ciphers
block ciphersblock ciphers
block ciphers
 
Elliptic curve cryptography
Elliptic curve cryptographyElliptic curve cryptography
Elliptic curve cryptography
 
RSA Algorithm
RSA AlgorithmRSA Algorithm
RSA Algorithm
 
RSA
RSARSA
RSA
 
Rsa
RsaRsa
Rsa
 
Rsa cryptosystem
Rsa cryptosystemRsa cryptosystem
Rsa cryptosystem
 
Diffie-hellman algorithm
Diffie-hellman algorithmDiffie-hellman algorithm
Diffie-hellman algorithm
 
Vigenere cipher
Vigenere cipherVigenere cipher
Vigenere cipher
 
Key management
Key managementKey management
Key management
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve Cryptography
 
13 asymmetric key cryptography
13   asymmetric key cryptography13   asymmetric key cryptography
13 asymmetric key cryptography
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and Cryptography
 
Cs8792 cns - Public key cryptosystem (Unit III)
Cs8792   cns - Public key cryptosystem (Unit III)Cs8792   cns - Public key cryptosystem (Unit III)
Cs8792 cns - Public key cryptosystem (Unit III)
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 

Similar to Asymmetric Cryptography.pptx

10 AsymmetricKey Cryptography students.pptx
10 AsymmetricKey Cryptography students.pptx10 AsymmetricKey Cryptography students.pptx
10 AsymmetricKey Cryptography students.pptxAdityaGoogle
 
rsa.pdf
rsa.pdfrsa.pdf
rsa.pdfBuCu3
 
Chapter 06 rsa cryptosystem
Chapter 06   rsa cryptosystemChapter 06   rsa cryptosystem
Chapter 06 rsa cryptosystemAnkur Choudhary
 
A comparative analysis of the possible attacks on rsa cryptosystem
A comparative analysis of the possible attacks on rsa cryptosystemA comparative analysis of the possible attacks on rsa cryptosystem
A comparative analysis of the possible attacks on rsa cryptosystemIAEME Publication
 
1982 - Probabilistic Encryption & How To Play Mental Poker Keeping Secret All...
1982 - Probabilistic Encryption & How To Play Mental Poker Keeping Secret All...1982 - Probabilistic Encryption & How To Play Mental Poker Keeping Secret All...
1982 - Probabilistic Encryption & How To Play Mental Poker Keeping Secret All...decentralizeeverything
 
A survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic EncryptionA survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic Encryptioniosrjce
 
Answers computer networks 159334 assignment_2_2010
Answers computer networks 159334 assignment_2_2010Answers computer networks 159334 assignment_2_2010
Answers computer networks 159334 assignment_2_2010Lakshmi Gupta
 
ch09_rsa_nemo.ppt
ch09_rsa_nemo.pptch09_rsa_nemo.ppt
ch09_rsa_nemo.pptChandraB15
 

Similar to Asymmetric Cryptography.pptx (20)

ch-10.ppt
ch-10.pptch-10.ppt
ch-10.ppt
 
10 AsymmetricKey Cryptography students.pptx
10 AsymmetricKey Cryptography students.pptx10 AsymmetricKey Cryptography students.pptx
10 AsymmetricKey Cryptography students.pptx
 
rsa.pdf
rsa.pdfrsa.pdf
rsa.pdf
 
Chapter 06 rsa cryptosystem
Chapter 06   rsa cryptosystemChapter 06   rsa cryptosystem
Chapter 06 rsa cryptosystem
 
Rsa example
Rsa exampleRsa example
Rsa example
 
A comparative analysis of the possible attacks on rsa cryptosystem
A comparative analysis of the possible attacks on rsa cryptosystemA comparative analysis of the possible attacks on rsa cryptosystem
A comparative analysis of the possible attacks on rsa cryptosystem
 
1982 - Probabilistic Encryption & How To Play Mental Poker Keeping Secret All...
1982 - Probabilistic Encryption & How To Play Mental Poker Keeping Secret All...1982 - Probabilistic Encryption & How To Play Mental Poker Keeping Secret All...
1982 - Probabilistic Encryption & How To Play Mental Poker Keeping Secret All...
 
1329 n 9460
1329 n 94601329 n 9460
1329 n 9460
 
A survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic EncryptionA survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic Encryption
 
B017631014
B017631014B017631014
B017631014
 
Ch10 2 v1
Ch10 2 v1Ch10 2 v1
Ch10 2 v1
 
Cn lec-06
Cn lec-06Cn lec-06
Cn lec-06
 
Ch10 2 v1
Ch10 2 v1Ch10 2 v1
Ch10 2 v1
 
Answers computer networks 159334 assignment_2_2010
Answers computer networks 159334 assignment_2_2010Answers computer networks 159334 assignment_2_2010
Answers computer networks 159334 assignment_2_2010
 
ch09_rsa_nemo.ppt
ch09_rsa_nemo.pptch09_rsa_nemo.ppt
ch09_rsa_nemo.ppt
 
Chapter 8 v6.0
Chapter 8 v6.0Chapter 8 v6.0
Chapter 8 v6.0
 
Introduction to cryptography
Introduction to cryptographyIntroduction to cryptography
Introduction to cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Chapter 30
Chapter 30Chapter 30
Chapter 30
 
Chapter 30 - Cry
Chapter 30 - CryChapter 30 - Cry
Chapter 30 - Cry
 

Recently uploaded

04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]📊 Markus Baersch
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一F La
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAbdelrhman abooda
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...ThinkInnovation
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceSapana Sha
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 

Recently uploaded (20)

04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts Service
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 

Asymmetric Cryptography.pptx

  • 1. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 10 Asymmetric-Key Cryptography 10.1
  • 2. Objectives  Present asymmetric-key cryptography.  Distinguish between symmetric-key cryptography and asymmetric-key cryptography.  Introduce trapdoor one-way functions and their use in asymmetric-key cryptosystems  Discuss the RSAcryptosystem 10.2
  • 3. 10-1 INTRODUCTION The advent of asymmetric-key cryptography does not eliminate the need for symmetric-key cryptography. Symmetric and asymmetric-key cryptography will exist in parallel and continue to serve the community. We actually believe that they are complements of each other; the advantages of one can compensate for the disadvantages of the other. Topics discussed in this section: Keys General Idea Asymmetric Cryptography Practices Symmetric Cryptography Versus Asymmetric Cryptography Trapdoor One-Way Function 10.3
  • 4. 10.1.1 Keys Asymmetric key cryptography, known as public key cryptography, uses two separate keys: one private and one public. Figure 10.1 Locking and unlocking in asymmetric-key cryptosystem 10.4
  • 5. 10.1.2 General Idea Figure 10.2 General idea of asymmetric-key cryptosystem C = f (Kpublic , P) P = g(Kprivate , C) 10.5
  • 7. Symmetric Cryptography Versus Asymmetric Cryptography Symmetric-key cryptography is based on sharing secrecy; asymmetric-key cryptography is based on personal secrecy. Note-1 In symmetric-key cryptography system, the number of keys needed for each user is 1. In asymmetric-key cryptography system, the number of keys needed for each user is 2. Note-2 10.7
  • 8. Symmetric Cryptography Versus Asymmetric Cryptography (cont.) Symmetric-key cryptography is appropriate for long messages, and the speed of encryption/decryption is fast. Asymmetric-key cryptography is appropriate for short messages, and the speed of encryption/decryption is slow. Note-4 In symmetric-key cryptography, symbols in plaintext and ciphertext are permuted or substituted. In asymmetric-key cryptography, plaintext and ciphertext are treated as integers. Note-3 10.8
  • 9. The main idea behind asymmetric-key cryptography is the concept of the trapdoor one-way function. 10.1.4 Trapdoor One-Way Function Functions Figure 10.3 A function as rule mapping a domain to a range 10.9
  • 10. Trapdoor One-Way Function (TOWF( 10.1.4 Continued One-Way Function (OWF( 1. f is easy to compute  y=f(x) 2. 10.10 is difficult to compute  x=f (y) f −1 3. Given y and a trapdoor, x can be computed easily. -1
  • 11. 10.1.4 Continued 10.11 Example 10. 1 Example 10. 2 When n is large and p&q are prime numbers, such that n = p × q is a one-way function. Given p and q , it is always easy to calculate n ; given n, it is very difficult to compute p and q. This is the factorization problem. y mod n to find x. (Note: Φ(n)=(p-1)(q-1)) k When n is large, the function y = x mod n is a trapdoor one-way function. Given x, k, and n, it is easy to calculate y. Given y, k, and n, it is very difficult to calculate x. This is the discrete logarithm problem. However, if we know the trapdoor, k′ such that k × k ′ = 1 mod Φ(n), we can use x = k’
  • 12. 10-2 RSA CRYPTOSYSTEM The most common public-key algorithm is the RSA cryptosystem, named for its inventors (Rivest, Shamir, and Adleman). Topics discussed in this section: 1. Introduction 2. Procedure 3. Some Trivial Examples 4. Attacks on RSA 5. Recommendations 10.12
  • 13. 10.2.1 Introduction Figure 10.5 Complexity of operations in RSA 10.13
  • 14. 10.2.2 Procedure Figure 10.6 Encryption, decryption, and key generation in RSA 10.14
  • 15. 10.2.2 Continued In RSA, e and n are announced to the public; d and Φ are kept secret. 10.15
  • 16. When Alice wants Bob to send her a message, she:  Selects two (large) primes p, q, TOP SECRET,  Computes n = pq and (n) = (p-1)(q-1). (n) is TOP SECRET.  Selects an integer e, 1 < e < (n), such that gcd(e, (n)) = 1,  Computes d, such that d*e (mod (n))=1, d also TOP SECRET,  Gives public key (e, n) to Bob, and keeps her private key d. 10.2.2 Continued 10.16
  • 17. Encryption 10.2.2 Continued If the plaintext P is larger than n, then P has to be encrypted letter by letter. 10.17
  • 19. 10.2.3 Some Trivial Examples Example 10. 5 Bob chooses 7 and 11 as p and q and calculates n = 77. The value of f(n) = (7 − 1)(11 − 1) or 60. Now he chooses two exponents, e and d, from Z60∗. If he chooses e to be 13, then d is 37. Note that e × d mod 60 = 1 (they are inverses of each Now imagine that Alice wants to send the plaintext 5 to Bob. She uses the public exponent 13 to encrypt 5. Bob receives the ciphertext 26 and uses the private key 37 to decipher the ciphertext: 10.19
  • 20. 10.2.2 Fast Exponentiation Algorithm Example 10. 5 (cont.) 10.20 52 = (5) =625 mod77 = 9 5 =(5 ) =(9) mod 77 =4 Calculate 513 mod 77: 51 = 5 mod77 = 5 52 = 25 mod77 = 5 5 =5 *5 *5 = 5*9*4 = 180 mod 77= 26 4 2 1 4 8 13 2 8 4 2 2
  • 21. 10.2.3 Some Trivial Examples Example 10. 6 Now assume that another person, John, wants to send a message to Bob. John can use the same public key announced by Bob (probably on his website), 13; John’s plaintext is 63. John calculates the following: Bob receives the ciphertext 28 and uses his private key 37 to decipher the ciphertext: 10.21
  • 22. 10.2.3 Some Trivial Examples Example 10. 7 10.22 Jennifer creates a pair of keys for herself. She chooses p = 397 and q 401 = She calculates n = 159197. She then calculates f(n) = 158400. She then chooses e = 343 and d = 12007. Show how Ted can send a message to Jennifer if he knows e and n. Suppose Ted wants to send the message “NO” to Jennifer. He changes each character to a number (from 00 to 25), with each character coded as two digits. He then concatenates the two coded characters and gets a four-digit number. The plaintext is 1314. Figure 10.7 shows the process.
  • 23. 10.2.3 Continued Figure 10.7 Encryption and decryption in Example 10.7 10.23
  • 24. Example: if P>n 10.24 Alice want to send Bob the message “NO” Bob Public key (13,77) , Private key (37) Alice: Encoding “NO” => 1314 P has to be encrypted letter by letter: C=4149 P Encoding P e mod n C N 13 13 13 mod 77 41 O 14 14 13 mod 77 49
  • 25. 10.2.4 Attacks on RSA Figure 10.8 Taxonomy of potential attacks on RSAl 10.25
  • 26. 10.2.4 Continued 10.26 Factorization Attack  The security of RSA is based on the idea that the modulus is so large that is infeasible to factor it in reasonable time.  Even though n is public, p & q are secret. If Eve can factor n and get p & q, she can calculate Φ(n). Then she can calculate d=e-1 mod Φ(n) because e is public.
  • 27. Recommendations 10.27  The number of bits in n should be at least 1024.  Two primes p & q must be 512 bit at least.  p & q should not be close to each other.  Modulus n must not be shared.  If d is leaked, immediately change n, e and d.  Message must be padded by OAEP.
  • 28. 1Chapter 10, Introduction to CRYPTOGRAPHY and NETWORK SECURITY, Behrouz A.Forouzan. 2Chapter 11, Security+ Guide to Network Security Fundamentals, Third Edition. References 10.28