Cryptography Lecture 7.

Slides:



Advertisements
Similar presentations
CMSC 414 Computer and Network Security Lecture 4 Jonathan Katz.
Advertisements

CIS 5371 Cryptography 3b. Pseudorandomness.
Cryptography: The Landscape, Fundamental Primitives, and Security David Brumley Carnegie Mellon University.
Asymmetric Cryptography part 1 & 2 Haya Shulman Many thanks to Amir Herzberg who donated some of the slides from
CS555Spring 2012/Topic 41 Cryptography CS 555 Topic 4: Computational Approach to Cryptography.
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
Cryptography Lecture 8 Stefan Dziembowski
Ryan Henry I 538 /B 609 : Introduction to Cryptography.
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.
CS555Spring 2012/Topic 71 Cryptography CS 555 Topic 7: Stream Ciphers and CPA Security.
Cryptography Lecture 6 Arpita Patra © Arpita Patra.
CS555Spring 2012/Topic 81 Cryptography CS 555 Topic 8: Pseudorandom Functions and CPA Security.
Cryptography Lecture 5 Arpita Patra © Arpita Patra.
Authenticated encryption
Modern symmetric-key Encryption
Secrecy of (fixed-length) stream ciphers
Information Security CS 526
PRPs and PRFs CS255: Winter 2017
Cryptography Lecture 9.
Cryptography Lecture 12.
B504/I538: Introduction to Cryptography
Cryptography Lecture 4.
Cryptography Lecture 5.
Cryptography Lecture 19.
Cryptography Lecture 3 Arpita Patra © Arpita Patra.
Cryptography Lecture 9 Arpita Patra © Arpita Patra.
CMSC 414 Computer and Network Security Lecture 3
Cryptography Lecture 6.
Cryptography Lecture 10.
Topic 7: Pseudorandom Functions and CPA-Security
B504/I538: Introduction to Cryptography
Cryptography Lecture 7 Arpita Patra © Arpita Patra.
Cryptography Lecture 7.
Cryptography Lecture 11 Arpita Patra © Arpita Patra.
Cryptography Lecture 25.
Cryptography Lecture 4 Arpita Patra © Arpita Patra.
Cryptography Lecture 7 Arpita Patra © Arpita Patra.
B504/I538: Introduction to Cryptography
Cryptography Lecture 11.
Cryptography Lecture 4 Arpita Patra © Arpita Patra.
Cryptography Lecture 17.
Cryptography Lecture 5 Arpita Patra © Arpita Patra.
Cryptography Lecture 4 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.
Topic 13: Message Authentication Code
Cryptography Lecture 6.
Cryptography Lecture 6 Arpita Patra © Arpita Patra.
Cryptography Lecture 3.
Cryptography Lecture 10.
Cryptography Lecture 9.
Cryptography Lecture 11.
Cryptography Lecture 10.
Cryptography Lecture 6.
Cryptography Lecture 16.
Cryptography Lecture 21.
Cryptography Lecture 24.
Cryptography Lecture 23.
CIS 5371 Cryptography 2. Perfect Secret Encryption
Presentation transcript:

Cryptography Lecture 7

Computational indistinguishability (EAV-security) Fix a scheme  and some adversary A Define a randomized exp’t PrivKA,(n): A(1n) outputs m0, m1  {0,1}* of equal length k  Gen(1n), b  {0,1}, c  Enck(mb) b’  A(c) Adversary A succeeds if b = b’, and we say the experiment evaluates to 1 in this case

Computational indistinguishability (EAV-security)  is EAV-secure if for all PPT attackers A, there is a negligible function  such that Pr[PrivKA,(n) = 1] ≤ ½ + (n)

Clicker quiz Consider encryption scheme  that encrypts a 2n-bit message using an n-bit key via Enck(ma | mb) = kma | kmb . Which of the following could be the start of a proof that  is not EAV-secure? Consider an attacker A who outputs m0 = 0n0n and m1 = 1n1n… Consider an attacker A who outputs m0 = 0n0n and m1 = 0n1n… Consider an attacker A who outputs m0 = 0n1n and m1 = 1n0n…  is EAV-secure, since it uses the one-time pad

Multiple-message security Fix , A Define a randomized exp’t PrivKmultA,(n): A(1n) outputs two vectors (m0,1, …, m0,t) and (m1,1, …, m1,t) Require that |m0,i| = |m1,i| for all i k  Gen(1n), b  {0,1}, for all i: ci  Enck(mb,i) b’  A(c1, …, ct); A succeeds if b = b’, and experiment evaluates to 1 in this case

A formal definition  is multiple-message indistinguishable if for all PPT attackers A, there is a negligible function  such that Pr[PrivKmultA,(n) = 1] ≤ ½ + (n) Exercise: show that the pseudo-OTP is not multiple-message indistinguishable

Multiple-message secrecy No encryption scheme is multiple-message indistinguishable! Proof? What assumption did we make? No deterministic (and stateless) encryption scheme is multiple-message indistinguishable Need to consider randomized schemes!

Randomized encryption The issue is not an artifact of our definition It really is a problem if an attacker can tell when the same message is encrypted twice

Multiple-message secrecy We are not going to work with multiple-message indistinguishability Instead, define something stronger: security against chosen-plaintext attacks (CPA-security) Nowadays, this is the minimal notion of security an encryption scheme should satisfy

CPA-security c c2 c1 k k m c  Enck(m) c1  Enck(m1) m2 m1

Is the threat model too strong? In practice, there are many ways an attacker can influence what gets encrypted Not clear how best to model this Chosen-plaintext attacks encompass any such influence In some cases an attacker may have complete control over what gets encrypted

“Midway” AF is out of water… Will attack AF … Help! Fresh water needed Midway Island For more details, see: http://www.navy.mil/midway/how.html

CPA-security Fix , A Define a randomized exp’t PrivKCPAA,(n): k  Gen(1n) A(1n) interacts with an encryption oracle Enck(·), and then outputs m0, m1 of the same length b  {0,1}, c  Enck(mb), give c to A A can continue to interact with Enck(·) A outputs b’; A succeeds if b = b’, and experiment evaluates to 1 in this case

CPA-security  is secure against chosen-plaintext attacks (CPA-secure) if for all PPT attackers A, there is a negligible function  such that Pr[PrivKCPAA,(n) = 1] ≤ ½ + (n)

Relation with previous def’n? CPA-security is stronger than multiple-message indistingiushability I.e., if  is CPA-secure then it is also multiple-message indistinguishable Corollary: no deterministic encryption scheme can be CPA-secure

Pseudorandom functions

Random function When we talk about a random function f, we mean Choosing f uniformly at random (and then fixing it) Interacting with f In particular, once we choose f there is no more randomness involved In particular, if we query f on the same input twice, we get the same result

Choosing a uniform function Funcn = all functions mapping {0,1}n to {0,1}n How big is Funcn ? Can represent a function in Funcn using n · 2n bits |Funcn| = 2n·2n 000 001 010 011 100 101 110 111 010 100 111 001 000 # of entries: 23 = 8

Clicker quiz How many functions are there mapping {0,1}n to {0,1}m? m · 2n 2n·2m m · 2n·2n 2m·2n

Choosing a uniform function Choose uniform f  Funcn Equivalent: for each x  {0,1}n, choose f(x) uniformly in {0,1}n I.e., fill up the function table with uniform values Can also view this as being done “on-the-fly,” as values are needed

Pseudorandom functions Informally, a pseudorandom function “looks like” a random (i.e., uniform) function

Pseudorandom functions Informally, a pseudorandom function “looks like” a random function As in our discussion of PRGs, it does not make sense to talk about any fixed function being pseudorandom We look instead at functions chosen according to some distribution In particular, we look instead at keyed functions

Keyed functions Let F: {0,1}* x {0,1}*  {0,1}* be an efficient, deterministic algorithm Define Fk(x) = F(k, x) The first input is called the key Assume F is length preserving: F(k, x) only defined if |k|=|x|, in which case |F(k, x)| = |k| = |x| Choosing a uniform k  {0,1}n is equivalent to choosing the function Fk : {0,1}n  {0,1}n The algorithm F defines a distribution over functions in Funcn!

Note {Fk}k{0,1}n is a subset of Funcn The number of functions in Funcn is 2n·2n {Fk}k{0,1}n is a subset of Funcn The number of functions in {Fk}k{0,1}n is at most 2n This is only a tiny fraction of Funcn!

Pseudorandom functions (PRFs) F is a pseudorandom function if Fk, for uniform key k  {0,1}n, is indistinguishable from a uniform function f  Funcn Formally, for all poly-time distinguishers D: | Prk{0,1}n[DFk(·) = 1] - PrfFuncn[Df(·) = 1] | ≤ ε(n)

?? f … Fk … x1 f  Funcn chosen uniformly at random World 0 f(x1) xt f(xt) ?? World 1 k  {0,1}n chosen uniformly at random Fk x1 Fk(x1) … xt Fk(xt) (poly-time)

Examples (insecure) F(k, x) = 0n F(k, x) = k F(k, x) = k  x