Documentation

CslibFrontier.Crypto.Computational.OneWay.Iterate

Iterates of a one-way permutation #

Applying a one-way permutation f to an n-bit word k n times, for a polynomial-time computable k that is eventually positive, gives a one-way permutation again ([AB07], Chapter 10, Exercise 3, with k n = n ^ c). For a rational exponent c = p / q the count ⌈n ^ c⌉ is polynomial-time computable in unary (Turing.MultiTapeTM.ComputableInPolyTime.unary_ceil_rpow), so the exercise holds for every rational c, and for every other exponent whose rounded count has such a certificate. No uniform algorithm is claimed for an arbitrary real exponent.

The theorem is asymptotic: uniform strict-PPT inverters and negligible success, rather than the draft's concrete time and success bounds (Definition 10.1). Since the reduction is exact, a concrete bound transfers with up to k n - 1 extra evaluations of f.

The reduction is exact. The iterate permutes the words of each length, so its image of a uniform n-bit word is uniform. An inverter for the iterate, given f x, applies f another k n - 1 times and returns the inverter's answer: whenever that answer is a preimage of f^[k n] x, it is x itself. The two inversion experiments therefore have the same success probability at every length with k n ≠ 0.

Main definitions #

Main results #

References #

Apply f to x exactly k |x| times.

def Cslib.Crypto.iterateInverter (f : List Bool → List Bool) (k : ℕ → ℕ) (adversary : Inverter) :

The inverter for f built from an inverter for its iterate: on the challenge y at length n, apply f another k n - 1 times and pass the result on.

theorem Cslib.Crypto.bijective_iterateByLength {f : List Bool → List Bool} (hlen : ∀ (word : List Bool), (f word).length = word.length) (hf : Function.Bijective f) (k : ℕ → ℕ) :

The iterate of a length-preserving bijection is a length-preserving bijection.

A length-preserving polynomial-time function iterated a polynomial-time number of times, the count computed from the input length, is polynomial time.

theorem Cslib.Crypto.eval_inversionGame_iterateByLength {f : List Bool → List Bool} {k : ℕ → ℕ} (hlen : ∀ (word : List Bool), (f word).length = word.length) (hf : Function.Bijective f) (adversary : Inverter) {n : ℕ} (hn : k n ≠ 0) :
(inversionGame (iterateByLength f k) adversary n).eval = (inversionGame f (iterateInverter f k adversary) n).eval

The reduction is exact. At every length n with k n ≠ 0, the derived inverter inverts f exactly as often as the given inverter inverts the iterate.

Iterates of a one-way permutation are one-way ([AB07], Chapter 10, Exercise 3). For a one-way permutation f and a polynomial-time computable k (unary in, unary out) with k n ≠ 0 for all large n, the map x ↦ f^[k |x|] x is a one-way permutation. The exercise's count n ^ c is the instance k n = ⌈n ^ c⌉, which OneWayPermutation.iterate_ceil_rpow supplies for every rational c.

theorem Cslib.Crypto.OneWayPermutation.iterate_ceil_rpow {f : List Bool → List Bool} (hf : OneWayPermutation f) (p q : ℕ) (hq : q ≠ 0) :
OneWayPermutation fun (x : List Bool) => f^[⌈↑x.length ^ (↑p / ↑q)⌉₊] x

The exercise for rational exponents ([AB07], Chapter 10, Exercise 3): for a one-way permutation f and naturals p and q ≠ 0, the map x ↦ f^[⌈|x| ^ (p / q)⌉] x is a one-way permutation.