



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




U.C. Berkeley — CS276: Cryptography Handout N
Luca Trevisan March 10, 2009
Scribed by Siu-Man Chan, posted March 12, 2009
Given one way permutations (of which discrete logarithm is a candidate), we know
how to construct pseudorandom functions. Today, we are going to construct pseudo-
random permutations (block ciphers) from pseudorandom functions.
Recall that a pseudorandom function F is an efficient function : { 0 , 1 }
k × { 0 , 1 }
n →
n , such that every efficient algorithm A cannot distinguish well FK (·) from R(·),
for a randomly chosen key K ∈ { 0 , 1 }
k and a random function R : { 0 , 1 }
n → { 0 , 1 }
n .
That is, we want that A
FK (·) behaves like A
R(·) .
x F
FK (x)
A pseudorandom permutation P is an efficient function : { 0 , 1 }
k × { 0 , 1 }
n → { 0 , 1 }
n ,
such that for every key K, the function PK mapping x 7 → PK (x) is a bijection.
Moreover, we assume that given K, the mapping x 7 → PK (x) is efficiently invertible
(i.e. P
− 1 K
is efficient). The security of P states that every efficient algorithm A cannot
distinguish well 〈PK (·), P
− 1 K (·)〉^ from^ 〈Π(·),^ Π
− 1 (·)〉, for a randomly chosen key K ∈
{ 0 , 1 }
k and a random permutation Π : { 0 , 1 }
n → { 0 , 1 }
n
. That is, we want that
PK (·),P
− 1 K (·)^ behaves like AΠ(·),Π
− (^1) (·) .
We note that the algorithm A is given access to both an oracle and its (supposed)
inverse.
x P
PK (x) y P −^1
− 1 K (y)
Given any function F : { 0 , 1 }
m → { 0 , 1 }
m , we can construct a permutation DF : { 0 , 1 }
2 m →
{ 0 , 1 }
2 m using a technique named after Horst Feistel. The definition of DF is given
by
DF (x, y) := y, F (y) ⊕ x, (1)
where x and y are m-bit strings. Note that this is an injective (and hence bijective)
function, because its inverse is given by
− 1 F (z, w) :=^ F^ (z)^ ⊕^ w, z.^ (2)
Also, note that DF and D
− 1 F are efficiently computable given^ F^.
However, DF needs not be a pseudorandom permutation even if F is a pseudorandom
function, because the output of DF (x, y) must contain y, which is extremely unlikely
for a truly random permutation.
To avoid the above pitfall, we may want to repeat the construction twice. We pick
two independent random keys K 1 and K 2 , and compose the permutations P (·) :=
DFK 2
1
Indeed, the output does not always contain part of the input. However, this construc-
tion is still insecure, no matter whether F is pseudorandom or not, as the following
example shows.
Here, 0 denotes the all-zero string of length m, 1 denotes the all-one string of length
m, and F (·) is FK 1 (·). This shows that, restricting to the first half, P (00) is the
complement of P (10), regardless of F.
What happens if we repeat the construction three times? We still do not get a
pseudorandom permutation.
0
0
1
1
2
2
3
3
4
It is easy to construct the inverse permutation by composing their inverses backwards.
Theorem 1 (Pseudorandom Permutations from Pseudorandom Functions)
If F is a (O(tr), )-secure pseudorandom function computable in time r, then P is a
(t, 4 + t
2 · 2
−m
2 · 2
− 2 m ) secure pseudorandom permutation.
Given four random functions R = 〈R 1 ,... , R 4 〉, Ri : { 0 , 1 }
m → { 0 , 1 }
m , let P R
be the
analog of Construction (3) using the random function Ri instead of the pseudorandom
functions FKi ,
PR(x) = DR 4 (DR 3 (DR 2 (DR 1 (x)))) (4)
We prove Theorem 1 by showing that
The first part is given by the following lemma, which we prove via a standard hybrid
argument.
Lemma 2 If F is a (O(tr), )-secure pseudorandom function computable in time r,
then for every algorithm A of complexity ≤ t we have
K
PK ,P
− 1 K (^) () = 1] − (^) P
R
PR,P
− 1 R (^) () = 1]
And the second part is given by the following lemma:
Lemma 3 For every algorithm A of complexity ≤ t we have
R
PR,P
− 1 R (^) () = 1] − (^) P Π
Π,Π−^1 () = 1]
t
2
22 m^
t
2
2 m
where Π : { 0 , 1 }
2 m → { 0 , 1 }
2 m is a random permutation.
We now prove Lemma 2 using a hybrid argument.
Proof: Consider the following five algorithms from { 0 , 1 }
2 m to { 0 , 1 }
2 m :
4
3
2
1
m →
{ 0 , 1 }
m ,
4
3
2
m → { 0 , 1 }
m ,
4
3
m → { 0 , 1 }
m ,
H 3 (·) := DFK 4
m → { 0 , 1 }
m ,
Clearly, referring to (5), H 0 gives the first probability of using all pseudorandom func-
tions in the construction, and H 4 gives the second probability of using all completely
random functions. By triangle inequality, we know that
∃i
Hi,H− i 1 = 1] − (^) P[A
Hi+1,H i−+1^1 = 1]
We now construct an algorithm A
′G(·) of complexity O(tr) that distinguishes whether
the oracle G(·) is FK (·) or a random function R(·).
′ picks i keys K 1 , K 2 ,... , Ki and initialize 4 − i − 1 data struc-
tures Si+2,... , S 4 to ∅ to store pairs.
′ simulates A
O,O−^1
. Whenever A queries O (or O
− 1 ), the sim-
ulating algorithm A
′ uses the four compositions of Feistel permutations, where
K 1 , K 2 ,... , Ki;
It is clear that Lemma 3 follows Lemma 4 and Lemma 5.
We now prove Lemma 4.
Π
Π,Π−^1 () = 1]
(^6) P[when simulating S, get answers inconsistent with any permutation]
22 m^
(1 + 2 + · · · + t − 1)
t
2 m
t
2
2 m
We shall prove Lemma 5 next time.