Dan Boneh Public key encryption from Diffie-Hellman The ElGamal Public-key System Online Cryptography Course Dan Boneh.

Slides:



Advertisements
Similar presentations
ElGamal Security Public key encryption from Diffie-Hellman
Advertisements

Trusted 3rd parties Basic key exchange
Dan Boneh Public key encryption from Diffie-Hellman ElGamal Variants With Better Security Online Cryptography Course Dan Boneh.
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
CS555Topic 191 Cryptography CS 555 Topic 19: Formalization of Public Key Encrpytion.
Digital Signatures and Hash Functions. Digital Signatures.
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
Dan Boneh Message Integrity A Parallel MAC Online Cryptography Course Dan Boneh.
Cramer & Shoup Encryption Cramer and Shoup: A practical public key crypto system provably secure against adaptive chosen ciphertext attack. Crypto 1998.
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
7. Asymmetric encryption-
Session 4 Asymmetric ciphers.
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.
UCB Security Jean Walrand EECS. UCB Outline Threats Cryptography Basic Mechanisms Secret Key Public Key Hashing Security Systems Integrity Key Management.
Identity Based Encryption
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 7 Jonathan Katz.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
1 CIS 5371 Cryptography 9. Data Integrity Techniques.
Dan Boneh Basic key exchange The Diffie-Hellman protocol Online Cryptography Course Dan Boneh.
Dan Boneh Basic key exchange Public-key encryption Online Cryptography Course Dan Boneh.
Dan Boneh Public Key Encryption from trapdoor permutations The RSA trapdoor permutation Online Cryptography Course Dan Boneh.
Cryptography Overview CS155. Cryptography Is A tremendous tool The basis for many security mechanisms Is not The solution to all security problems Reliable.
Dan Boneh Introduction What is cryptography? Online Cryptography Course Dan Boneh.
Public Key Model 8. Cryptography part 2.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
Dan Boneh Authenticated Encryption Definitions Online Cryptography Course Dan Boneh.
Dan Boneh Intro. Number Theory Intractable problems Online Cryptography Course Dan Boneh.
Dan Boneh Public Key Encryption from trapdoor permutations Public key encryption: definitions and security Online Cryptography Course Dan Boneh.
Andreas Steffen, , 4-PublicKey.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications.
8. Data Integrity Techniques
ElGamal Public Key Cryptography CS 303 Alg. Number Theory & Cryptography Jeremy Johnson Taher ElGamal, "A Public-Key Cryptosystem and a Signature Scheme.
Lecture 3.2: Public Key Cryptography II CS 436/636/736 Spring 2014 Nitesh Saxena.
Cryptography Lecture 8 Stefan Dziembowski
Oblivious Signature-Based Envelope Ninghui Li, Stanford University Wenliang (Kevin) Du, Syracuse University Dan Boneh, Stanford University.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
Dan Boneh Public key encryption from Diffie-Hellman The ElGamal Public-key System Online Cryptography Course Dan Boneh.
CS 4/585: Cryptography Tom Shrimpton FAB
Topic 22: Digital Schemes (2)
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Lecture 3.4: Public Key Cryptography IV CS 436/636/736 Spring 2013 Nitesh Saxena.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Cryptography Lecture 9 Stefan Dziembowski
Basic Cryptography 1. What is cryptography? Cryptography is a mathematical method of protecting information –Cryptography is part of, but not equal to,
Class 5 Channels and Preview CIS 755: Advanced Computer Security Spring 2014 Eugene Vasserman
Public Key Encryption with keyword Search Author: Dan Boneh Rafail Ostroversity Giovanni Di Crescenzo Giuseppe Persiano Presenter: 陳昱圻.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
15-499Page :Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.
Information Security CS 526
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Cryptographic Security Identity-Based Encryption.
Cryptography: Review Day David Brumley Carnegie Mellon University.
Dan Boneh Basic key exchange Trusted 3 rd parties Online Cryptography Course Dan Boneh.
1 Efficient Selective-ID IBE Without Random Oracle Dan Boneh Stanford University Xavier Boyen Voltage Security.
Dan Boneh Odds and ends Deterministic Encryption Online Cryptography Course Dan Boneh.
Introduction to Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Dan Boneh Public Key Encryption from trapdoor permutations Constructions Online Cryptography Course Dan Boneh Goal: construct chosen-ciphertext secure.
Key Exchange in Systems VPN usually has two phases –Handshake protocol: key exchange between parties sets symmetric keys –Traffic protocol: communication.
Dan Boneh Public Key Encryption from trapdoor permutations Public key encryption: definitions and security Online Cryptography Course Dan Boneh.
Asymmetric-Key Cryptography
Topic 26: Discrete LOG Applications
Course summary COS 433: Crptography -Spring 2010 Boaz Barak.
Topic 30: El-Gamal Encryption
Introduction to Symmetric-key and Public-key Cryptography
The power of Pairings towards standard model security
Cryptography Lecture 26.
Presentation transcript:

Dan Boneh Public key encryption from Diffie-Hellman The ElGamal Public-key System Online Cryptography Course Dan Boneh

Dan Boneh Recap: public key encryption: (Gen, E, D) E E D D pk mccm sk Gen

Dan Boneh Recap: public-key encryption applications Key exchange (e.g. in HTTPS) Encryption in non-interactive settings: Secure Bob has Alice’s pub-key and sends her an Encrypted File Systems Bob write E(k F, File) E(pk A, K F ) E(pk B, K F ) Alice read File sk A

Dan Boneh Recap: public-key encryption applications Key exchange (e.g. in HTTPS) Encryption in non-interactive settings: Secure Bob has Alice’s pub-key and sends her an Encrypted File Systems Key escrow: data recovery without Bob’s key Bob write E(k F, File) E(pk escrow, K F ) E(pk B, K F ) Escrow Service Escrow Service sk escrow

Dan Boneh Constructions This week: two families of public-key encryption schemes Previous lecture: based on trapdoor functions (such as RSA) – Schemes: ISO standard, OAEP+, … This lecture: based on the Diffie-Hellman protocol – Schemes: ElGamal encryption and variants (e.g. used in GPG) Security goals: chosen ciphertext security

Dan Boneh Review: the Diffie-Hellman protocol (1977) Fix a finite cyclic group G ( e.g G = (Z p ) * ) of order n Fix a generator g in G ( i.e. G = {1, g, g 2, g 3, …, g n-1 } ) AliceBob choose random a in {1,…,n}choose random b in {1,…,n} k AB = g ab = ( g a ) b = A b B a = ( g b ) a = A = g a B = g b

Dan Boneh ElGamal: converting to pub-key enc. (1984) Fix a finite cyclic group G ( e.g G = (Z p ) * ) of order n Fix a generator g in G ( i.e. G = {1, g, g 2, g 3, …, g n-1 } ) AliceBob choose random a in {1,…,n}choose random b in {1,…,n} A = g a B = g b Treat as a public key ct = [, ] compute g ab = A b, derive symmetric key k, encrypt message m with k

Dan Boneh ElGamal: converting to pub-key enc. (1984) Fix a finite cyclic group G ( e.g G = (Z p ) * ) of order n Fix a generator g in G ( i.e. G = {1, g, g 2, g 3, …, g n-1 } ) AliceBob choose random a in {1,…,n}choose random b in {1,…,n} A = g a B = g b Treat as a public key ct = [, ] compute g ab = A b, derive symmetric key k, encrypt message m with k To decrypt: compute g ab = B a, derive k, and decrypt

Dan Boneh The ElGamal system (a modern view) G: finite cyclic group of order n (E s, D s ) : symmetric auth. encryption defined over (K,M,C) H: G 2 K a hash function We construct a pub-key enc. system (Gen, E, D): Key generation Gen: – choose random generator g in G and random a in Z n – output sk = a, pk = (g, h=g a )

Dan Boneh The ElGamal system (a modern view) E ( pk=(g,h), m ) : b Z n, u g b, v h b k H(u,v), c E s (k, m) output (u, c) D ( sk=a, (u,c) ) : v u a k H(u,v), m D s (k, c) output m G: finite cyclic group of order n (E s, D s ) : symmetric auth. encryption defined over (K,M,C) H: G 2 K a hash function R

Dan Boneh ElGamal performance Encryption: 2 exp. (fixed basis) – Can pre-compute [ g (2^i), h (2^i) for i=1,…,log 2 n ] – 3x speed-up (or more) Decryption: 1 exp. (variable basis) E( pk=(g,h), m) : b Z n, u g b, v h b D( sk=a, (u,c) ) : v u a

Dan Boneh End of Segment Next step: why is this system chosen ciphertext secure? under what assumptions?

Dan Boneh Public key encryption from Diffie-Hellman ElGamal Security Online Cryptography Course Dan Boneh

Dan Boneh Computational Diffie-Hellman Assumption G: finite cyclic group of order n Comp. DH (CDH) assumption holds in G if: g, g a, g b ⇏ g ab for all efficient algs. A: Pr [ A(g, g a, g b ) = g ab ] < negligible where g { generators of G }, a, b Z n

Dan Boneh Hash Diffie-Hellman Assumption G: finite cyclic group of order n, H: G 2 K a hash function Def: Hash-DH (HDH) assumption holds for (G, H) if: ( g, g a, g b, H(g b,g ab ) ) ≈ p ( g, g a, g b, R ) where g { generators of G }, a, b Z n, R K H acts as an extractor: strange distribution on G 2 ⇒ uniform on K

Template vertLeftWhite2 Suppose K = {0,1} 128 and H: G 2 K only outputs strings in K that begin with 0 ( i.e. for all x,y: msb(H(x,y))=0 ) Can Hash-DH hold for (G, H) ? Yes, for some groups G No, Hash-DH is easy to break in this case Yes, Hash-DH is always true for such H

Dan Boneh ElGamal is sem. secure under Hash-DH KeyGen:g {generators of G}, a Z n output pk = (g, h=g a ), sk = a D( sk=a, (u,c) ) : k H(u,u a ), m D s (k, c) output m E( pk=(g,h), m) : b Z n k H(g b,h b ), c E s (k, m) output (g b, c)

Dan Boneh ElGamal is sem. secure under Hash-DH ≈p≈p ≈p≈p ≈p≈p chal.adv. A pk,sk m 0, m 1 g b, E s ( H(), m 0 ) b’ ≟ 1 pk = (g,g a ) chal.adv. A pk,sk m 0, m 1 g b, E s ( H(), m 1 ) b’ ≟ 1 pk = (g,g a ) chal.adv. A pk,sk m 0, m 1 g b, E s ( k, m 0 ) b’ ≟ 1 pk = (g,g a ) kKkK chal.adv. A pk,sk m 0, m 1 g b, E s ( k, m 1 ) b’ ≟ 1 pk = (g,g a ) kKkK (g b, g ab ) ≈p≈p

Dan Boneh ElGamal chosen ciphertext security? To prove chosen ciphertext security need stronger assumption Interactive Diffie-Hellman (IDH) in group G: IDH holds in G if: ∀ efficient A: Pr[ A outputs g ab ] < negligible Chal.Adv. A (u 1,v 1 ) g{gen} a,bZ n g, h=g a, u=g b 1if (u 1 ) a = v 1 0 otherwise v wins if v=g ab

Dan Boneh ElGamal chosen ciphertext security? Security Theorem: If IDH holds in the group G, (E s, D s ) provides auth. enc. and H: G 2 K is a “random oracle” then ElGamal is CCA ro secure. Questions:(1) can we prove CCA security based on CDH? (2) can we prove CCA security without random oracles?

Dan Boneh End of Segment

Dan Boneh Public key encryption from Diffie-Hellman ElGamal Variants With Better Security Online Cryptography Course Dan Boneh

Dan Boneh Review: ElGamal encryption KeyGen:g {generators of G}, a Z n output pk = (g, h=g a ), sk = a D( sk=a, (u,c) ) : k H(u,u a ), m D s (k, c) output m E( pk=(g,h), m) : b Z n k H(g b,h b ), c E s (k, m) output (g b, c)

Dan Boneh ElGamal chosen ciphertext security Security Theorem: If IDH holds in the group G, (E s, D s ) provides auth. enc. and H: G 2 K is a “random oracle” then ElGamal is CCA ro secure. Can we prove CCA security based on CDH (g, g a, g b ↛ g ab ) ? Option 1: use group G where CDH = IDH (a.k.a bilinear group) Option 2: change the ElGamal system

Dan Boneh Variants: twin ElGamal [CKS’08] KeyGen:g {generators of G}, a1, a2 Z n output pk = (g, h 1 =g a1, h 2 =g a2 ), sk = (a1, a2) D ( sk=(a1,a2), (u,c) ) : k H(u, u a1, u a2 ) m D s (k, c) output m E ( pk=(g,h 1,h 2 ), m ) : b Z n k H(g b, h 1 b, h 2 b ) c E s (k, m) output (g b, c)

Dan Boneh Chosen ciphertext security Security Theorem: If CDH holds in the group G, (E s, D s ) provides auth. enc. and H: G 3 K is a “random oracle” then twin ElGamal is CCA ro secure. Cost: one more exponentiation during enc/dec – Is it worth it? No one knows …

Dan Boneh ElGamal security w/o random oracles? Can we prove CCA security without random oracles? Option 1: use Hash-DH assumption in “bilinear groups” – Special elliptic curve with more structure [CHK’04 + BB’04] Option 2: use Decision-DH assumption in any group [CS’98]

Dan Boneh Further Reading The Decision Diffie-Hellman problem. D. Boneh, ANTS 3, 1998 Universal hash proofs and a paradigm for chosen ciphertext secure public key encryption. R. Cramer and V. Shoup, Eurocrypt 2002 Chosen-ciphertext security from Identity-Based Encryption. D. Boneh, R. Canetti, S. Halevi, and J. Katz, SICOMP 2007 The Twin Diffie-Hellman problem and applications. D. Cash, E. Kiltz, V. Shoup, Eurocrypt 2008 Efficient chosen-ciphertext security via extractable hash proofs. H. Wee, Crypto 2010

Dan Boneh Public key encryption from Diffie-Hellman A Unifying Theme Online Cryptography Course Dan Boneh

Dan Boneh One-way functions (informal) A function f: X Y is one-way if There is an efficient algorithm to evaluate f( ⋅ ), but Inverting f is hard: for all efficient A and x X : Pr [ A ( f(x) ) ] < negligible Functions that are not one-way: f(x) = x, f(x) = 0

Dan Boneh Ex. 1: generic one-way functions Let f: X Y be a secure PRG (where |Y| ≫ |X| ) (e.g. f built using det. counter mode) Lemma: f a secure PRG ⇒ f is one-way Proof sketch: A inverts f ⇒ B(y) = is a distinguisher Generic: no special properties. Difficult to use for key exchange.

Dan Boneh Ex 2: The DLOG one-way function Fix a finite cyclic group G ( e.g G = (Z p ) * ) of order n g: a random generator in G ( i.e. G = {1, g, g 2, g 3, …, g n-1 } ) Define: f: Z n G as f(x) = g x ∈ G Lemma: Dlog hard in G ⇒ f is one-way Properties: f(x), f(y) ⇒ f(x+y) = f(x) ⋅ f(y) ⇒ key-exchange and public-key encryption

Dan Boneh Ex. 3: The RSA one-way function choose random primes p,q  1024 bits. Set N=pq. choose integers e, d s.t. e ⋅ d = 1 (mod  (N) ) Define: f: as f(x) = x e in Lemma: f is one-way under the RSA assumption Properties: f(x ⋅ y) = f(x) ⋅ f(y) and f has a trapdoor

Dan Boneh Summary Public key encryption: made possible by one-way functions with special properties homomorphic properties and trapdoors

Dan Boneh End of Segment

Dan Boneh Farewell (for now) Online Cryptography Course Dan Boneh

Dan Boneh Quick Review: primitives PRG PRF, PRP MAC GGM CTR CMAC, HMAC PMAC Collision resistance key exchange Trapdoor Functions public key encryption Diffie-Hellman groups

Dan Boneh Quick Review: primitives To protect non-secret data: (data integrity) – using small read-only storage: use collision resistant hash – no read-only space: use MAC … requires secret key To protect sensitive data: only use authenticated encryption (eavesdropping security by itself is insufficient) Session setup: Interactive settings: use authenticated key-exchange protocol When no-interaction allowed: use public-key encryption

Dan Boneh Remaining Core Topics (part II) Digital signatures and certificates Authenticated key exchange User authentication: passwords, one-time passwords, challenge-response Privacy mechanisms Zero-knowledge protocols

Dan Boneh Many more topics to cover … Elliptic Curve Crypto Quantum computing New key management paradigms: identity based encryption and functional encryption Anonymous digital cash Private voting and auction systems Computing on ciphertexts: fully homomorphic encryption Lattice-based crypto Two party and multi-party computation

Dan Boneh Final Words Be careful when using crypto: A tremendous tool, but if incorrectly implemented: system will work, but may be easily attacked Make sure to have others review your designs and code Don’t invent your own ciphers or modes

Dan Boneh End of part I