ºÝºÝߣ

ºÝºÝߣShare 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: 
¨C a public-key, which may be known by anybody, and can be 
used to encrypt messages, and verify signatures 
¨C a private-key, known only to the recipient, used to decrypt 
messages, and sign (create) signatures 
? is asymmetric because 
¨C 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: 
¨C key distribution ¨C how to have secure 
communications in general without having to trust 
a KDC with your key 
¨C digital signatures ¨C how to verify a message 
comes intact from the claimed sender
7 
Public-Key Characteristics 
? Public-Key algorithms rely on two keys where: 
¨C it is computationally infeasible to find decryption key 
knowing only algorithm & encryption key 
¨C it is computationally easy to en/decrypt messages when 
the relevant (en/decrypt) key is known 
¨C 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: 
¨C encryption/decryption (provide secrecy) 
¨C digital signatures (provide authentication) 
¨C 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 
¨C 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: 
¨C obtains public key of recipient PU={e,n} 
¨C computes: C = Me mod n, where 0¡ÜM<n 
? to decrypt the ciphertext C the owner: 
¨C uses their private key PR={d,n} 
¨C 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¨C1)(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: 
¨C determine two primes at random - p, q 
¨C select either e or d and compute the other 
? primes p,q must not be easily derived from 
modulus n=p.q 
¨C means must be sufficiently large 
¨C 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: 
¨C brute force key search (infeasible given size of 
numbers) 
¨C mathematical attacks (based on difficulty of 
computing ?(n), by factoring modulus n) 
¨C chosen ciphertext attacks (given properties of 
RSA)
21 
Factoring Problem 
? mathematical approach takes 3 forms: 
¨C factor n=p.q, hence compute ?(n) and then d 
¨C determine ?(n) directly and compute d 
¨C 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 
¨C use constant exponentiation time. 
¨C 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
Ad

More Related Content

What's hot (20)

RSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key CryptographyRSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key Cryptography
Md. Shafiul Alam Sagor
?
Information and data security public key cryptography and rsa
Information and data security public key cryptography and rsaInformation and data security public key cryptography and rsa
Information and data security public key cryptography and rsa
Mazin Alwaaly
?
Introduction to cryptography
Introduction to cryptographyIntroduction to cryptography
Introduction to cryptography
Suresh Thammishetty
?
Rsa and diffie hellman algorithms
Rsa and diffie hellman algorithmsRsa and diffie hellman algorithms
Rsa and diffie hellman algorithms
daxesh chauhan
?
Computer Security Lecture 7: RSA
Computer Security Lecture 7: RSAComputer Security Lecture 7: RSA
Computer Security Lecture 7: RSA
Mohamed Loey
?
Cryptography
Cryptography Cryptography
Cryptography
pravin pandey
?
RSA Algorithem and information about rsa
RSA Algorithem and information about rsaRSA Algorithem and information about rsa
RSA Algorithem and information about rsa
Mohsin Ali
?
RSA Algorithm
RSA AlgorithmRSA Algorithm
RSA Algorithm
chauhankapil
?
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE
Qualcomm
?
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
Sathish Kumar
?
Ch9
Ch9Ch9
Ch9
Mahender Kumar
?
RSA Algorithm
RSA AlgorithmRSA Algorithm
RSA Algorithm
Joon Young Park
?
Rsa algorithm key generation
Rsa algorithm key generation Rsa algorithm key generation
Rsa algorithm key generation
swarnapatil
?
Rsa rivest shamir adleman
Rsa rivest shamir adlemanRsa rivest shamir adleman
Rsa rivest shamir adleman
Hossain Md Shakhawat
?
rsa-1
rsa-1rsa-1
rsa-1
aniruddh Tyagi
?
RSA Algorithm report
RSA Algorithm reportRSA Algorithm report
RSA Algorithm report
Mohamed Ramadan
?
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
Komal Singh
?
public-key cryptography Shamir
public-key cryptography Shamirpublic-key cryptography Shamir
public-key cryptography Shamir
Information Security Awareness Group
?
Digital Signature Recognition using RSA Algorithm
Digital Signature Recognition using RSA AlgorithmDigital Signature Recognition using RSA Algorithm
Digital Signature Recognition using RSA Algorithm
Vinayak Raja
?
Diffie-Hellman Key Exchange
Diffie-Hellman Key ExchangeDiffie-Hellman Key Exchange
Diffie-Hellman Key Exchange
G¨¹rkan YILDIRIM
?
Information and data security public key cryptography and rsa
Information and data security public key cryptography and rsaInformation and data security public key cryptography and rsa
Information and data security public key cryptography and rsa
Mazin Alwaaly
?
Rsa and diffie hellman algorithms
Rsa and diffie hellman algorithmsRsa and diffie hellman algorithms
Rsa and diffie hellman algorithms
daxesh chauhan
?
Computer Security Lecture 7: RSA
Computer Security Lecture 7: RSAComputer Security Lecture 7: RSA
Computer Security Lecture 7: RSA
Mohamed Loey
?
RSA Algorithem and information about rsa
RSA Algorithem and information about rsaRSA Algorithem and information about rsa
RSA Algorithem and information about rsa
Mohsin Ali
?
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE
Qualcomm
?
Rsa algorithm key generation
Rsa algorithm key generation Rsa algorithm key generation
Rsa algorithm key generation
swarnapatil
?
Digital Signature Recognition using RSA Algorithm
Digital Signature Recognition using RSA AlgorithmDigital Signature Recognition using RSA Algorithm
Digital Signature Recognition using RSA Algorithm
Vinayak Raja
?

Similar to 3 pkc+rsa (20)

Rsa
RsaRsa
Rsa
magentie
?
PUBLIC KEY & RSA.ppt
PUBLIC KEY & RSA.pptPUBLIC KEY & RSA.ppt
PUBLIC KEY & RSA.ppt
RizwanBasha12
?
CNS.ppt
CNS.pptCNS.ppt
CNS.ppt
GopinathSamydurai
?
Public key cryptography and RSA algorithm
Public key cryptography and RSA algorithmPublic key cryptography and RSA algorithm
Public key cryptography and RSA algorithm
Nitin Birari
?
Ch09
Ch09Ch09
Ch09
Joe Christensen
?
Unit --3.ppt
Unit --3.pptUnit --3.ppt
Unit --3.ppt
DHANABALSUBRAMANIAN
?
ch09_rsa_nemo.ppt
ch09_rsa_nemo.pptch09_rsa_nemo.ppt
ch09_rsa_nemo.ppt
ChandraB15
?
Unit-III_3R-CRYPTO_2021-22_VSM.pptx
Unit-III_3R-CRYPTO_2021-22_VSM.pptxUnit-III_3R-CRYPTO_2021-22_VSM.pptx
Unit-III_3R-CRYPTO_2021-22_VSM.pptx
VishwanathMahalle
?
RSA
RSARSA
RSA
Abirami Thangavel
?
RSA Algm.pptx
RSA Algm.pptxRSA Algm.pptx
RSA Algm.pptx
Sou Jana
?
Information and network security 33 rsa algorithm
Information and network security 33 rsa algorithmInformation and network security 33 rsa algorithm
Information and network security 33 rsa algorithm
Vaibhav Khanna
?
Pooguzhali
PooguzhaliPooguzhali
Pooguzhali
NIVEDHINIMANIVANNAN
?
international security system data threats
international security system data threatsinternational security system data threats
international security system data threats
gacop74666
?
PRINCIPLES OF INFORMATION SYSTEM SECURITY
PRINCIPLES OF INFORMATION SYSTEM SECURITYPRINCIPLES OF INFORMATION SYSTEM SECURITY
PRINCIPLES OF INFORMATION SYSTEM SECURITY
gacop74666
?
session6Mdjdjjskskskxkckjdjddddkfjjfjjjj
session6Mdjdjjskskskxkckjdjddddkfjjfjjjjsession6Mdjdjjskskskxkckjdjddddkfjjfjjjj
session6Mdjdjjskskskxkckjdjddddkfjjfjjjj
a7349061
?
Public-Key Cryptography.pdfWrite the result of the following operation with t...
Public-Key Cryptography.pdfWrite the result of the following operation with t...Public-Key Cryptography.pdfWrite the result of the following operation with t...
Public-Key Cryptography.pdfWrite the result of the following operation with t...
FahmiOlayah
?
PKC&RSA
PKC&RSAPKC&RSA
PKC&RSA
Anver S R
?
RSA
RSARSA
RSA
bansidhar11
?
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptxRivest Shamir Adleman Algorithm and its variant : DRSA.pptx
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
werip98386
?
IOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptx
IOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptxIOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptx
IOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptx
archibhartiya
?
Public key cryptography and RSA algorithm
Public key cryptography and RSA algorithmPublic key cryptography and RSA algorithm
Public key cryptography and RSA algorithm
Nitin Birari
?
ch09_rsa_nemo.ppt
ch09_rsa_nemo.pptch09_rsa_nemo.ppt
ch09_rsa_nemo.ppt
ChandraB15
?
Unit-III_3R-CRYPTO_2021-22_VSM.pptx
Unit-III_3R-CRYPTO_2021-22_VSM.pptxUnit-III_3R-CRYPTO_2021-22_VSM.pptx
Unit-III_3R-CRYPTO_2021-22_VSM.pptx
VishwanathMahalle
?
RSA Algm.pptx
RSA Algm.pptxRSA Algm.pptx
RSA Algm.pptx
Sou Jana
?
Information and network security 33 rsa algorithm
Information and network security 33 rsa algorithmInformation and network security 33 rsa algorithm
Information and network security 33 rsa algorithm
Vaibhav Khanna
?
international security system data threats
international security system data threatsinternational security system data threats
international security system data threats
gacop74666
?
PRINCIPLES OF INFORMATION SYSTEM SECURITY
PRINCIPLES OF INFORMATION SYSTEM SECURITYPRINCIPLES OF INFORMATION SYSTEM SECURITY
PRINCIPLES OF INFORMATION SYSTEM SECURITY
gacop74666
?
session6Mdjdjjskskskxkckjdjddddkfjjfjjjj
session6Mdjdjjskskskxkckjdjddddkfjjfjjjjsession6Mdjdjjskskskxkckjdjddddkfjjfjjjj
session6Mdjdjjskskskxkckjdjddddkfjjfjjjj
a7349061
?
Public-Key Cryptography.pdfWrite the result of the following operation with t...
Public-Key Cryptography.pdfWrite the result of the following operation with t...Public-Key Cryptography.pdfWrite the result of the following operation with t...
Public-Key Cryptography.pdfWrite the result of the following operation with t...
FahmiOlayah
?
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptxRivest Shamir Adleman Algorithm and its variant : DRSA.pptx
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
werip98386
?
IOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptx
IOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptxIOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptx
IOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptx
archibhartiya
?
Ad

Recently uploaded (20)

22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
Guru Nanak Technical Institutions
?
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptxUnleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
SanjeetMishra29
?
UNIT 5 Software Engineering sem 6 EIOV.pdf
UNIT 5  Software Engineering sem 6 EIOV.pdfUNIT 5  Software Engineering sem 6 EIOV.pdf
UNIT 5 Software Engineering sem 6 EIOV.pdf
sikarwaramit089
?
Hostelmanagementsystemprojectreport..pdf
Hostelmanagementsystemprojectreport..pdfHostelmanagementsystemprojectreport..pdf
Hostelmanagementsystemprojectreport..pdf
RajChouhan43
?
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic AlgorithmDesign Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Journal of Soft Computing in Civil Engineering
?
AI Chatbots & Software Development Teams
AI Chatbots & Software Development TeamsAI Chatbots & Software Development Teams
AI Chatbots & Software Development Teams
Joe Krall
?
Python Functions, Modules and Packages
Python Functions, Modules and PackagesPython Functions, Modules and Packages
Python Functions, Modules and Packages
Dr. A. B. Shinde
?
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
ssuserd9338b
?
WHITE PAPER-Best Practices in Syngas Plant Optimization.pdf
WHITE PAPER-Best Practices in Syngas Plant Optimization.pdfWHITE PAPER-Best Practices in Syngas Plant Optimization.pdf
WHITE PAPER-Best Practices in Syngas Plant Optimization.pdf
Floyd Burgess
?
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
?
Health & Safety .........................
Health & Safety .........................Health & Safety .........................
Health & Safety .........................
shadyozq9
?
GROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdf
GROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdfGROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdf
GROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdf
kemimafe11
?
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
?
VISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated detailsVISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated details
Vishal Kumar Singh
?
UNIT 3 Software Engineering (BCS601) EIOV.pdf
UNIT 3 Software Engineering (BCS601) EIOV.pdfUNIT 3 Software Engineering (BCS601) EIOV.pdf
UNIT 3 Software Engineering (BCS601) EIOV.pdf
sikarwaramit089
?
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
Pierre Celestin Eyock
?
David Boutry - Specializes In AWS, Microservices And Python
David Boutry - Specializes In AWS, Microservices And PythonDavid Boutry - Specializes In AWS, Microservices And Python
David Boutry - Specializes In AWS, Microservices And Python
David Boutry
?
Espresso PD Official MP_eng Version.pptx
Espresso PD Official MP_eng Version.pptxEspresso PD Official MP_eng Version.pptx
Espresso PD Official MP_eng Version.pptx
NingChacha1
?
ldr darkness sensor circuit.pptx for engineers
ldr darkness sensor circuit.pptx for engineersldr darkness sensor circuit.pptx for engineers
ldr darkness sensor circuit.pptx for engineers
PravalikaChidurala
?
Domain1_Security_Principles --(My_Notes)
Domain1_Security_Principles --(My_Notes)Domain1_Security_Principles --(My_Notes)
Domain1_Security_Principles --(My_Notes)
efs14135
?
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
Guru Nanak Technical Institutions
?
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptxUnleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
SanjeetMishra29
?
UNIT 5 Software Engineering sem 6 EIOV.pdf
UNIT 5  Software Engineering sem 6 EIOV.pdfUNIT 5  Software Engineering sem 6 EIOV.pdf
UNIT 5 Software Engineering sem 6 EIOV.pdf
sikarwaramit089
?
Hostelmanagementsystemprojectreport..pdf
Hostelmanagementsystemprojectreport..pdfHostelmanagementsystemprojectreport..pdf
Hostelmanagementsystemprojectreport..pdf
RajChouhan43
?
AI Chatbots & Software Development Teams
AI Chatbots & Software Development TeamsAI Chatbots & Software Development Teams
AI Chatbots & Software Development Teams
Joe Krall
?
Python Functions, Modules and Packages
Python Functions, Modules and PackagesPython Functions, Modules and Packages
Python Functions, Modules and Packages
Dr. A. B. Shinde
?
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
ssuserd9338b
?
WHITE PAPER-Best Practices in Syngas Plant Optimization.pdf
WHITE PAPER-Best Practices in Syngas Plant Optimization.pdfWHITE PAPER-Best Practices in Syngas Plant Optimization.pdf
WHITE PAPER-Best Practices in Syngas Plant Optimization.pdf
Floyd Burgess
?
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
?
Health & Safety .........................
Health & Safety .........................Health & Safety .........................
Health & Safety .........................
shadyozq9
?
GROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdf
GROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdfGROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdf
GROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdf
kemimafe11
?
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
?
VISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated detailsVISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated details
Vishal Kumar Singh
?
UNIT 3 Software Engineering (BCS601) EIOV.pdf
UNIT 3 Software Engineering (BCS601) EIOV.pdfUNIT 3 Software Engineering (BCS601) EIOV.pdf
UNIT 3 Software Engineering (BCS601) EIOV.pdf
sikarwaramit089
?
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
Pierre Celestin Eyock
?
David Boutry - Specializes In AWS, Microservices And Python
David Boutry - Specializes In AWS, Microservices And PythonDavid Boutry - Specializes In AWS, Microservices And Python
David Boutry - Specializes In AWS, Microservices And Python
David Boutry
?
Espresso PD Official MP_eng Version.pptx
Espresso PD Official MP_eng Version.pptxEspresso PD Official MP_eng Version.pptx
Espresso PD Official MP_eng Version.pptx
NingChacha1
?
ldr darkness sensor circuit.pptx for engineers
ldr darkness sensor circuit.pptx for engineersldr darkness sensor circuit.pptx for engineers
ldr darkness sensor circuit.pptx for engineers
PravalikaChidurala
?
Domain1_Security_Principles --(My_Notes)
Domain1_Security_Principles --(My_Notes)Domain1_Security_Principles --(My_Notes)
Domain1_Security_Principles --(My_Notes)
efs14135
?
Ad

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: ¨C a public-key, which may be known by anybody, and can be used to encrypt messages, and verify signatures ¨C a private-key, known only to the recipient, used to decrypt messages, and sign (create) signatures ? is asymmetric because ¨C 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: ¨C key distribution ¨C how to have secure communications in general without having to trust a KDC with your key ¨C digital signatures ¨C how to verify a message comes intact from the claimed sender
  • 7. 7 Public-Key Characteristics ? Public-Key algorithms rely on two keys where: ¨C it is computationally infeasible to find decryption key knowing only algorithm & encryption key ¨C it is computationally easy to en/decrypt messages when the relevant (en/decrypt) key is known ¨C 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: ¨C encryption/decryption (provide secrecy) ¨C digital signatures (provide authentication) ¨C 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 ¨C 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: ¨C obtains public key of recipient PU={e,n} ¨C computes: C = Me mod n, where 0¡ÜM<n ? to decrypt the ciphertext C the owner: ¨C uses their private key PR={d,n} ¨C 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¨C1)(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: ¨C determine two primes at random - p, q ¨C select either e or d and compute the other ? primes p,q must not be easily derived from modulus n=p.q ¨C means must be sufficiently large ¨C 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: ¨C brute force key search (infeasible given size of numbers) ¨C mathematical attacks (based on difficulty of computing ?(n), by factoring modulus n) ¨C chosen ciphertext attacks (given properties of RSA)
  • 21. 21 Factoring Problem ? mathematical approach takes 3 forms: ¨C factor n=p.q, hence compute ?(n) and then d ¨C determine ?(n) directly and compute d ¨C 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 ¨C use constant exponentiation time. ¨C 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