SlideShare a Scribd company logo
1 
Public-Key Cryptosystems
2 
Private-Key Cryptography 
• traditional private/secret/single key 
cryptography uses one key 
• shared by both sender and receiver 
• if this key is disclosed communications are 
compromised 
• also is symmetric, parties are equal 
• hence does not protect sender from receiver 
forging a message & claiming it is sent by 
sender
3 
Public-Key Cryptography 
• public-key/two-key/asymmetric cryptography 
involves the use of two keys: 
– a public-key, which may be known by anybody, and can be 
used to encrypt messages, and verify signatures 
– a private-key, known only to the recipient, used to decrypt 
messages, and sign (create) signatures 
• is asymmetric because 
– those who encrypt messages or verify signatures cannot 
decrypt messages or create signatures
Asymmetric key cryptography uses two separate keys: one 
private and one public. 
10.4 
Asymmetric key cryptography 
Locking and unlocking in asymmetric-key cryptosystem
10.5 
10.1.2 General Idea 
Figure 10.2 General idea of asymmetric-key cryptosystem
6 
Why Public-Key Cryptography? 
• developed to address two key issues: 
– key distribution – how to have secure 
communications in general without having to trust 
a KDC with your key 
– digital signatures – how to verify a message 
comes intact from the claimed sender
7 
Public-Key Characteristics 
• Public-Key algorithms rely on two keys where: 
– it is computationally infeasible to find decryption key 
knowing only algorithm & encryption key 
– it is computationally easy to en/decrypt messages when 
the relevant (en/decrypt) key is known 
– either of the two related keys can be used for encryption, 
with the other used for decryption (for some algorithms)
8 
Public-Key Applications 
• can classify uses into 3 categories: 
– encryption/decryption (provide secrecy) 
– digital signatures (provide authentication) 
– key exchange (of session keys) 
• some algorithms are suitable for all uses, 
others are specific to one
Symmetric-key cryptography is based on sharing secrecy; 
asymmetric-key cryptography is based on personal secrecy. 
10.9 
Note
Plaintext/Ciphertext 
Unlike in symmetric-key cryptography(symbols permuted 
or substituted), plaintext and cipher text are treated as 
integers in asymmetric-key cryptography. 
Encryption/Decryption 
10.10 
Continued 
C = f (Kpublic , P) P = g(Kprivate , C)
The main idea behind asymmetric-key cryptography is the 
concept of the trapdoor one-way function. 
10.11 
10.1.4 Trapdoor One-Way Function 
Functions 
Figure 10.3 A function as rule mapping a domain to a range
Trapdoor One-Way Function (TOWF) 
10.12 
10.1.4 Continued 
One-Way Function (OWF) 
1. f is easy to compute. 
2. f −1 is difficult to compute. 
3. Given y and a trapdoor, x can be 
computed easily.
10.13 
10.1.4 Continued 
Example 10. 1 
When n is large, 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.
14 
RSA 
• By Rivest, Shamir & Adleman of MIT in 1977 
• best known & widely used public-key scheme 
• based on exponentiation in a finite field over 
integers modulo a prime. 
• uses large integers (e.g., 1024 bits) 
• security due to cost of factoring large numbers
15 
RSA Key Setup 
• each user generates a public/private key pair by: 
• selecting two large primes at random - p,q 
• computing their system modulus n=p.q 
-define ø(n)=(p-1)(q-1) 
• selecting at random the encryption key e 
• where 1<e<ø(n), gcd(e,ø(n))=1 
• solve following equation to find decryption key d 
– e.d=1 mod ø(n) and 0≤d≤n 
• publish their public encryption key: PU={e,n} 
• keep secret private decryption key: PR={d,n}
16 
RSA Use 
• to encrypt a message M the sender: 
– obtains public key of recipient PU={e,n} 
– computes: C = Me mod n, where 0≤M<n 
• to decrypt the ciphertext C the owner: 
– uses their private key PR={d,n} 
– computes: M = Cd mod n 
• note that the message M must be smaller 
than the modulus n (block if needed)
17 
RSA Example - Key Setup 
1. Select primes: p=17 & q=11 
2. Compute n = pq =17 x 11=187 
3. Compute ø(n)=(p–1)(q-1)=16 x 10=160 
4. Select e: gcd(e,160)=1; choose e=7 
5. Determine d: de=1 mod 160 and d < 160 
Value is d=23 since 23x7=161= 10x160+1 
6. Publish public key PU={7,187} 
7. Keep secret private key PR={23,187}
18 
RSA Example - En/Decryption 
• sample RSA encryption/decryption is: 
• given message M = 88 
• encryption: 
C = 887 mod 187 = 11 
• decryption: 
M = 1123 mod 187 = 88
19 
RSA Key Generation 
• users of RSA must: 
– determine two primes at random - p, q 
– select either e or d and compute the other 
• primes p,q must not be easily derived from 
modulus n=p.q 
– means must be sufficiently large 
– typically guess and use probabilistic test 
• exponents e, d are inverses, so use Inverse 
algorithm to compute the other
20 
RSA Security 
• possible approaches to attacking RSA are: 
– brute force key search (infeasible given size of 
numbers) 
– mathematical attacks (based on difficulty of 
computing ø(n), by factoring modulus n) 
– chosen ciphertext attacks (given properties of 
RSA)
21 
Factoring Problem 
• mathematical approach takes 3 forms: 
– factor n=p.q, hence compute ø(n) and then d 
– determine ø(n) directly and compute d 
– find d directly 
• currently assume 1024-2048 bit RSA is secure
• Broadcast attack: If an entity sends the same 
message with same encryption coe.(e) to 
different recipients (moduli being n1,n2,n3) 
• Let e=3 then, 
• C1=P3mod n1 
• C2=P3mod n2 
• C3=P3mod n3 
• Apply the Chinese Remainder Theorem to the 3 
eqns. C’=P3mod (n1n2n3) 
• P3< n1n2n3. 
• C’=P3. 
Hence get P
23 
Timing Attacks 
• developed by Paul Kocher in mid-1990’s 
• cipher text only attack. 
• Based on fast exponential algorithm.(guessing d from 
Cd mod p) 
• exploit timing variations in operations 
• infer operand size based on the time taken by the 
decrypting algorithm. 
• Counter measures 
– use constant exponentiation time. 
– add random delays.
Chosen Cipher text Attacks 
• based on the multiplicative property of RSA. 
• attackers chooses cipher texts & gets 
decrypted plaintext back. 
• assume that intruder intercepts C=Pe mod n. 
• Intruder chooses a random integer X in Zn*. 
Calculate Y=C x Xe mod n 
• He sends Y to Bob for decryption and get 
Z=Ydmod n. 
• With this intruder can find P easily. 
24

More Related Content

PPTX
Rsa cryptosystem
PPTX
Cryptography and RSA algorithm
DOCX
RSA - ENCRYPTION ALGORITHM CRYPTOGRAPHY
PPT
PPTX
Rsa Crptosystem
PPTX
Cryptography using rsa cryptosystem
PPT
Public Key Cryptography and RSA algorithm
Rsa cryptosystem
Cryptography and RSA algorithm
RSA - ENCRYPTION ALGORITHM CRYPTOGRAPHY
Rsa Crptosystem
Cryptography using rsa cryptosystem
Public Key Cryptography and RSA algorithm

What's hot (20)

PPT
RSA Algorithm - Public Key Cryptography
PPTX
Information and data security public key cryptography and rsa
PPT
Introduction to cryptography
PPT
Rsa and diffie hellman algorithms
PDF
Computer Security Lecture 7: RSA
PPTX
Cryptography
PPTX
RSA Algorithem and information about rsa
PPT
RSA Algorithm
PPTX
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE
PPTX
RSA ALGORITHM
PDF
RSA Algorithm
PPTX
Rsa algorithm key generation
PPT
Rsa rivest shamir adleman
PDF
PDF
RSA Algorithm report
PPT
The rsa algorithm
PPT
public-key cryptography Shamir
PPT
Digital Signature Recognition using RSA Algorithm
PPTX
Diffie-Hellman Key Exchange
RSA Algorithm - Public Key Cryptography
Information and data security public key cryptography and rsa
Introduction to cryptography
Rsa and diffie hellman algorithms
Computer Security Lecture 7: RSA
Cryptography
RSA Algorithem and information about rsa
RSA Algorithm
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE
RSA ALGORITHM
RSA Algorithm
Rsa algorithm key generation
Rsa rivest shamir adleman
RSA Algorithm report
The rsa algorithm
public-key cryptography Shamir
Digital Signature Recognition using RSA Algorithm
Diffie-Hellman Key Exchange
Ad

Similar to 3 pkc+rsa (20)

PPT
ch09-Critt.Asimettrica.notes has good info in security
PDF
PKC&RSA
PPT
Unit --3.ppt
PPT
ch09_rsa_nemo.ppt
PPT
PPTX
CNS 3RD UNIT PPT.pptx
PPTX
IOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptx
PPT
PUBLIC KEY & RSA.ppt
PPTX
Ch9_Cryptokkkllllllllllllllllllllk6e.pptx
PDF
Public-Key Cryptography.pdfWrite the result of the following operation with t...
PPTX
RSA Algm.pptx
PPT
Rsa diffi-network security-itt
PPTX
Public key algorithm
DOC
DOCS ON NETWORK SECURITY
PPTX
UNIT-IV.pptx
PDF
international security system data threats
PDF
PRINCIPLES OF INFORMATION SYSTEM SECURITY
PDF
12- Public-key Cryptography and RSA the lecture on cryptography
PPTX
Cyptography and network security unit 3-1
ch09-Critt.Asimettrica.notes has good info in security
PKC&RSA
Unit --3.ppt
ch09_rsa_nemo.ppt
CNS 3RD UNIT PPT.pptx
IOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptx
PUBLIC KEY & RSA.ppt
Ch9_Cryptokkkllllllllllllllllllllk6e.pptx
Public-Key Cryptography.pdfWrite the result of the following operation with t...
RSA Algm.pptx
Rsa diffi-network security-itt
Public key algorithm
DOCS ON NETWORK SECURITY
UNIT-IV.pptx
international security system data threats
PRINCIPLES OF INFORMATION SYSTEM SECURITY
12- Public-key Cryptography and RSA the lecture on cryptography
Cyptography and network security unit 3-1
Ad

Recently uploaded (20)

PDF
737-MAX_SRG.pdf student reference guides
PPTX
Current and future trends in Computer Vision.pptx
PPTX
Construction Project Organization Group 2.pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Categorization of Factors Affecting Classification Algorithms Selection
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPT
Mechanical Engineering MATERIALS Selection
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Fundamentals of Mechanical Engineering.pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
737-MAX_SRG.pdf student reference guides
Current and future trends in Computer Vision.pptx
Construction Project Organization Group 2.pptx
Internet of Things (IOT) - A guide to understanding
Categorization of Factors Affecting Classification Algorithms Selection
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Mechanical Engineering MATERIALS Selection
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Fundamentals of Mechanical Engineering.pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Safety Seminar civil to be ensured for safe working.
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Automation-in-Manufacturing-Chapter-Introduction.pdf
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Fundamentals of safety and accident prevention -final (1).pptx
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...

3 pkc+rsa

  • 2. 2 Private-Key Cryptography • traditional private/secret/single key cryptography uses one key • shared by both sender and receiver • if this key is disclosed communications are compromised • also is symmetric, parties are equal • hence does not protect sender from receiver forging a message & claiming it is sent by sender
  • 3. 3 Public-Key Cryptography • public-key/two-key/asymmetric cryptography involves the use of two keys: – a public-key, which may be known by anybody, and can be used to encrypt messages, and verify signatures – a private-key, known only to the recipient, used to decrypt messages, and sign (create) signatures • is asymmetric because – those who encrypt messages or verify signatures cannot decrypt messages or create signatures
  • 4. Asymmetric key cryptography uses two separate keys: one private and one public. 10.4 Asymmetric key cryptography Locking and unlocking in asymmetric-key cryptosystem
  • 5. 10.5 10.1.2 General Idea Figure 10.2 General idea of asymmetric-key cryptosystem
  • 6. 6 Why Public-Key Cryptography? • developed to address two key issues: – key distribution – how to have secure communications in general without having to trust a KDC with your key – digital signatures – how to verify a message comes intact from the claimed sender
  • 7. 7 Public-Key Characteristics • Public-Key algorithms rely on two keys where: – it is computationally infeasible to find decryption key knowing only algorithm & encryption key – it is computationally easy to en/decrypt messages when the relevant (en/decrypt) key is known – either of the two related keys can be used for encryption, with the other used for decryption (for some algorithms)
  • 8. 8 Public-Key Applications • can classify uses into 3 categories: – encryption/decryption (provide secrecy) – digital signatures (provide authentication) – key exchange (of session keys) • some algorithms are suitable for all uses, others are specific to one
  • 9. Symmetric-key cryptography is based on sharing secrecy; asymmetric-key cryptography is based on personal secrecy. 10.9 Note
  • 10. Plaintext/Ciphertext Unlike in symmetric-key cryptography(symbols permuted or substituted), plaintext and cipher text are treated as integers in asymmetric-key cryptography. Encryption/Decryption 10.10 Continued C = f (Kpublic , P) P = g(Kprivate , C)
  • 11. The main idea behind asymmetric-key cryptography is the concept of the trapdoor one-way function. 10.11 10.1.4 Trapdoor One-Way Function Functions Figure 10.3 A function as rule mapping a domain to a range
  • 12. Trapdoor One-Way Function (TOWF) 10.12 10.1.4 Continued One-Way Function (OWF) 1. f is easy to compute. 2. f −1 is difficult to compute. 3. Given y and a trapdoor, x can be computed easily.
  • 13. 10.13 10.1.4 Continued Example 10. 1 When n is large, 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.
  • 14. 14 RSA • By Rivest, Shamir & Adleman of MIT in 1977 • best known & widely used public-key scheme • based on exponentiation in a finite field over integers modulo a prime. • uses large integers (e.g., 1024 bits) • security due to cost of factoring large numbers
  • 15. 15 RSA Key Setup • each user generates a public/private key pair by: • selecting two large primes at random - p,q • computing their system modulus n=p.q -define ø(n)=(p-1)(q-1) • selecting at random the encryption key e • where 1<e<ø(n), gcd(e,ø(n))=1 • solve following equation to find decryption key d – e.d=1 mod ø(n) and 0≤d≤n • publish their public encryption key: PU={e,n} • keep secret private decryption key: PR={d,n}
  • 16. 16 RSA Use • to encrypt a message M the sender: – obtains public key of recipient PU={e,n} – computes: C = Me mod n, where 0≤M<n • to decrypt the ciphertext C the owner: – uses their private key PR={d,n} – computes: M = Cd mod n • note that the message M must be smaller than the modulus n (block if needed)
  • 17. 17 RSA Example - Key Setup 1. Select primes: p=17 & q=11 2. Compute n = pq =17 x 11=187 3. Compute ø(n)=(p–1)(q-1)=16 x 10=160 4. Select e: gcd(e,160)=1; choose e=7 5. Determine d: de=1 mod 160 and d < 160 Value is d=23 since 23x7=161= 10x160+1 6. Publish public key PU={7,187} 7. Keep secret private key PR={23,187}
  • 18. 18 RSA Example - En/Decryption • sample RSA encryption/decryption is: • given message M = 88 • encryption: C = 887 mod 187 = 11 • decryption: M = 1123 mod 187 = 88
  • 19. 19 RSA Key Generation • users of RSA must: – determine two primes at random - p, q – select either e or d and compute the other • primes p,q must not be easily derived from modulus n=p.q – means must be sufficiently large – typically guess and use probabilistic test • exponents e, d are inverses, so use Inverse algorithm to compute the other
  • 20. 20 RSA Security • possible approaches to attacking RSA are: – brute force key search (infeasible given size of numbers) – mathematical attacks (based on difficulty of computing ø(n), by factoring modulus n) – chosen ciphertext attacks (given properties of RSA)
  • 21. 21 Factoring Problem • mathematical approach takes 3 forms: – factor n=p.q, hence compute ø(n) and then d – determine ø(n) directly and compute d – find d directly • currently assume 1024-2048 bit RSA is secure
  • 22. • Broadcast attack: If an entity sends the same message with same encryption coe.(e) to different recipients (moduli being n1,n2,n3) • Let e=3 then, • C1=P3mod n1 • C2=P3mod n2 • C3=P3mod n3 • Apply the Chinese Remainder Theorem to the 3 eqns. C’=P3mod (n1n2n3) • P3< n1n2n3. • C’=P3. Hence get P
  • 23. 23 Timing Attacks • developed by Paul Kocher in mid-1990’s • cipher text only attack. • Based on fast exponential algorithm.(guessing d from Cd mod p) • exploit timing variations in operations • infer operand size based on the time taken by the decrypting algorithm. • Counter measures – use constant exponentiation time. – add random delays.
  • 24. Chosen Cipher text Attacks • based on the multiplicative property of RSA. • attackers chooses cipher texts & gets decrypted plaintext back. • assume that intruder intercepts C=Pe mod n. • Intruder chooses a random integer X in Zn*. Calculate Y=C x Xe mod n • He sends Y to Bob for decryption and get Z=Ydmod n. • With this intruder can find P easily. 24