/
Cryptography Lecture Cryptography Lecture

Cryptography Lecture - PowerPoint Presentation

tawny-fly
tawny-fly . @tawny-fly
Follow
342 views
Uploaded On 2019-12-18

Cryptography Lecture - PPT Presentation

Cryptography Lecture 6 Clicker quiz Let Gx x parityx Which of the following proves that G is not a pseudorandom generator G is not expanding Consider the following distinguisher D Dy outputs 1 ID: 770837

pseudo bits message security bits pseudo security message otp uniform efficient key privka pseudorandom output time secrecy generator bit

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Cryptography Lecture" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Cryptography Lecture 6

Clicker quiz Let G(x) = x || parity(x). Which of the following proves that G is not a pseudorandom generator? G is not expanding Consider the following distinguisher D: D(y) outputs 1 iff the first bit of y is 1 Consider the following distinguisher D: D(y) outputs 1 iff the parity of the first n bits of y is 0 Consider the following distinguisher D: D(y) outputs 1 iff the parity of the first n bits of y is equal to the last bit of y

PRGs Let G be a deterministic, poly-time algorithm that is expanding , i.e., |G(x)| = p(|x|) > |x| seed G output

PRGs Let G be a deterministic, poly-time algorithm that is expanding , i.e., |G(x)| = p(|x|) > |x|G defines a sequence of distributions!D n = the distribution on p(n)-bit strings defined by choosing x  Un and outputting G(x)PrD n[y] = PrUn [G(x) = y] = x : G(x)=y PrUn[x] = x : G(x)=y 2 -n = |{x : G(x)=y}|/2 n Note that most y occur with probability 0 I.e., D n is far from uniform

PRGs G is a PRG iff { D n} is pseudorandomI.e ., for all efficient distinguishers A, there is a negligible function  such that | Prx  Un[A(G(x))=1] - Pry  Up(n)[A(y)=1] | ≤ (n)I.e., no efficient A can distinguish whether it is given G(x ) (for uniform x) or a uniform string y!

Example (insecure PRG) Let G(x) = 0….0 Distinguisher? Analysis?

Example (insecure PRG) Let G(x) = x | OR(bits of x) Distinguisher? Analysis?

Do PRGs exist? We don’t know… Would imply P  NP We will assume certain algorithms are PRGsRecall the 3 principles of modern crypto… This is what is done in practiceWe will return to this later in the courseCan construct PRGs from weaker assumptionsFor details, see Chapter 7

Where things stand We saw that there are some inherent limitations if we want perfect secrecy In particular, key must be as long as the message We defined computational secrecy, a relaxed notion of security Can we overcome prior limitations?

Recall: one-time pad key p bits  ciphertext p bits message p bits

“Pseudo” one-time pad “pseudo” key p bits  G k ey n bits ciphertext p bits message p bits

Pseudo one-time pad Let G be a deterministic algorithm, with |G(k)| = p(|k|) Gen(1 n ): output uniform n-bit key kSecurity parameter n  message space {0,1} p(n)Enck(m): output G(k)  mDeck(c): output G(k)  cCorrectness is obvious…

Security of pseudo-OTP? Would like to be able to prove security Based on the assumption that G is a PRG

Definitions, proofs, and assumptions We’ve defined computational secrecy Our goal is to prove that the pseudo OTP meets that definitionWe cannot prove this unconditionallyBeyond our current techniques… Anyway, security clearly depends on GCan prove security based on the assumption that G is a pseudorandom generator

PRGs, revisited Let G be an efficient, deterministic function with |G(k)| = p(|k|) D y b y  U p(n) k  U n G For any efficient D, the probabilities that D outputs 1 in each case must be “close”

Proof by reduction Assume G is a pseudorandom generator Assume toward a contradiction that there is an efficient attacker A who “breaks” the pseudo-OTP scheme (as per the definition) U se A as a subroutine to build an efficient D that “breaks” pseudorandomness of GBy assumption, no such D exists!  No such A can exist

Alternately… Assume G is a pseudorandom generator Fix some arbitrary, efficient A attacking the pseudo-OTP scheme Use A as a subroutine to build an efficient D attacking G Relate the distinguishing gap of D to the success probability of ABy assumption, the distinguishing gap of D must be negligible Use this to bound the success probability of A

Security theorem If G is a pseudorandom generator, then the pseudo one-time pad Π is EAV-secure (i.e., computationally indistinguishable)

The reduction m 0 , m 1 b ←{0,1} m b c b’ if (b=b’) output 1 D y A

Analysis If A runs in polynomial time, then so does D

Analysis Let µ(n) = Pr [PrivKA ,Π(n) = 1] Claim: when y=G(x) for uniform x, then the view of A is exactly as in PrivKA, Π(n) Prx ← U n[D(G(x))=1] = µ(n)

The reduction m 0 , m 1 b ←{0,1} m b c b’ if (b=b’) output 1 D y A k  U n G  - Enc

Analysis Let µ(n) = Pr [PrivKA ,Π(n) = 1] If y=G(x) for uniform x, then the view of A is exactly as in PrivKA ,Π(n) Prx ← Un[D(G(x))=1] = µ(n)If distribution of y is uniform, then A succeeds with probability exactly ½  Pr y ← U p(n) [D(y )=1] = ½

The reduction m 0 , m 1 b ←{0,1} m b c b’ if (b=b’) output 1 D y A y  U p(n) OTP - Enc

Analysis Let µ(n) = Pr [PrivKA ,Π(n) = 1] If y=G(x) for uniform x, then the view of A is exactly as in PrivKA ,Π(n) Prx ← Un[D(G(x))=1] = µ(n)If distribution of y is uniform, then A succeeds with probability exactly ½  Pr y ← U p(n) [D(y )=1] = ½ Since G is pseudorandom: | µ(n) – ½ | ≤ negl (n) Pr[PrivKA,Π(n) = 1] ≤ ½ + negl(n)

Stepping back… Proof that the pseudo OTP is secure… We have a provably secure scheme, rather than just a heuristic construction!

Stepping back… Proof that the pseudo OTP is secure… …with some caveats Assuming G is a pseudorandom generator Relative to our definitionThe only ways the scheme can be broken are:If a weakness is found in GIf the definition isn’t sufficiently strong…

Have we gained anything? YES: the pseudo-OTP has a key shorter than the message n bits vs. p(n) bits The fact that the parties internally generate a p(n)-bit temporary string to encrypt/decrypt is irrelevantThe key is what the parties share in advance Parties do not store the p(n)-bit temporary value

Recall… Perfect secrecy has two limitations/drawbacks Key as long as the message Key can only be used once We have seen how to circumvent the first Does the pseudo OTP have the second limitation? How can we circumvent the second?

But first… Develop an appropriate security definition Recall that security definitions have two parts Security goal Threat model We will keep the security goal the same, but strengthen the threat model

Single-message secrecy k c m c  Enc k (m) k

Multiple-message secrecy k c 1 , …, c t m 1 , …, m t c 1  Enc k (m 1 ) … c t  Enck(m t) k

A formal definition 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(1 n ), b  {0,1}, for all i: c i  Enc k ( m b,i ) b ’  A(c 1 , …, 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