One-way functions and permutations #
A polynomial-time function on binary words is one-way when, given its value on a uniform
n-bit input and the unary parameter n, every uniform PPT inverter has negligible probability
of finding any preimage. Recovering the sampled input is not required, and the inverter's
answer is not restricted to the sampled input's length.
OneWayPermutation additionally requires a length-preserving bijection. Its inverse exists as a
mathematical function; no efficiency of that inverse is assumed. Such a permutation preserves
the uniform distribution at every input length. These are definitions, not assertions that
one-way functions or permutations exist.
Main definitions #
Cslib.Crypto.inversionGame: sample a challenge and test the inverter's candidate preimage.Cslib.Crypto.OneWay,Cslib.Crypto.OneWayPermutation: uniform computational assumptions.
Main results #
Cslib.Crypto.OneWay.inversion_negligible: negligible success for each efficient inverter.Cslib.Crypto.OneWayPermutation.uniformList_append_bit: the ideal one-bit extension is uniform.Cslib.Crypto.not_oneWay_of_le_succProbability: inverting with probability bounded away from zero at every length refutes one-wayness.Cslib.Crypto.not_oneWay_of_inverse,not_oneWay_const: efficient preimages refute one-wayness.
References #
Adapted from Crypto/Computational/OneWay.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8, using finite fair-bit programs, tidy deterministic
certificates and the upstream nonnegative game API.
An inverter receives the unary parameter and the image of the sampled input.
Instances For
Run the complete inversion experiment on its unary parameter.
The inversion experiment is uniformly PPT, independently of the unused auxiliary input.
One plain polynomial-time algorithm evaluates the function. Every uniform strict PPT inverter has negligible success over the uniform input and its own independent random coins.
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime f Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits
A deterministic polynomial-time algorithm evaluates the function.
- secure : Game.Indistinguishable (fun (adversary : Inverter) (n : ℕ) => (inversionGame f adversary n).eval) (fun (x : Inverter) (x_1 : ℕ) => PMF.pure false) (Probability.IsPPT Turing.MultiTapeTM.encBits)
Inversion is indistinguishable from certain failure in the common game calculus.
Instances For
Recover the tidy presentation for proofs without changing the security contract.
The shared game definition gives the usual negligible inversion probability.
Establish one-wayness by bounding every efficient inverter's success probability.
A length-preserving permutation that is one-way against every uniform PPT inverter.
- oneWay : OneWay f
Evaluation is polynomial time, and inversion has negligible success.
The permutation acts separately on words of each length.
- bijective : Function.Bijective f
Every word has exactly one preimage; finding it need not be efficient.
Instances For
A one-way permutation preserves the uniform distribution at each input length.
A permuted uniform seed followed by an independent fair bit is exactly uniform at the expanded length. Security is needed when replacing the independent bit by a hard-core predicate.
For an injective function, accepting any preimage is equivalent to recovering the sampled input. The general inversion experiment does not make this assumption.
Inverting with probability bounded away from zero refutes one-wayness: an efficient
inverter whose success probability is at least a fixed c > 0 at every length.
Efficiently finding any preimage, told the input length, contradicts one-wayness.