Four Feistel rounds give a strong PRP
ProvedLubyRackoff.four_roundcryptographyfeistelpseudorandom-permutation
For every distinguisher making at most queries, each to the permutation or to its inverse,
where has independent uniform round functions, the ideal oracle is a uniform permutation of with its inverse, and .
Preamble
import Definitions.Def_LubyRackoff
Formal statement
namespace LubyRackoff
/-- Luby–Rackoff: the 4-round Feistel network with independent uniform round functions
is a strong pseudorandom permutation. With `N = |G|`, every distinguisher making `q`
forward or inverse queries has advantage at most `q(q-1)/N + q(q-1)/(2N²)`. -/
theorem four_round {G : Type} [AddCommGroup G] [Fintype G] [DecidableEq G]
(D : Dist ((G × G) ⊕ (G × G)) (G × G)) (q : ℕ) (hq : D.QueryBounded q) :
sprpAdv 4 D ≤ (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