Docsity

Pseudorandom Functions - Luca Trevisan, UC Berkeley, Lecture notes of Mathematics

Toggle sidebar
bg1
U.C. Berkeley — CS276: Cryptography Handout N5
Luca Trevisan February 3, 2009
Notes for Lecture 5
Scribed by Manohar Jonnalagedda, posted February 13, 2009
Summary
Having introduced the notion of CPA security in the past lecture, we shall now see
constructions that achieve it. Such constructions shall require either pseudorandom
functions or pseudorandom permutations. We shall see later how to construct such
objects.
1 Pseudorandom Functions
To understand the definition of a pseudorandom function, it’s good to think of it as
a pseudorandom generator whose output is exponentially long, and such that each
bit of the output is efficiently computable given the seed. The security is against
efficient adversaries that are allowed to look at at any subset of the exponentially
many output bits.
Definition 1 (Pseudorandom Function) A function F:{0,1}k× {0,1}m→
{0,1}mis a (t, )-secure pseudorandom function if for every oracle algorithm Tthat
has complexity at most twe have
|P
K∈{0,1}k
[TFK() = 1] −P
R:{0,1}m→{0,1}m[TR() = 1]| ≤
Intuitively, this means that an adversary wouldn’t be able to distinguish outputs from
a purely random function and a pseudorandom function (upto a certain additive
error). Typical parameters are k=m= 128, in which case security as high as
(260,2−40) is conjectured to be possible.
As usual, it is possible to give an asymptotic definition, in which (k) is required to be
negligible, t(k) is allowed to be any polynomial, and Fis required to be computable
in polynomial time.
1
pf3
pf4

Partial preview of the text

Download Pseudorandom Functions - Luca Trevisan, UC Berkeley and more Lecture notes Mathematics in PDF only on Docsity!

U.C. Berkeley — CS276: Cryptography Handout N Luca Trevisan February 3, 2009

Notes for Lecture 5

Scribed by Manohar Jonnalagedda, posted February 13, 2009

Summary

Having introduced the notion of CPA security in the past lecture, we shall now see constructions that achieve it. Such constructions shall require either pseudorandom functions or pseudorandom permutations. We shall see later how to construct such objects.

1 Pseudorandom Functions

To understand the definition of a pseudorandom function, it’s good to think of it as a pseudorandom generator whose output is exponentially long, and such that each bit of the output is efficiently computable given the seed. The security is against efficient adversaries that are allowed to look at at any subset of the exponentially many output bits.

Definition 1 (Pseudorandom Function) A function F : { 0 , 1 }k^ × { 0 , 1 }m^ → { 0 , 1 }m^ is a (t, )-secure pseudorandom function if for every oracle algorithm T that has complexity at most t we have

| P

K∈{ 0 , 1 }k

[T FK^ () = 1] − P

R:{ 0 , 1 }m→{ 0 , 1 }m

[T R() = 1]| ≤ 

Intuitively, this means that an adversary wouldn’t be able to distinguish outputs from a purely random function and a pseudorandom function (upto a certain  additive error). Typical parameters are k = m = 128, in which case security as high as (2^60 , 2 −^40 ) is conjectured to be possible.

As usual, it is possible to give an asymptotic definition, in which (k) is required to be negligible, t(k) is allowed to be any polynomial, and F is required to be computable in polynomial time.

2 Encryption Using Pseudorandom Functions

Suppose F : { 0 , 1 }k^ × { 0 , 1 }m^ → { 0 , 1 }m^ is a pseudorandom function. We define the following encryption scheme.

  • Enc(K, M ): pick a random r ∈ { 0 , 1 }m, output (r, FK (r) ⊕ M )
  • Dec(K, (C 0 , C 1 )) := FK (C 0 ) ⊕ C 1

This construction achieves CPA security.

Theorem 2 Suppose F is a (t, ) secure pseudorandom function. Then the above scheme is ( (^) O(tm) , 2  + t · 2 −m)-secure against CPA.

The proof of Theorem 2 will introduce another key idea that will often reappear in this course: to first pretend that our pseudorandom object is truly random, and per- form our analysis accordingly. Then extend the analysis from the pseudorandom case to the truly random case.

Let us therefore consider a modified scheme (Enc, Dec), where instead of performing FK (r) ⊕ M , we do R(r) ⊕ M , where R : { 0 , 1 }m^ → { 0 , 1 }m^ is a truly random function. We need to look at how secure this scheme is. In fact, we will actually prove that

Lemma 3 (Enc, Dec) is (t, 2 tm )−CPA secure.

Proof:

In the computation T Enc(Enc(r, C)) of algorithm T given oracle Enc and input the ciphertext (r, C), let us define REPEAT to be the event where T gets the messages (r 1 , C 1 ),... , (rt, Ct) from the oracle, such that r equals one of the ri.

Then we have

P[T^ Enc(Enc(M^ )) = 1]^ =^ P[T^ Enc(Enc(M^ )) = 1^ ∧^ REP EAT^ ]

  • (^) P[T Enc(Enc(M )) = 1 ∧ ¬REP EAT ]

similarly,

P[T^ Enc(Enc(M^ ′)) = 1]^ =^ P[T^ Enc(Enc(K, M^ ′)) = 1^ ∧^ REP EAT^ ]

  • (^) P[T Enc(Enc(M ′)) = 1 ∧ ¬REP EAT ]

Note that if T ′^ is given the oracle FK , then the computation T ′FK^ is exactly the same as the computation T Enc(Enc(M )), and if T ′^ is given the oracle R, where R is a

random function, then the computation T Enc(Enc(M )).

Thus, we have

P

K∈{ 0 , 1 }k

[T ′FK^ () = 1] = P

K

[T Enc(K,·)(Enc(K, M )) = 1] (2)

P

R:{ 0 , 1 }m→{ 0 , 1 }m

[T ′R() = 1] = P

R

[T Enc(·)(Enc(M )) = 1] (3)

which means that

∣ ∣ ∣ ∣ (^) K∈{P 0 , 1 }k^ [T^

′FK () = 1] − P

R:{ 0 , 1 }m→{ 0 , 1 }m

[T ′R() = 1]

∣ > ^ (4)

The complexity of T ′^ is at most the complexity of T times O(m) (the time needed to translate between oracle queries of T and oracle queries of T ′), and so if T has complexity t/O(m) then T ′^ has complexity ≤ t. This means that (4) contradicts the assumption that F is (t, )−secure.