Slide 1 Vitaly Shmatikov CS 380S Semantic Security.

Slides:



Advertisements
Similar presentations
Foundations of Cryptography Lecture 10 Lecturer: Moni Naor.
Advertisements

SECURITY AND VERIFICATION Lecture 1: Why to prove cryptography? The origins of provable cryptography Tamara Rezk INDES TEAM, INRIA January 3 rd, 2012.
CS 395T Formal Models of Cryptography: Symmetric Encryption.
CS555Topic 191 Cryptography CS 555 Topic 19: Formalization of Public Key Encrpytion.
Security Definitions in Computational Cryptography
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
Foundations of Cryptography Lecture 13 Lecturer: Moni Naor.
Cramer & Shoup Encryption Cramer and Shoup: A practical public key crypto system provably secure against adaptive chosen ciphertext attack. Crypto 1998.
7. Asymmetric encryption-
CS 395T Computational Soundness of Formal Models.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
Public-Key Cryptosystems Based on Composite Degree Residuosity Classes Presenter: 陳國璋 EUROCRYPT'99, LNCS 1592, pp , By Pascal Paillier Efficient.
Identity Based Encryption
The RSA Cryptosystem and Factoring Integers (II) Rong-Jaye Chen.
Co-operative Private Equality Test(CPET) Ronghua Li and Chuan-Kun Wu (received June 21, 2005; revised and accepted July 4, 2005) International Journal.
1 Identity-Based Encryption form the Weil Pairing Author : Dan Boneh Matthew Franklin Presentered by Chia Jui Hsu Date :
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
A Designer’s Guide to KEMs Alex Dent
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.
Public Key Algorithms 4/17/2017 M. Chatterjee.
1 CIS 5371 Cryptography 9. Data Integrity Techniques.
CS555Spring 2012/Topic 41 Cryptography CS 555 Topic 4: Computational Approach to Cryptography.
Slide 1 Vitaly Shmatikov CS 378 Overview of Public-Key Cryptography.
Cramer-Shoup is Plaintext Aware in the Standard Model Alexander W. Dent Information Security Group Royal Holloway, University of London.
Slide 1 Vitaly Shmatikov CS 380S Oblivious Transfer and Secure Multi-Party Computation With Malicious Parties.
Slide 1 Vitaly Shmatikov CS 361S Overview of Public-Key Cryptography.
Lecture 6: Public Key Cryptography
0x1A Great Papers in Computer Security
Public Key Model 8. Cryptography part 2.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
8. Data Integrity Techniques
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.
Digital Signatures A primer 1. Why public key cryptography? With secret key algorithms Number of key pairs to be generated is extremely large If there.
1 Lect. 13 : Public Key Encryption RSA ElGamal. 2 Shamir Rivest Adleman RSA Public Key Systems  RSA is the first public key cryptosystem  Proposed in.
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.
Basic Cryptography 1. What is cryptography? Cryptography is a mathematical method of protecting information –Cryptography is part of, but not equal to,
Cryptography and Network Security (CS435) Part Eight (Key Management)
Background on security
CS555Spring 2012/Topic 111 Cryptography CS 555 Topic 11: Encryption Modes and CCA Security.
IND-CPA and IND-CCA Concepts Summary  Basic Encryption Security Definition: IND-CPA  Strong Encryption Security Definition: IND-CCA  IND-CPA, IND-CCA.
Cryptography Lecture 2 Arpita Patra. Summary of Last Class  Introduction  Secure Communication in Symmetric Key setting >> SKE is the required primitive.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
15-499Page :Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.
Information Security CS 526
CS 4803 Fall 04 Public Key Algorithms. Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication.
CS555Spring 2012/Topic 71 Cryptography CS 555 Topic 7: Stream Ciphers and CPA Security.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Introduction to Pubic Key Encryption CSCI 5857: Encoding and Encryption.
COM 5336 Lecture 8 Digital Signatures
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Key Exchange in Systems VPN usually has two phases –Handshake protocol: key exchange between parties sets symmetric keys –Traffic protocol: communication.
B504/I538: Introduction to Cryptography
B504/I538: Introduction to Cryptography
Topic 25: Discrete LOG, DDH + Attacks on Plain RSA
Topic 30: El-Gamal Encryption
Cryptography Lecture 10.
Cryptography Lecture 9.
The power of Pairings towards standard model security
Cryptography Lecture 25.
Cryptography Lecture 23.
Presentation transcript:

slide 1 Vitaly Shmatikov CS 380S Semantic Security

slide 2 Diffie-Hellman Protocol (1976) uAlice and Bob never met and share no secrets uPublic info: p and g p is a large prime number, g is a generator of Z p * –Z p *={1, 2 … p-1};  a  Z p *  i such that a=g i mod p –Modular arithmetic: numbers “wrap around” after they reach p AliceBob Pick secret, random X Pick secret, random Y g y mod p g x mod p Compute k=(g y ) x =g xy mod p Compute k=(g x ) y =g xy mod p

slide 3 Why Is Diffie-Hellman Secure? uDiscrete Logarithm (DL) problem: given g x mod p, it’s hard to extract x There is no known efficient algorithm for doing this This is not enough for Diffie-Hellman to be secure! uComputational Diffie-Hellman (CDH) problem: given g x and g y, it’s hard to compute g xy mod p … unless you know x or y, in which case it’s easy uDecisional Diffie-Hellman (DDH) problem: given g x and g y, it’s hard to tell the difference between g xy mod p and g r mod p where r is random

slide 4 DDH Assumption uG is a group of large prime order q For g 1,g 2,u 1,u 2  G define 1 if  x  Z q s.t. u 1 =g 1 x, u 2 =g 2 x DHP(g 1,g 2,u 1,u 2 ) = 0 otherwise uDecisional Diffie-Hellman (DDH) Assumption says that there exists no efficient algorithm for computing DHP correctly with negligible error probability on all inputs

slide 5 Security of Diffie-Hellman Protocol uAssuming DDH problem is hard, Diffie-Hellman protocol is a secure key establishment protocol against passive attackers Eavesdropper can’t tell the difference between the established key and a random value Can use new key for symmetric cryptography –Approx times faster than modular exponentiation uBasic Diffie-Hellman protocol does not provide authentication

slide 6 Public-Key Encryption uKey generation: computationally easy to generate a pair (public key PK, private key SK) Computationally infeasible to determine private key SK given only public key PK uEncryption: given plaintext M and public key PK, easy to compute ciphertext C=E PK (M) uDecryption: given ciphertext C=E PK (M) and private key SK, easy to compute plaintext M Infeasible to compute M from C without SK Trapdoor function: Decrypt(SK,Encrypt(PK,M))=M

slide 7 When Is a Cipher “Secure”? uHard to recover the key? What if attacker can learn plaintext without learning the key? uHard to recover plaintext from ciphertext? What if attacker learns some bits or some function of bits? uFixed mapping from plaintexts to ciphertexts? What if attacker sees two identical ciphertexts and infers that the corresponding plaintexts are identical? Implication: encryption must be randomized or stateful

slide 8 How Can a Cipher Be Attacked? uAssume that the attacker knows the encryption algorithm and wants to decrypt some ciphertext uMain question: what else does the attacker know? Depends on the application in which cipher is used! uCiphertext-only attack uKnown-plaintext attack (stronger) Knows some plaintext-ciphertext pairs uChosen-plaintext attack (even stronger) Can obtain ciphertext for any plaintext of his choice uChosen-ciphertext attack (very strong) Can decrypt any ciphertext except the target

slide 9 The Chosen-Plaintext Game uAttacker does not know the key uHe chooses as many plaintexts as he wants, and learns the corresponding ciphertexts uWhen ready, he picks two plaintexts M 0 and M 1 He is even allowed to pick plaintexts for which he previously learned ciphertexts! uHe receives either a ciphertext of M 0, or a ciphertext of M 1 uHe wins if he guesses correctly which one it is

slide 10 CPA Game: Formalization uIdea: attacker should not be able to learn even a single bit of the encrypted plaintext uDefine Enc(M 0,M 1,b) to be a function that returns encrypted M b Given two plaintexts, Enc returns a ciphertext of one or the other depending on the value of bit b Think of Enc as a magic box that computes ciphertexts on attacker’s demand. He can obtain a ciphertext of any plaintext M by submitting M 0 =M 1 =M, or he can try to learn even more by submitting M 0 ≠M 1. uAttacker’s goal is to learn just one bit b 0 or 1

slide 11 Why Hide Everything? uLeaking even a little bit of information about the plaintext can be disastrous uElectronic voting 2 candidates on the ballot (1 bit to encode the vote) If ciphertext leaks the parity bit of the encrypted plaintext, eavesdropper learns the entire vote uD-Day: Pas-de-Calais or Normandy? Allies convinced Germans that invasion will take place at Pas-de-Calais –Dummy landing craft, feed information to double spies Goal: hide a 1-bit secret

slide 12 Chosen-Plaintext Security uConsider two experiments (A is the attacker) Experiment 0Experiment 1 A interacts with Enc(-,-,0) A interacts with Enc(-,-,1) and outputs bit d and outputs bit d Identical except for the value of the secret bit d is attacker’s guess of the secret bit uAttacker’s advantage is defined as | Prob(A outputs 1 in Exp0) - Prob(A outputs 1 in Exp1)) | uEncryption scheme is chosen-plaintext secure if this advantage is negligible for any efficient A If A “knows” secret bit, he should be able to make his output depend on it

slide 13 Simple Example uAny deterministic, stateless encryption scheme is insecure Attacker can easily distinguish encryptions of different plaintexts from encryptions of identical plaintexts Attacker A interacts with Enc(-,-,b) Let X,Y be any two different plaintexts C 1  Enc(X,Y,b); C 2  Enc(Y,Y,b); If C 1 =C 2 then b=1 else say b=0 uThe advantage of this attacker A is 1 Prob(A outputs 1 if b=0)=0 Prob(A outputs 1 if b=1)=1

slide 14 Semantic Security uHide all partial information uImmune against attackers with a-priori knowledge about the plaintext uEquivalent to ciphertext indistinguishability It is infeasible to find two messages whose encryptions can be distinguished Chosen-plaintext security is equivalent to ciphertext indistinguishability under the chosen-plaintext attack [Goldwasser and Micali 1982]

Beyond Semantic Security uChosen-ciphertext security “Lunch-time” attack [Naor and Yung 1990] Adaptive chosen-ciphertext security [Rackoff and Simon 1991] uNon-malleability [Dolev, Dwork, Naor 1991] Infeasible to create a “related” ciphertext Implies that an encrypted message cannot be modified without decrypting it slide 15

ElGamal Encryption uKey generation Pick a large prime p, generator g of Z* p Private key: random x such that 1 ≤ x ≤ p-2 Public key: (p, g, y), where y = g x (mod p) uEncryption Pick random k, 1 ≤ k ≤ p-2 E(m) = ( ,  ) = (g k mod p, m  y k mod p) uDecryption Given ciphertext ( ,  ), compute  -x mod p Recover m =  (  -x ) mod p slide 16

uSemantic security of ElGamal encryption is equivalent to DDH uGiven an oracle for breaking DDH, show that we can find two messages whose ElGamal ciphertexts can be distinguished uGiven an oracle for distinguishing ElGamal ciphertexts, show that we can break DDH Given a triplet, we can decide whether Z=g ab mod p or Z is random Semantic Security of ElGamal slide 17

DDH  ElGamal uPick any two messages m 0, m 1 uReceive E(m) = g a, m  y a y = g x is the ElGamal public key To break ElGamal, must determine if m=m 0 or m=m 1 uRun the DDH oracle on this triplet: = v is random uIf this is a DH triplet, then m=m 0, else m=m 1 uThis breaks semantic security of ElGamal (why?) slide 18

uSuppose some algorithm A breaks ElGamal Given any public key, A produces plaintexts m 0 and m 1 whose encryptions it can distinguish with advantage Adv uWe will use A to break DDH Decide, given (g a, g b, Z), whether Z=g ab mod p or not uGive y=g a mod p to A as the public key uA produces m 0 and m 1 uWe toss a coin for bit x and give A the ciphertext (g b, m x  Z) mod p This is a valid ElGamal encryption of m x iff Z=g ab mod p ElGamal  DDH (1) slide 19

uA receives (g b, m x  Z) mod p This is a valid ElGamal encryption of m x iff Z=g ab mod p uA outputs his guess of bit x (why?) uIf A guessed x correctly, we say that Z=g ab mod p, otherwise we say that Z is random uWhat is our advantage in breaking DDH? If Z=g ab mod p, we are correct with prob. Adv(A) If Z is random, we are correct with prob. ½ Our advantage in breaking DDH is Adv(A)/2 ElGamal  DDH (2) slide 20