SlideShare a Scribd company logo
1 of 22
CSCI 172/283
Fall 2010
Public Key Cryptography
Public Key Cryptography
๏‚— New paradigm introduced by Diffie and Hellman
๏‚— The mailbox analogy:
๏‚— Bob has a locked mailbox
๏‚— Alice can insert a letter into the box, but canโ€™t unlock
it to take mail out
๏‚— Bob has the key and can take mail out
๏‚— Encrypt messages to Bob with Bobโ€™s public key
๏‚— Can freely distribute
๏‚— Bob decrypts his messages with his private key
๏‚— Only Bob knows this
Requirements
๏‚— How should a public key scheme work?
๏‚— Three main conditions
๏‚— It must be computationally easy to encrypt or
decrypt a message given the appropriate key
๏‚— It must be computationally infeasible to derive the
private key from the public key
๏‚— It must be computationally infeasible to determine
the private key from chosen plaintext attack
๏‚— Attacker can pick any message, have it encrypted, and
obtain the ciphertext
Exchanging keys
๏‚— Alice and Bob want to communicate using a block
cipher to encrypt their messages, but donโ€™t have
shared key
๏‚— How do Alice and Bob get a shared key?
Solution 1
๏‚— Alice sends the key along with her encrypted
message
๏‚— Eve sees encrypted message and key
๏‚— Uses key to decrypt message
Solution 2
๏‚— Alice sends the key at some time prior to sending
Bob the encrypted message
๏‚— Eve has to wait longer
๏‚— If she saw the key transmission, she has the key
๏‚— Uses key to decrypt message
Solution 3 โ€“ Use public key
crypto
๏‚— Diffie Hellman Key Exchange
๏‚— All users share common modulus, p, and element
g
๏‚— g โ‰  0, g โ‰  1, and g โ‰  p-1
๏‚— Alice chooses her private key, kA
๏‚— Computes KA = gkA mod p and sends it to Bob in the
clear
๏‚— Bob chooses his private key, kB
๏‚— Computes KB = gkB mod p and sends it to Alice in
the clear
๏‚— When Alice and Bob want to agree on a shared
key, they compute a shared secret S
๏‚— SA,B = KB
kA mod p
๏‚— S = K kB mod p
Why does DH work?
๏‚— SA,B = SB,A
๏‚— (gkA) kB mod p = (gkB) kA mod p
๏‚— Eve knows
๏‚— g and p
๏‚— KA and KB
๏‚— Why canโ€™t Eve compute the secret?
๏‚— This was the first public key cryptography scheme
SA,B = KB
kA mod p
SB,A = KA
kB mod p
Hard problems
๏‚— Public key cryptosystems are based on hard
problems
๏‚— DH is based on the Discrete Logarithm Problem
(DLP)
๏‚— Given:
๏‚— Multiplicative group G
๏‚— Element a in G
๏‚— Output b
๏‚— Find:
๏‚— Unique solution to ax = b in G
๏‚— x is loga b
๏‚— No polynomial time algorithm exists to solve this*
*On classical computers
Could it fail?
๏‚— Eve could fool Alice and Bob
๏‚— Man in the middle / bucket brigade
Alice
Bob
Eve
My key is
KA
My key is
Kโ€™A
My key is
KB
My key is
Kโ€™B
Alice has no guarantee that the person sheโ€™s establishing
a key with is actually Bob
RSA
๏‚— Rivest-Shamir-Adleman
๏‚— Probably the most well-known public key scheme
๏‚— First, some background
Eulerโ€™s Totient
๏‚— Totient function ๏ฆ(n)
๏‚— Number of positive numbers less than n that are
relatively prime to n
๏‚— Two numbers are relatively prime when their greatest
common divisor is 1
๏‚— Example: ๏ฆ(10) = 4
๏‚— 1, 3, 7, 9
๏‚— Example: ๏ฆ(7) = 6
๏‚— 1, 2, 3, 4, 5, 6
๏‚— If n is prime, ๏ฆ(n) = n-1
RSA keys
๏‚— Choose 2 large primes, p and q
๏‚— N = pq
๏‚— ๏ฆ(N) = (p-1)(q-1)
๏‚— Choose e < N such that gcd(e, ๏ฆ(N))=1
๏‚— d such that ed = 1 mod ๏ฆ(N)
๏‚— Public key: {N, e}
๏‚— Private key: {d}
๏‚— p and q must also be kept secret
RSA encryption/decryption
๏‚— Alice wants to send Bob message m
๏‚— She knows his public key, {N,e}
Alice
Bob
c = me mod N
c
m = cd mod N
Toy example
๏‚— p=7, q=11
๏‚— N=77
๏‚— ๏ฆ(N) = (6)(10) = 60
๏‚— Bob chooses e=17
๏‚— Uses extended Euclidean algorithm to find inverse
of e mod 60
๏‚— Finds d=53
๏‚— Bob makes {N, e} public
Toy example (continued)
๏‚— Alice wants to send Bob โ€œHELLO WORLDโ€
๏‚— Represent each letter as a number 00(A) to 25(Z)
๏‚— 26 is a space
๏‚— Calculates:
๏‚— 0717 mod 77 = 28, 0417 mod 77 = 16, โ€ฆ, 0317 mod
77 = 75
๏‚— Sends Bob 28 16 44 44 42 38 22 42 19 44 75
๏‚— He decrypts each number with his private key and
gets โ€œHELLO WORLDโ€
What could go wrong?
๏‚— What was wrong with the toy example?
๏‚— Eve can easily find the encryption of each letter and
use that as a key to Aliceโ€™s message
๏‚— Even without knowing the public key, can use
statistics to find likely messages
๏‚— Like cryptogram puzzles
How it should really happen
๏‚— p and q should be at least 512 bits each
๏‚— N at least 1024 bits
๏‚— The message โ€œHELLO WORLDโ€ would be
converted into one very large integer
๏‚— That integer would be raised to the public/private
exponent
๏‚— For short message, pad them with a random
string
Is this key yours?
๏‚— How to bind a key to an identity?
PK Paradigm
๏‚— Genkey(some info)
๏‚— Creates Kpub and Kpriv
๏‚— Encrypt with Kpub
๏‚— Decrypt with Kpriv
๏‚— Certificate binds key to individual
IBE
๏‚— Identity-Based Encryption
๏‚— Kpub is well-known
๏‚— Known to be bound to owner
๏‚— Name, email, SSN, etc.
๏‚— Owner requests a private key from CA
๏‚— No certificates required
Conclusion by xkcd
http://xkcd.com/538/

More Related Content

Similar to CS283-PublicKey.ppt

The security of quantum cryptography
The security of quantum cryptographyThe security of quantum cryptography
The security of quantum cryptography
wtyru1989
ย 
Other public key systems
Other public key systemsOther public key systems
Other public key systems
Aravindharamanan S
ย 
Crypt
CryptCrypt
Crypt
Mir Majid
ย 
aacyberessential3cryptography-131067585699078884.pptx
aacyberessential3cryptography-131067585699078884.pptxaacyberessential3cryptography-131067585699078884.pptx
aacyberessential3cryptography-131067585699078884.pptx
ImXaib
ย 
RSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdf
RSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdfRSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdf
RSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdf
ALASEEMKOTA
ย 
Cupdf.com public key-cryptography-569692953829a
Cupdf.com public key-cryptography-569692953829aCupdf.com public key-cryptography-569692953829a
Cupdf.com public key-cryptography-569692953829a
jsk1950
ย 

Similar to CS283-PublicKey.ppt (20)

Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithm
ย 
The security of quantum cryptography
The security of quantum cryptographyThe security of quantum cryptography
The security of quantum cryptography
ย 
b
bb
b
ย 
Other public key systems
Other public key systemsOther public key systems
Other public key systems
ย 
ET4045-2-cryptography-2
ET4045-2-cryptography-2ET4045-2-cryptography-2
ET4045-2-cryptography-2
ย 
Crypt
CryptCrypt
Crypt
ย 
aacyberessential3cryptography-131067585699078884.pptx
aacyberessential3cryptography-131067585699078884.pptxaacyberessential3cryptography-131067585699078884.pptx
aacyberessential3cryptography-131067585699078884.pptx
ย 
Zero Knowledge Proofs: What they are and how they work
Zero Knowledge Proofs: What they are and how they workZero Knowledge Proofs: What they are and how they work
Zero Knowledge Proofs: What they are and how they work
ย 
PROTECTED CONTENT: END-TO-END PGP ENCRYPTION FOR DRUPAL
PROTECTED CONTENT: END-TO-END PGP ENCRYPTION FOR DRUPALPROTECTED CONTENT: END-TO-END PGP ENCRYPTION FOR DRUPAL
PROTECTED CONTENT: END-TO-END PGP ENCRYPTION FOR DRUPAL
ย 
Cryptography
CryptographyCryptography
Cryptography
ย 
Bob has a public RSA key (n = 77, e = 13). He sends Alice a message m.pdf
Bob has a public RSA key (n = 77, e = 13). He sends Alice a message m.pdfBob has a public RSA key (n = 77, e = 13). He sends Alice a message m.pdf
Bob has a public RSA key (n = 77, e = 13). He sends Alice a message m.pdf
ย 
RSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdf
RSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdfRSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdf
RSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdf
ย 
Security
Security Security
Security
ย 
cryptography and encryption and decryption
cryptography and encryption and decryptioncryptography and encryption and decryption
cryptography and encryption and decryption
ย 
public-key cryptography Shamir
public-key cryptography Shamirpublic-key cryptography Shamir
public-key cryptography Shamir
ย 
Cupdf.com public key-cryptography-569692953829a
Cupdf.com public key-cryptography-569692953829aCupdf.com public key-cryptography-569692953829a
Cupdf.com public key-cryptography-569692953829a
ย 
Network Security
Network SecurityNetwork Security
Network Security
ย 
Ch7 2ed
Ch7 2edCh7 2ed
Ch7 2ed
ย 
keyex.pptx
keyex.pptxkeyex.pptx
keyex.pptx
ย 
Internet security
Internet securityInternet security
Internet security
ย 

Recently uploaded

Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
SUHANI PANDEY
ย 
Low Sexy Call Girls In Mohali 9053900678 ๐ŸฅตHave Save And Good Place ๐Ÿฅต
Low Sexy Call Girls In Mohali 9053900678 ๐ŸฅตHave Save And Good Place ๐ŸฅตLow Sexy Call Girls In Mohali 9053900678 ๐ŸฅตHave Save And Good Place ๐Ÿฅต
Low Sexy Call Girls In Mohali 9053900678 ๐ŸฅตHave Save And Good Place ๐Ÿฅต
Chandigarh Call girls 9053900678 Call girls in Chandigarh
ย 
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
Diya Sharma
ย 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
SUHANI PANDEY
ย 
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort ServiceCall Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
ellan12
ย 
Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...
Sheetaleventcompany
ย 
Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
soniya singh
ย 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
SUHANI PANDEY
ย 
Call Girls In Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls In Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”Call Girls In Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls In Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
soniya singh
ย 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
singhpriety023
ย 
valsad Escorts Service โ˜Ž๏ธ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service โ˜Ž๏ธ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service โ˜Ž๏ธ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service โ˜Ž๏ธ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
ย 

Recently uploaded (20)

Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
ย 
Low Sexy Call Girls In Mohali 9053900678 ๐ŸฅตHave Save And Good Place ๐Ÿฅต
Low Sexy Call Girls In Mohali 9053900678 ๐ŸฅตHave Save And Good Place ๐ŸฅตLow Sexy Call Girls In Mohali 9053900678 ๐ŸฅตHave Save And Good Place ๐Ÿฅต
Low Sexy Call Girls In Mohali 9053900678 ๐ŸฅตHave Save And Good Place ๐Ÿฅต
ย 
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
ย 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
ย 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
ย 
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort ServiceCall Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
ย 
VVVIP Call Girls In Connaught Place โžก๏ธ Delhi โžก๏ธ 9999965857 ๐Ÿš€ No Advance 24HRS...
VVVIP Call Girls In Connaught Place โžก๏ธ Delhi โžก๏ธ 9999965857 ๐Ÿš€ No Advance 24HRS...VVVIP Call Girls In Connaught Place โžก๏ธ Delhi โžก๏ธ 9999965857 ๐Ÿš€ No Advance 24HRS...
VVVIP Call Girls In Connaught Place โžก๏ธ Delhi โžก๏ธ 9999965857 ๐Ÿš€ No Advance 24HRS...
ย 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
ย 
Hireโ† Young Call Girls in Tilak nagar (Delhi) โ˜Ž๏ธ 9205541914 โ˜Ž๏ธ Independent Esc...
Hireโ† Young Call Girls in Tilak nagar (Delhi) โ˜Ž๏ธ 9205541914 โ˜Ž๏ธ Independent Esc...Hireโ† Young Call Girls in Tilak nagar (Delhi) โ˜Ž๏ธ 9205541914 โ˜Ž๏ธ Independent Esc...
Hireโ† Young Call Girls in Tilak nagar (Delhi) โ˜Ž๏ธ 9205541914 โ˜Ž๏ธ Independent Esc...
ย 
Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...
ย 
Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
ย 
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
ย 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
ย 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
ย 
Call Girls In Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls In Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”Call Girls In Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls In Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
ย 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
ย 
Enjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort Service
Enjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort ServiceEnjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort Service
Enjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort Service
ย 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
ย 
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
ย 
valsad Escorts Service โ˜Ž๏ธ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service โ˜Ž๏ธ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service โ˜Ž๏ธ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service โ˜Ž๏ธ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
ย 

CS283-PublicKey.ppt

  • 1. CSCI 172/283 Fall 2010 Public Key Cryptography
  • 2. Public Key Cryptography ๏‚— New paradigm introduced by Diffie and Hellman ๏‚— The mailbox analogy: ๏‚— Bob has a locked mailbox ๏‚— Alice can insert a letter into the box, but canโ€™t unlock it to take mail out ๏‚— Bob has the key and can take mail out ๏‚— Encrypt messages to Bob with Bobโ€™s public key ๏‚— Can freely distribute ๏‚— Bob decrypts his messages with his private key ๏‚— Only Bob knows this
  • 3. Requirements ๏‚— How should a public key scheme work? ๏‚— Three main conditions ๏‚— It must be computationally easy to encrypt or decrypt a message given the appropriate key ๏‚— It must be computationally infeasible to derive the private key from the public key ๏‚— It must be computationally infeasible to determine the private key from chosen plaintext attack ๏‚— Attacker can pick any message, have it encrypted, and obtain the ciphertext
  • 4. Exchanging keys ๏‚— Alice and Bob want to communicate using a block cipher to encrypt their messages, but donโ€™t have shared key ๏‚— How do Alice and Bob get a shared key?
  • 5. Solution 1 ๏‚— Alice sends the key along with her encrypted message ๏‚— Eve sees encrypted message and key ๏‚— Uses key to decrypt message
  • 6. Solution 2 ๏‚— Alice sends the key at some time prior to sending Bob the encrypted message ๏‚— Eve has to wait longer ๏‚— If she saw the key transmission, she has the key ๏‚— Uses key to decrypt message
  • 7. Solution 3 โ€“ Use public key crypto ๏‚— Diffie Hellman Key Exchange ๏‚— All users share common modulus, p, and element g ๏‚— g โ‰  0, g โ‰  1, and g โ‰  p-1 ๏‚— Alice chooses her private key, kA ๏‚— Computes KA = gkA mod p and sends it to Bob in the clear ๏‚— Bob chooses his private key, kB ๏‚— Computes KB = gkB mod p and sends it to Alice in the clear ๏‚— When Alice and Bob want to agree on a shared key, they compute a shared secret S ๏‚— SA,B = KB kA mod p ๏‚— S = K kB mod p
  • 8. Why does DH work? ๏‚— SA,B = SB,A ๏‚— (gkA) kB mod p = (gkB) kA mod p ๏‚— Eve knows ๏‚— g and p ๏‚— KA and KB ๏‚— Why canโ€™t Eve compute the secret? ๏‚— This was the first public key cryptography scheme SA,B = KB kA mod p SB,A = KA kB mod p
  • 9. Hard problems ๏‚— Public key cryptosystems are based on hard problems ๏‚— DH is based on the Discrete Logarithm Problem (DLP) ๏‚— Given: ๏‚— Multiplicative group G ๏‚— Element a in G ๏‚— Output b ๏‚— Find: ๏‚— Unique solution to ax = b in G ๏‚— x is loga b ๏‚— No polynomial time algorithm exists to solve this* *On classical computers
  • 10. Could it fail? ๏‚— Eve could fool Alice and Bob ๏‚— Man in the middle / bucket brigade Alice Bob Eve My key is KA My key is Kโ€™A My key is KB My key is Kโ€™B Alice has no guarantee that the person sheโ€™s establishing a key with is actually Bob
  • 11. RSA ๏‚— Rivest-Shamir-Adleman ๏‚— Probably the most well-known public key scheme ๏‚— First, some background
  • 12. Eulerโ€™s Totient ๏‚— Totient function ๏ฆ(n) ๏‚— Number of positive numbers less than n that are relatively prime to n ๏‚— Two numbers are relatively prime when their greatest common divisor is 1 ๏‚— Example: ๏ฆ(10) = 4 ๏‚— 1, 3, 7, 9 ๏‚— Example: ๏ฆ(7) = 6 ๏‚— 1, 2, 3, 4, 5, 6 ๏‚— If n is prime, ๏ฆ(n) = n-1
  • 13. RSA keys ๏‚— Choose 2 large primes, p and q ๏‚— N = pq ๏‚— ๏ฆ(N) = (p-1)(q-1) ๏‚— Choose e < N such that gcd(e, ๏ฆ(N))=1 ๏‚— d such that ed = 1 mod ๏ฆ(N) ๏‚— Public key: {N, e} ๏‚— Private key: {d} ๏‚— p and q must also be kept secret
  • 14. RSA encryption/decryption ๏‚— Alice wants to send Bob message m ๏‚— She knows his public key, {N,e} Alice Bob c = me mod N c m = cd mod N
  • 15. Toy example ๏‚— p=7, q=11 ๏‚— N=77 ๏‚— ๏ฆ(N) = (6)(10) = 60 ๏‚— Bob chooses e=17 ๏‚— Uses extended Euclidean algorithm to find inverse of e mod 60 ๏‚— Finds d=53 ๏‚— Bob makes {N, e} public
  • 16. Toy example (continued) ๏‚— Alice wants to send Bob โ€œHELLO WORLDโ€ ๏‚— Represent each letter as a number 00(A) to 25(Z) ๏‚— 26 is a space ๏‚— Calculates: ๏‚— 0717 mod 77 = 28, 0417 mod 77 = 16, โ€ฆ, 0317 mod 77 = 75 ๏‚— Sends Bob 28 16 44 44 42 38 22 42 19 44 75 ๏‚— He decrypts each number with his private key and gets โ€œHELLO WORLDโ€
  • 17. What could go wrong? ๏‚— What was wrong with the toy example? ๏‚— Eve can easily find the encryption of each letter and use that as a key to Aliceโ€™s message ๏‚— Even without knowing the public key, can use statistics to find likely messages ๏‚— Like cryptogram puzzles
  • 18. How it should really happen ๏‚— p and q should be at least 512 bits each ๏‚— N at least 1024 bits ๏‚— The message โ€œHELLO WORLDโ€ would be converted into one very large integer ๏‚— That integer would be raised to the public/private exponent ๏‚— For short message, pad them with a random string
  • 19. Is this key yours? ๏‚— How to bind a key to an identity?
  • 20. PK Paradigm ๏‚— Genkey(some info) ๏‚— Creates Kpub and Kpriv ๏‚— Encrypt with Kpub ๏‚— Decrypt with Kpriv ๏‚— Certificate binds key to individual
  • 21. IBE ๏‚— Identity-Based Encryption ๏‚— Kpub is well-known ๏‚— Known to be bound to owner ๏‚— Name, email, SSN, etc. ๏‚— Owner requests a private key from CA ๏‚— No certificates required