SLIDE 1 Range Extension for Weak PRFs
Krzysztof Pietrzak (CWI Amsterdam) Johan Sj¨
urich)
SLIDE 2 (weak) pseudorandom functions
F = {F1, F2, . . .}, Fn : Kn × Xn → Yn is a pseudorandom function ( PRF) if
◮ F(k, x) can be efficiently computed. ◮ F(k, .) (with a random key k ∈ Kn) cannot be
efficiently distinguished from a uniformly random function R .
SLIDE 3 (weak) pseudorandom functions
F = {F1, F2, . . .}, Fn : Kn × Xn → Yn is a weak pseudorandom function (wPRF) if
◮ F(k, x) can be efficiently computed. ◮ F(k, .) (with a random key k ∈ Kn) cannot be
efficiently distinguished from a uniformly random function R when queried on random inputs.
SLIDE 4 (weak) pseudorandom functions
F = {F1, F2, . . .}, Fn : Kn × Xn → Yn is a weak pseudorandom function (wPRF) if
◮ F(k, x) can be efficiently computed. ◮ F(k, .) (with a random key k ∈ Kn) cannot be
efficiently distinguished from a uniformly random function R when queried on random inputs. wPRFs are weaker primitives than PRFs, so relying on the security of a block-cipher like AES as a wPRF is more secure than assuming it to be a PRF.
SLIDE 5
black-box range extension
Let C be a circuit with oracle gates, such that for any F : K × {0, 1}n → {0, 1}n we have CF : Kt × {0, 1}n′ → {0, 1}n·e
SLIDE 6 black-box range extension
Let C be a circuit with oracle gates, such that for any F : K × {0, 1}n → {0, 1}n we have CF : Kt × {0, 1}n′ → {0, 1}n·e
◮ t is the key expansion factor of C.
SLIDE 7 black-box range extension
Let C be a circuit with oracle gates, such that for any F : K × {0, 1}n → {0, 1}n we have CF : Kt × {0, 1}n′ → {0, 1}n·e
◮ t is the key expansion factor of C. ◮ e is the range expansion factor of C.
SLIDE 8 black-box range extension
Let C be a circuit with oracle gates, such that for any F : K × {0, 1}n → {0, 1}n we have CF : Kt × {0, 1}n′ → {0, 1}n·e
◮ t is the key expansion factor of C. ◮ e is the range expansion factor of C.
Definition
C is a secure range extension for PRFs, if for any PRFs F, also CF is PRF.
SLIDE 9 black-box range extension
Let C be a circuit with oracle gates, such that for any F : K × {0, 1}n → {0, 1}n we have CF : Kt × {0, 1}n′ → {0, 1}n·e
◮ t is the key expansion factor of C. ◮ e is the range expansion factor of C.
Definition
C is a secure range extension for wPRFs, if for any wPRFs F, also CF is wPRF.
SLIDE 10
applications
For a wPRF F and a secure expansion C, (Enc, Dec) as below is a secure encryption scheme. Enc(k, M) : sample X at random and output (CF(k, X) ⊕ M, X) Dec(k, (C, X)) : output CF(k, X) ⊕ C.
SLIDE 11
applications
For a wPRF F and a secure expansion C, (Enc, Dec) as below is a secure encryption scheme. Enc(k, M) : sample X at random and output (CF(k, X) ⊕ M, X) Dec(k, (C, X)) : output CF(k, X) ⊕ C. Overhead just one block. Key length depends on the key-expansion of CF.
SLIDE 12
example 1: parallel evaluation
CF({k1, . . . , kt}, X) = F(k1, X), . . . , F(kt, X) X F1 F2 · · · Ft
SLIDE 13
example 1: parallel evaluation
CF({k1, . . . , kt}, X) = F(k1, X), . . . , F(kt, X) X F1 F2 · · · Ft + Secure range extension for PRF and wPRF.
SLIDE 14
example 1: parallel evaluation
CF({k1, . . . , kt}, X) = F(k1, X), . . . , F(kt, X) X F1 F2 · · · Ft + Secure range extension for PRF and wPRF. − Range expansion = Key expansion (very low).
SLIDE 15
example 2: parallel evaluation with one key
CF(k, X) = F(k, X[0]), . . . , F(k, X[e − 1]) e = 2z, X ∈ {0, 1}n−z [i] is binary representation of [i] padded to length z. X F F · · · F X[0] X[1] X[e − 1]
SLIDE 16
example 2: parallel evaluation with one key
CF(k, X) = F(k, X[0]), . . . , F(k, X[e − 1]) e = 2z, X ∈ {0, 1}n−z [i] is binary representation of [i] padded to length z. X F F · · · F X[0] X[1] X[e − 1] + Just one key.
SLIDE 17
example 2: parallel evaluation with one key
CF(k, X) = F(k, X[0]), . . . , F(k, X[e − 1]) e = 2z, X ∈ {0, 1}n−z [i] is binary representation of [i] padded to length z. X F F · · · F X[0] X[1] X[e − 1] + Just one key. + Secure range extension for PRF.
SLIDE 18
example 2: parallel evaluation with one key
CF(k, X) = F(k, X[0]), . . . , F(k, X[e − 1]) e = 2z, X ∈ {0, 1}n−z [i] is binary representation of [i] padded to length z. X F F · · · F X[0] X[1] X[e − 1] + Just one key. + Secure range extension for PRF. − Not Secure range extension for wPRF. E.g. for a wPRF where F(k, X[0]) = F(k, X[1]).
SLIDE 19 a general class of range extensions
X C[1,12,2,321]
F
F1 F2 F3 F2 F2 F1
SLIDE 20 a general class of range extensions
X C[1,12,2,321]
F
F1 F2 F3 F2 F2 F1
Definition
Let s = {s1, . . . , se}, each si ∈ {1, . . . , t}∗. Define Cs
F(k1, . . . , kt, X) = Y1, . . . , Ye
where Yi is computed by applying F on input X sequentially as defined by si, i.e. with m = |si| Yi = F(ksi[m], F(ksi[m−1], . . . , F(ksi[1], X) . . .))
SLIDE 21 a general class of range extensions
X C[1,12,2,321]
F
F1 F2 F3 F2 F2 F1
Definition
Let s = {s1, . . . , se}, each si ∈ {1, . . . , t}∗. Define Cs
F(k1, . . . , kt, X) = Y1, . . . , Ye
where Yi is computed by applying F on input X sequentially as defined by si, i.e. with m = |si| Yi = F(ksi[m], F(ksi[m−1], . . . , F(ksi[1], X) . . .)) All known (efficient) secure range expansion for wPRFs are of this form (like in the previous talk).
SLIDE 22 a general class of range extensions
X C[1,12,2,321]
F
F1 F2 F3 F2 F2 F1
Definition
Let s = {s1, . . . , se}, each si ∈ {1, . . . , t}∗. Define Cs
F(k1, . . . , kt, X) = Y1, . . . , Ye
where Yi is computed by applying F on input X sequentially as defined by si, i.e. with m = |si| Yi = F(ksi[m], F(ksi[m−1], . . . , F(ksi[1], X) . . .)) All known (efficient) secure range expansion for wPRFs are of this form (like in the previous talk). For which s is Cs a secure range expansion for wPRFs?
SLIDE 23
The Good, the Bad and the Ugly [1]
Which of C[12,2], C[11,22], C[12,21] is a secure range extension for wPRFs? F1 F2 F2 F1 F2 F1 F2 F1 F2 F2 F1
SLIDE 24 The Good, the Bad and the Ugly [1]
Which of C[12,2], C[11,22], C[12,21] is a secure range extension for wPRFs? F1 F2 F2 F1 F2 F1 F2 F1 F2 F2 F1
◮ C[12,2] is secure via a black-box reduction.
SLIDE 25 The Good, the Bad and the Ugly [1]
Which of C[12,2], C[11,22], C[12,21] is a secure range extension for wPRFs? F1 F2 F2 F1 F2 F1 F2 F1 F2 F2 F1
◮ C[12,2] is secure via a black-box reduction. ◮ C[11,22] is not secure via a black-box reduction.
SLIDE 26 The Good, the Bad and the Ugly [1]
Which of C[12,2], C[11,22], C[12,21] is a secure range extension for wPRFs? F1 F2 F2 F1 F2 F1 F2 F1 F2 F2 F1
◮ C[12,2] is secure via a black-box reduction. ◮ C[11,22] is not secure via a black-box reduction. ◮ C[12,21] cannot be proven secure nor insecure via a
black-box reduction.
SLIDE 27 The Good, the Bad and the Ugly [2]
◮ Cα, α ⊂ N∗ is good if the security of Cα (as range
expansion for wPRFs) can be proven via a black-box reduction.
SLIDE 28 The Good, the Bad and the Ugly [2]
◮ Cα, α ⊂ N∗ is good if the security of Cα (as range
expansion for wPRFs) can be proven via a black-box reduction.
◮ Cα is bad if there is a black-box construction G, such
that for any F
◮ If F is a wPRF, so is GF. ◮ Cα
GF is not a wPRF.
SLIDE 29 The Good, the Bad and the Ugly [2]
◮ Cα, α ⊂ N∗ is good if the security of Cα (as range
expansion for wPRFs) can be proven via a black-box reduction.
◮ Cα is bad if there is a black-box construction G, such
that for any F
◮ If F is a wPRF, so is GF. ◮ Cα
GF is not a wPRF. ◮ Cα is ugly if it’s not good and not bad.
SLIDE 30 The Good, the Bad and the Ugly [2]
◮ Cα, α ⊂ N∗ is good if the security of Cα (as range
expansion for wPRFs) can be proven via a black-box reduction.
◮ Cα is bad if there is a black-box construction G, such
that for any F
◮ If F is a wPRF, so is GF. ◮ Cα
GF is not a wPRF. ◮ Cα is ugly if it’s not good and not bad.
We completely classify Cα (as good, bad or ugly) by simple properties of α.
SLIDE 31 Theorem (Complete Classification)
Cα, α = {s1, . . . , st} is
◮ bad if α contains a string with two consecutive
identical letters or two identical strings.
◮ good if it’s not bad and whenever a letter c appears
before a letter d in some s ∈ α, then d does not appear before c in any string s′ ∈ α.
◮ ugly if it’s not good nor bad.
F1 F2 F2 F1 F2 F1 F2 F1 F2 F2 F1
SLIDE 32 Theorem (Complete Classification)
Cα, α = {s1, . . . , st} is
◮ bad if α contains a string with two consecutive
identical letters or two identical strings.
◮ good if it’s not bad and whenever a letter c appears
before a letter d in some s ∈ α, then d does not appear before c in any string s′ ∈ α.
◮ ugly if it’s not good nor bad.
We sketch the proof only for our three special cases: F1 F2 F2 F1 F2 F1 F2 F1 F2 F2 F1 good bad ugly
SLIDE 33 The Good: Security via Black-Box Reduction
F1 F2 F2 R F2 F2 R R′ R′ R′′ S0 S1 S2 S3
◮ S0 → S1 safe replacement. ◮ S1 → S2 safe replacement. ◮ ∆KPA q
(S2, S3) ≤ q2/|Range|
SLIDE 34
F1 F2 F2 F1 F2 F1 F2 F1 F2 F2 F1
SLIDE 35 The Bad: Black-Box Counterexample
For a pseudorandom permutation* G define HG :
◮ if X = 0 . . . 0 then HG(k, X) = 0 . . . 0 ◮ Otherwise, let Y = LYRY = G−1(k, X).
HG(X) =
if LY = 0 . . . 0 G(k, 0 . . .0RX)
Lemma
HG(k, .) is a wPRF but HG(k, HG(k, .)) is not. X HG(k, .) HG(k, .) 0 . . . 0 G(k, 0 . . .0RX)
*A PRP can be constructed from a wPRF via a black-box reduction (GMM then Luby-Rackoff)
SLIDE 36
F1 F2 F2 F1 F2 F1 F2 F1 F2 F2 F1
SLIDE 37
The Ugly
To prove that C[12,21] is ugly, we must show it’s not good and not bad.
SLIDE 38 The Ugly
To prove that C[12,21] is ugly, we must show it’s not good and not bad.
◮ If C[12,21] was good, then its security can be proven
via a black-box reduction.
SLIDE 39 The Ugly
To prove that C[12,21] is ugly, we must show it’s not good and not bad.
◮ If C[12,21] was good, then its security can be proven
via a black-box reduction.
◮ A black-box reduction holds relative to any oracle.
SLIDE 40 The Ugly
To prove that C[12,21] is ugly, we must show it’s not good and not bad.
◮ If C[12,21] was good, then its security can be proven
via a black-box reduction.
◮ A black-box reduction holds relative to any oracle. ◮ So to show C[12,21] is not good we must come up with
an oracle O such that
◮ relative to O wPRFs F O exist ◮ C[12,21]
F O
is not a wPRF.
SLIDE 41 The Ugly
To prove that C[12,21] is ugly, we must show it’s not good and not bad.
◮ If C[12,21] was good, then its security can be proven
via a black-box reduction.
◮ A black-box reduction holds relative to any oracle. ◮ So to show C[12,21] is not good we must come up with
an oracle O such that
◮ relative to O wPRFs F O exist ◮ C[12,21]
F O
is not a wPRF.
◮ Similarly, to show C[12,21] is not bad we must come up
with an oracle O such that relative to O C[12,21]
F O
is a wPRF for any wPRF F O.
SLIDE 42 The Ugly
To prove that C[12,21] is ugly, we must show it’s not good and not bad.
◮ If C[12,21] was good, then its security can be proven
via a black-box reduction.
◮ A black-box reduction holds relative to any oracle. ◮ So to show C[12,21] is not good we must come up with
an oracle O such that
◮ relative to O wPRFs F O exist ◮ C[12,21]
F O
is not a wPRF.
O will be a generic group oracle.
◮ Similarly, to show C[12,21] is not bad we must come up
with an oracle O such that relative to O C[12,21]
F O
is a wPRF for any wPRF F O. O will be a PSPACE oracle.
SLIDE 43 The Ugly: Insecure under DDH
G = g : prime order cyclic group where DDH is hard, then for random x ∈ Z|G| a F(x, .) ax is a wPRF, but C[12,21]
F
F(x, .) F(y, .) axy a F(y, .) F(x, .) axy ax ay is not!
SLIDE 44 The Ugly: Secure for Quasirandom
◮ A weak Quasirandom function is the information
theoretical analog of wPRFs.
SLIDE 45 The Ugly: Secure for Quasirandom
◮ A weak Quasirandom function is the information
theoretical analog of wPRFs.
◮ Using the “random systems framework” we show that
any ugly Cα is a secure range extension for QRFs.
SLIDE 46 The Ugly: Secure for Quasirandom
◮ A weak Quasirandom function is the information
theoretical analog of wPRFs.
◮ Using the “random systems framework” we show that
any ugly Cα is a secure range extension for QRFs.
◮ Relative to a PSPACE oracle, no computational
hardness exists, so all wPRFs are QPRs.
SLIDE 47 The Ugly: Secure for Quasirandom
◮ A weak Quasirandom function is the information
theoretical analog of wPRFs.
◮ Using the “random systems framework” we show that
any ugly Cα is a secure range extension for QRFs.
◮ Relative to a PSPACE oracle, no computational
hardness exists, so all wPRFs are QPRs. Relative to a PSPACE oracle, any ugly Cα is a secure range extension for wPRFs.
SLIDE 48
Questions?