Cryptography Lecture 23.

Slides:



Advertisements
Similar presentations
CS555Topic 191 Cryptography CS 555 Topic 19: Formalization of Public Key Encrpytion.
Advertisements

Rennes, 23/10/2014 Cristina Onete Putting it all together: using multiple primitives together.
CS555Spring 2012/Topic 161 Cryptography CS 555 Topic 16: Key Management and The Need for Public Key Cryptography.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
Asymmetric Cryptography part 1 & 2 Haya Shulman Many thanks to Amir Herzberg who donated some of the slides from
CMSC 414 Computer and Network Security Lecture 9 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 7 Jonathan Katz.
Cryptography Lecture 10 Arpita Patra. Quick Recall and Today’s Roadmap >> CPA & CPA-mult security >> Equivalence of CPA and CPA-mult security >> El Gamal.
Threshold PKC Shafi Goldwasser and Ran Canetti. Public Key Encryption [DH] A PKC consists of 3 PPT algorithms (G,E,D) - G(1 k ) outputs public key e,
Lecture 3.4: Public Key Cryptography IV CS 436/636/736 Spring 2013 Nitesh Saxena.
CS555Spring 2012/Topic 71 Cryptography CS 555 Topic 7: Stream Ciphers and CPA Security.
CMSC 414 Computer and Network Security Lecture 2 Jonathan Katz.
Topic 26: Discrete LOG Applications
Encryption and Integrity
Key Exchange References: Applied Cryptography, Bruce Schneier
Privacy & Security.
Boneh-Franklin Identity Based Encryption Scheme
Cryptographic Hash Function
B504/I538: Introduction to Cryptography
Public Key Encryption and Digital Signatures
B504/I538: Introduction to Cryptography
Public-Key Cryptography and RSA
RSA and El Gamal Cryptosystems
Public Key Encryption and the RSA Algorithm
Authenticated encryption
Group theory exercise.
Presented by: Dr. Munam Ali Shah
Cryptography Lecture 9.
Cryptography Lecture 26.
Topic 11: Authenticated Encryption + CCA-Security
Cryptography Lecture 23.
Cryptography Lecture 12.
Cryptography Lecture 4.
Topic 25: Discrete LOG, DDH + Attacks on Plain RSA
Cryptography Lecture 5.
Topic 30: El-Gamal Encryption
Cryptography Lecture 6.
Cryptography Lecture 10.
Cryptography Lecture 24.
CS/ECE 478 Network Security Dr. Attila Altay Yavuz
Cryptography Lecture 25.
Cryptography Lecture 11.
Cryptography Lecture 4.
Cryptography Lecture 5.
Cryptography Lecture 8.
Cryptography Lecture 11.
Cryptography Lecture 9.
Cryptography Lecture 12.
Cryptography Lecture 6.
Introduction to Cryptography
Cryptography Lecture 3.
Cryptography Lecture 10.
Cryptography Lecture 9.
The power of Pairings towards standard model security
Cryptography Lecture 22.
Cryptography Lecture 11.
Cryptography Lecture 10.
Cryptography Lecture 21.
Cryptography Lecture 19.
Cryptography Lecture 21.
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Cryptography Lecture 25.
Cryptography Lecture 24.
Cryptography Lecture 26.
Lecture 6.2: Protocols - Authentication and Key Exchange II
Presentation transcript:

Cryptography Lecture 23

Diffie-Hellman key exchange G, q, g h1 h2 x  ℤq h1 = gx y  ℤq h2 = gy k2 = (h1)y = gxy k1 = (h2)x = gxy

Security? Eavesdropper sees G, q, g, gx, gy Shared key k is gxy Computing k from the transcript is exactly the computational Diffie-Hellman problem Distinguishing k from a uniform group element is exactly the decisional Diffie-Hellman problem  If the DDH problem is hard relative to G, this is a secure key-exchange protocol!

Example Work in order-509 subgroup of ℤ*1019 … Note: 1019 and 509 both prime 1019 = 2*509 + 1 Let G = {x2 | x  ℤ*1019} How can you find a generator?

The public-key setting

Review: private-key setting Two (or more) parties who wish to securely communicate share a uniform, secret key k in advance Same key k used for sending or receiving Either party can send or receive If multiple parties share a key, no way to distinguish them from based on the key Secrecy of k is critical No security if attacker knows k

The public-key setting One party generates a pair of keys: public key pk and private key sk Public key is widely disseminated Private key is kept secret, and shared with no one Private key used by the party who generated it; public key used by anyone else Also called asymmetric cryptography Security must hold even if the attacker knows pk

Public-key distribution I pk pk pk pk, sk

Public-key distribution II pk pk, sk

Public-key distribution Previous figures (implicitly) assume parties are able to obtain correct copies of each others’ public keys I.e., the attacker is passive during key distribution We will revisit this assumption later

Primitives Private-key setting Public-key setting Secrecy Integrity Private-key encryption Public-key encryption Integrity Message authentication codes Digital signature schemes

How does this address the drawbacks of private-key crypto…? Key distribution Public keys can be distributed over public (but authenticated) channels Key management in system of N users Each user stores 1 private key and N-1 public keys; only N keys overall Public keys can be stored in a central, public directory Applicability to “open systems” Even parties who have no prior relationship can find each others’ public keys and use them

Public-key vs. private-key crypto Public-key cryptography is strictly stronger than private-key cryptography Parties who wish to securely communicate could simply each generate public/private keys and then share them with each other Use appropriate key depending on who is sending or receiving

Why study private-key crypto? Public-key crypto is roughly 2-3 orders of magnitude slower than private-key crypto Also 2-10 higher communication If private-key crypto is an option, better to use it! As we will see, private-key cryptography is used for efficiency even in the public-key setting

Public-key encryption pk pk c pk pk, sk c  Encpk(m) m = Decsk(c)

Public-key encryption A public-key encryption scheme consists of three PPT algorithms: Gen: key-generation algorithm that on input 1n outputs pk, sk Enc: encryption algorithm that on input pk and a message m outputs a ciphertext c Dec: decryption algorithm that on input sk and a ciphertext c outputs a message m or an error  For all m and pk, sk output by Gen, Decsk(Encpk(m)) = m

CPA-security Fix a public-key encryption scheme  and an adversary A Define experiment PubK-CPAA, (n): Run Gen(1n) to get keys pk, sk Give pk to A, who outputs (m0, m1) of same length Choose uniform b  {0,1} and compute the ciphertext c  Encpk(mb); give c to A A outputs a guess b’, and the experiment evaluates to 1 if b’=b

CPA-security Public-key encryption scheme  is CPA-secure if for all PPT adversaries A: Pr[PubK-CPAA, (n) = 1] ≤ ½ + negl(n)

Notes on the definition No encryption oracle?! Encryption oracle redundant in public-key setting  No perfectly secret public-key encryption No deterministic public-key encryption scheme can be CPA-secure CPA-security implies security for encrypting multiple messages (as in the private-key case)

Chosen-ciphertext attacks pk pk, sk c  Encpk(m) c’ m’

Chosen-ciphertext attacks Chosen-ciphertext attacks are arguably even a greater concern in the public-key setting Attacker might be a legitimate sender Easier for attacker to obtain full decryptions of ciphertexts of its choice Related concern: malleability I.e., given a ciphertext c that is the encryption of an unknown message m, might be possible to produce ciphertext c’ that decrypts to a related message m’ This is also undesirable in the public-key setting

Chosen-ciphertext attacks Can define CCA-security for public-key encryption by analogy to the definition for private-key encryption See book for details

Dlog-based PKE

Diffie-Hellman key exchange G, q, g, h1 h2 (G, q, g)  G(1n) x  ℤq h1 = gx y  ℤq h2 = gy c2 = k · m k = (h1)y k = (h2)x m = c2/k

El Gamal encryption Public key G, q, g, h1 h2, h1y · m h2 (G, q, g)  G(1n) x  ℤq h1 = gx y  ℤq h2 = gy c2 = k · m k = (h1)y k = (h2)x m = c2/k