One-way functions separate P from NP #
If one-way functions exist then P ≠ NP Goldreich, Chapter 2,
Katz and Lindell, Exercise 8.11. For a function f computable in polynomial
time, the preimage-prefix problem (Cslib.Crypto.preimagePrefix) asks, given n in unary, an
image y and a word u, whether some input x of length n that starts with u satisfies
f x = y. It is in NP, with the missing bits of x as certificate
(Cslib.Crypto.preimagePrefix_mem_NP).
A decision procedure for it finds preimages bit by bit (Cslib.Crypto.preimageSearch): starting
from the empty prefix, extend the prefix by false if a preimage of length n still starts with
the extension, and by true otherwise. After n steps the prefix is itself a preimage of y
whenever y has a preimage of length n (Cslib.Crypto.apply_preimageSearch), and the search
runs in polynomial time when the decision procedure does. So if the problem is in P, a
deterministic polynomial-time algorithm inverts f on every image
(Cslib.Crypto.exists_inverse_of_preimagePrefix_mem_P), which a one-way function forbids
(Cslib.Crypto.OneWay.preimagePrefix_notMem_P). By the Cook–Levin theorem, SAT is then not in
P either (Cslib.Crypto.OneWay.SAT_notMem_P).
One-wayness is the uniform notion of Cslib.Crypto.OneWay: the inverter is uniform strict PPT
and receives the unary length of the sampled input. The inverter built here is deterministic; the
randomized version, for a decision procedure in BPP, is in
Complexity.Crypto.Computational.OneWay.BPP.
Main definitions #
Cslib.Crypto.preimagePrefix: the preimage-prefix problem of a function.Cslib.Crypto.preimageSearch: the bit-by-bit search for a preimage with a decision procedure.
Main results #
Cslib.Crypto.isVerifier_preimagePrefixVerifier,Cslib.Crypto.preimagePrefix_mem_NP: the preimage-prefix problem of a polynomial-time function is inNP.Cslib.Crypto.apply_preimageSearch,Cslib.Crypto.preimageSearch_congr: with correct answers the search finds a preimage, and only the answers to its ownnqueries matter.Cslib.Crypto.computableTidilyInPolyTime_preimageSearch,Cslib.Crypto.computableTidilyInPolyTime_preimageSearch_of_input: the search is polynomial-time when the decision procedure is.Cslib.Crypto.exists_inverse_of_preimagePrefix_mem_P: if it is inP, a deterministic polynomial-time algorithm finds a preimage of every image.Cslib.Crypto.not_oneWay_of_lengthInverse: an efficient deterministic inverter that is told the input length refutes one-wayness (Cslib.Crypto.not_oneWay_of_inversefor inverters certified on the pair encoding).Cslib.Crypto.OneWay.preimagePrefix_notMem_P,Cslib.Crypto.OneWay.P_ne_NP,Cslib.Crypto.OneWay.SAT_notMem_P,Cslib.Crypto.not_oneWay_of_SAT_mem_P: one-way functions implyP ≠ NP.
References #
Membership in NP #
The verifier accepts some certificate of the length of the encoded instance exactly for the members.
The verifier is polynomial-time when f is.
The preimage-prefix problem is in NP for every function computable in polynomial
time.
Search to decision #
A correct step keeps the prefix extendable to a preimage.
Search to decision. With a decision procedure for the preimage-prefix problem, the search
for a preimage of length x.length of f x finds a preimage of f x.
A decision procedure that answers the queries of the search with D as D does finds the
same word. Only these q.1 queries matter, not correctness on all instances.
The search is polynomial-time when the decision procedure is, also for a decision
procedure D x and a target q x that depend on the input x.
The search is polynomial-time when the decision procedure is.
Inversion from the preimage-prefix problem. If the preimage-prefix problem of f is in
P, a deterministic polynomial-time algorithm, told the length of the input, finds a preimage of
every image.
One-way functions #
Efficient inversion refutes one-wayness. A deterministic polynomial-time algorithm that,
told the length of the input, finds a preimage of every image, inverts with probability one. This
is Cslib.Crypto.not_oneWay_of_inverse for an inverter certified on the pair encoding.
If SAT is in P, no function is one-way.