Cryptography Lecture 21.

Slides:



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

CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 7 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 8 Stefan Dziembowski
Cryptography Lecture 10 Arpita Patra. Quick Recall and Today’s Roadmap >> CPA & CPA-mult security >> Equivalence of CPA and CPA-mult security >> El Gamal.
Lecture 3.4: Public Key Cryptography IV CS 436/636/736 Spring 2013 Nitesh Saxena.
Cryptography Lecture 2 Arpita Patra. Summary of Last Class  Introduction  Secure Communication in Symmetric Key setting >> SKE is the required primitive.
CS555Spring 2012/Topic 71 Cryptography CS 555 Topic 7: Stream Ciphers and CPA Security.
Secure Computation (Lecture 9-10) Arpita Patra. Recap >> MPC with honest majority in i.t. settings > Protocol using (n,t)-sharing, proof of security---
Randomness Leakage in the KEM/DEM Framework Hitoshi Namiki (Ricoh) Keisuke Tanaka (Tokyo Inst. of Tech.) Kenji Yasunaga (Tokyo Inst. of Tech.  ISIT) ProvSec.
Topic 26: Discrete LOG Applications
Cryptography Lecture 5 Arpita Patra © Arpita Patra.
B504/I538: Introduction to Cryptography
B504/I538: Introduction to Cryptography
Authenticated encryption
Group theory exercise.
Modern symmetric-key Encryption
Topic 24: Finding Prime Numbers, RSA
Secrecy of (fixed-length) stream ciphers
Cryptography Lecture 9.
Cryptography Lecture 26.
Topic 11: Authenticated Encryption + CCA-Security
Cryptography Lecture 23.
Cryptography Lecture 12.
B504/I538: Introduction to Cryptography
Cryptography Lecture 4.
B504/I538: Introduction to Cryptography
Topic 25: Discrete LOG, DDH + Attacks on Plain RSA
Cryptography Lecture 5.
Topic 30: El-Gamal Encryption
Cryptography Lecture 6.
Cryptography Lecture 10.
Topic 7: Pseudorandom Functions and CPA-Security
B504/I538: Introduction to Cryptography
Cryptography Lecture 7.
Cryptography Lecture 24.
Cryptography Lecture 25.
Cryptography Lecture 11.
Cryptography Lecture 5 Arpita Patra © Arpita Patra.
Cryptography Lecture 12 Arpita Patra © Arpita Patra.
Cryptography Lecture 4.
Cryptography Lecture 5.
Cryptography Lecture 8.
Cryptography Lecture 5 Arpita Patra © Arpita Patra.
Cryptography Lecture 11.
Cryptography Lecture 9.
Cryptography Lecture 12.
Cryptography Lecture 6.
Cryptography Lecture 7.
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 6.
Cryptography Lecture 19.
Cryptography Lecture 21.
Cryptography Lecture 25.
Cryptography Lecture 24.
Cryptography Lecture 23.
Cryptography Lecture 26.
Presentation transcript:

Cryptography Lecture 21

Q and A; bring the written answers to TA before the class 1. What is the CPA security of a public-key encryption? Why it does not (need to) have an encryption oracle? 2. What’s KEM/DEM paradigm? Why is it more efficient than public-key encryption? 3. What is El Gamal encryption? 4. Why El Gamal encryption is CPA secure, but not CCA secure? (briefly and intuitively)

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

Public-key encryption A public-key encryption scheme is composed 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

Hybrid encryption Decryption done in the obvious way Enc’ m ciphertext “encapsulated key” Enc k pk The functionality of public-key encryption at the (asymptotic) efficiency of private-key encryption!

Security of hybrid encryption Let  be the public-key component, and ’ the private-key component; let hy denote their combination If  is a CPA-secure public-key scheme, and ’ is a CPA-secure private-key scheme, then hy is a CPA-secure public-key scheme Similarly for CCA-security

KEM/DEM paradigm For hybrid encryption, something weaker than public key encryption would suffice Sufficient to have an “encapsulation algorithm” that takes a public key and outputs a ciphertext/key pair (c, k) Correctness: k is recoverable from c given sk Security: k is indistinguishable from uniform given pk and c This can lead to more-efficient constructions

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

El Gamal encryption Gen(1n) Encpk(m), where pk = (G, q, g, h) and mG Run G(1n) to obtain G, q, g. Choose uniform xℤq. The public key is (G, q, g, gx) and the private key is x Encpk(m), where pk = (G, q, g, h) and mG Choose uniform y ℤq. The ciphertext is gy, hy·m Decsk(c1, c2) Output c2/c1x

Security? If the DDH assumption is hard for G, then the El Gamal encryption scheme is CPA-secure Follows from security of Diffie-Hellman key exchange, or can be proved directly (Discrete-logarithm assumption alone is not enough here)

In practice… Parameters G, q, g are standardized and shared Inconvenient to treat message as group element Use key derivation to derive a key k instead, and use k to encrypt the message I.e., ciphertext is gy, Enc’k(m), where k = H(hy) Can be analyzed using KEM/DEM paradigm

Chosen-ciphertext attacks? El Gamal encryption is not secure against chosen-ciphertext attacks Follows from the fact that it is malleable Given ciphertext c1, c2, transform it to obtain the ciphertext c1, c’2 = c1,  · c2 for arbitrary  Since c1, c2 = gy, hy · m, we have c1, c’2 = gy, hy · (m) I.e., encryption of m becomes an encryption of m!

Attack! (Assume 2  G  ℤ*p) G, q, g, h c1, c2 c1, 2 ·c2 First bid: m Second bid: 2m

Chosen-ciphertext security Use key derivation coupled with CCA-secure private-key encryption scheme I.e., ciphertext is gy, Enc’k(m), where k = H(hy) and Enc’ is a CCA-secure scheme Can be proved CCA-secure under appropriate assumptions, if H is modeled as a random oracle DHIES/ECIES