/
Cryptography Lecture  6 Pseudorandom generators   (PRGs) Let G be an efficient, deterministic Cryptography Lecture  6 Pseudorandom generators   (PRGs) Let G be an efficient, deterministic

Cryptography Lecture 6 Pseudorandom generators (PRGs) Let G be an efficient, deterministic - PowerPoint Presentation

aaron
aaron . @aaron
Follow
369 views
Uploaded On 2019-11-02

Cryptography Lecture 6 Pseudorandom generators (PRGs) Let G be an efficient, deterministic - PPT Presentation

Cryptography Lecture 6 Pseudorandom generators PRGs Let G be an efficient deterministic algorithm that expands a short seed into a longer output Specifically let Gx px G is a PRG if when the distribution of x is uniform the distribution of Gx is indistinguishable from ID: 762126

message security pseudorandom bits security message bits pseudorandom pseudo otp efficient output secrecy key prgs definition distribution uniform multiple

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Cryptography Lecture 6 Pseudorandom gen..." 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

Pseudorandom generators (PRGs) Let G be an efficient, deterministic algorithm that expands a short seed into a longer output Specifically, let |G(x)| = p(|x|) G is a PRG if: when the distribution of x is uniform, the distribution of G(x) is “indistinguishable from uniform” Useful whenever you have a “small” number of true random bits, and want lots of “random-looking” bits Note that G(x) is very far from uniform

PRGs I.e ., for all efficient distinguishers A , there is a negligible function  such that | Pr x  U n [A(G(x))=1] - Pr y  U p(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?

Stream ciphers As defined, PRGs are limited They have fixed-length output They produce the entire output in “one shot” In practice, PRGs are based on stream ciphers Can be viewed as producing an “unbounded” stream of pseudorandom bits, on demand More flexible, more efficient See book for details; will revisit later

Do PRGs/stream ciphers exist? We don’t know… Would imply P  NP We will assume certain algorithms are PRGs Recall the 3 principles of modern crypto… This is what is done in practice We will return to this later in the course Can construct PRGs from weaker assumptions For 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 k Security parameter n  message space {0,1} p(n) Enc k (m): output G(k)  m Dec k (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 definition We are unable to prove this unconditionally Beyond our current techniques… Anyway, security clearly depends on G Can hope to 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 G By 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 probability of D to the success probability of A By assumption, the distinguishing probability of D must be negligible  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 [ PrivK A , Π (n) = 1] Claim: if distribution of y is pseudorandom, then the view of A is exactly as in PrivKA,Π(n) Pr x ← Un[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 [ PrivK A , Π (n) = 1] If distribution of y is pseudorandom, 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 ½  Pry ← Up(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 [ PrivK A , Π (n) = 1] If distribution of y is pseudorandom, 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 ½  Pry ← Up(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 a heuristic construction!

Stepping back… Proof that the pseudo OTP is secure… …with some caveats Assuming G is a pseudorandom generator Relative to our definition The only way the scheme can be broken is: If a weakness is found in G If 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 irrelevant The key is what the parties share in advance In real-world implementation, could avoid storing entire 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 The pseudo OTP still has the second limitation (for the same reason as the OTP) 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 )…ct  Enck(m t) k

A formal definition Fix , A Define a randomized exp’t PrivK mult A ,  (n): A(1 n ) outputs two vectors (m 0,1 , …, m 0,t) and(m1,1, …, m1,t)Required that |m0,i| = |m 1,i| for all ik  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 [ PrivK mult A ,  (n ) = 1] ≤ ½ + (n) Exercise: show that the pseudo-OTP is not multiple-message indistinguishable

Multiple-message secrecy No deterministic, stateless encryption scheme is multiple-message indistinguishable Proof?

Multiple-message secrecy We are not going to work with multiple-message secrecy 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 k c m c  Enc k (m) k m 1 c 1  Enc k (m 1 ) m2c2  Enck(m2)c1 c 2

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 Chosen-plaintext attacks encompass any such influence Moreover, in some cases an attacker may have significant control over what gets encrypted