Lecture 15
Random Function
For each , there are possible values for .
pick independently at random. ( bits)
This generates random bits to specify .
Equivalent description of
# initialized empty list L
L=collections.defaultdict(int)
# initialize n bits constant
n=10
def F(x):
""" simulation of random function
param:
x: n bits
return:
y: n bits
"""
if L[x] is not None:
return L[x]
else:
# y is a random n-bit string
y=random.randbits(n)
L[x]=y
return y
However, this is not a good random function since two communicator may not agree on the same .
Pseudorandom Function
Oracle Access (for function )
is a p.p.t. that given outputs .
The distinguisher is given oracle access to and outputs if is random and otherwise. It can make polynomially many queries.
Oracle indistinguishability
and are sequence of distribution on functions
that are computationally indistinguishable
if for all p.p.t. (with oracle access to and ),
where is negligible.
Under this property, we still have:
- Closure properties. under efficient procedures.
- Prediction lemma.
- Hybrid lemma.
Pseudorandom Function Family
Definition: is a pseudorandom function family if are oracle indistinguishable.
- It is easy to compute for every .
- is indistinguishable from the uniform distribution over .
- is truly random function.
Example:
For , define .
gives oracle access to , . If , then outputs otherwise .
def O_g(x):
pass
def D():
# bit_stream(0,n) is a n-bit string of 0s
y0=O_g(bit_stream(0,n))
y1=O_g(bit_stream(1,n))
if y0+y1==bit_stream(1,n):
return 1
else:
return 0
If , then returns .
Theorem PRG exists then PRF family exists.
Proof:
Let be a PRG.
Then we choose a random (initial seed) and define , .
s=random.randbits(n)
#????
def g(x):
if x[0]==0:
return g(f_s(x[1:]))
else:
return g(f_s(x[1:]))
def f_s(x):
return g(x)
Suppose is a PRG.
000 | 110011 |
001 | 010010 |
010 | 001001 |
011 | 000110 |
100 | 100000 |
101 | 110110 |
110 | 000111 |
111 | 001110 |
Suppose the initial seed is , then the constructed function tree goes as follows:
Example:
Assume that distinguishes and with non-negligible probability.
By hybrid argument, there exists a hybrid such that distinguishes and with non-negligible probability.
For ,
EOP