Luby–Rackoff: PRF to PRP and strong PRP
ProvedLubyRackoff.maincryptographyfeistelpseudorandom-permutation
Let be a keyed function family with finite and nonempty, , and . Write .
- For every distinguisher making at most forward queries there is a distinguisher making at most queries to a function with
- For every distinguisher making at most forward or inverse queries there is such a with
Keys are independent and uniform, and the ideal oracle is a uniform permutation of .
Preamble
import Definitions.Def_LubyRackoff
Formal statement
namespace LubyRackoff
/-- Luby–Rackoff: Feistel networks turn a PRF into a PRP (3 rounds) and a strong PRP
(4 rounds). For any keyed family `F : K → G → G` and any distinguisher `D` making `q`
queries there is a PRF distinguisher `B` making at most `q` queries with
* `Adv_PRP(D) ≤ 3 · Adv_PRF(B) + q(q-1)/N + q(q-1)/(2N²)` for 3 rounds, and
* `Adv_sPRP(D) ≤ 4 · Adv_PRF(B) + q(q-1)/N + q(q-1)/(2N²)` for 4 rounds,
where `N = |G|`. -/
theorem main {G : Type} [AddCommGroup G] [Fintype G] [DecidableEq G]
{K : Type} [Fintype K] [Nonempty K] (F : K → G → G) (q : ℕ) :
(∀ D : Dist (G × G) (G × G), D.QueryBounded q →
∃ B : Dist G G, B.QueryBounded q ∧
prpAdvF F 3 D ≤ 3 * prfAdv F B + (q : ℝ) * (q - 1) / Fintype.card G
+ (q : ℝ) * (q - 1) / (2 * (Fintype.card G : ℝ) ^ 2)) ∧
(∀ D : Dist ((G × G) ⊕ (G × G)) (G × G), D.QueryBounded q →
∃ B : Dist G G, B.QueryBounded q ∧
sprpAdvF F 4 D ≤ 4 * prfAdv F B + (q : ℝ) * (q - 1) / Fintype.card G
+ (q : ℝ) * (q - 1) / (2 * (Fintype.card G : ℝ) ^ 2)) := by
sorry
end LubyRackoff
Source
Luby–Rackoff, SIAM J. Comput. 17(2) 1988, https://doi.org/10.1137/0217022