Polynomial-time word algorithms for Goldreich–Levin decoding #
The decoder is ordinary functional code: maps, filtering, folds and first-match search. Its deterministic certificates use the shared tidy TM calculus. A fixed precision degree keeps both the number of guesses and their complete encoded size polynomially bounded. Exact representation laws preserve candidate order, duplicates, the fallback and every mask tape.
The predictor may capture public data and saved coins. Its certificate must be uniform jointly in that environment and its query. Sampling and uniform PPT adversaries are connected in the subsequent reduction; this module certifies the deterministic decoder.
Main definitions #
wordCandidate,wordCandidates: corrected majority voting for each parity guess.wordCheckCandidates: select the first preimage, with a zero-word fallback.wordDecode: decode and check all guesses from one mask tape.
Main results #
polyTime_wordDecode: uniform deterministic polynomial time for any efficient captured predictor.wordDecode_eq_ofFn,uniform_wordDecode: exact finite-algorithm and distributional agreement.wordDecode_success_ge_half: correlated prediction gives a valid preimage with probability at least one half.
References #
- O. Goldreich, L. Levin, A Hard-Core Predicate for All One-Way Functions
- L. Trevisan, CS276 Lecture 12: Goldreich–Levin
Adapted from Crypto/Computational/GoldreichLevin/WordDecoder.lean on the cslib crypto branch
at 5ff69ca93402e7c947208dc56396d6d86203ccd8.
A fixed precision degree is computable from a unary security parameter.
Computing the logarithmic mask count includes the unary precision arithmetic.
The word selectors enumerate exactly the finite decoder's voting subsets, once each.
At fixed precision, the complete encoded guess list has polynomial size.
Enumerating at a fixed precision degree includes the cost of computing the mask count.
Nested maps compose with any predictor certified jointly in its input and query.
The guess-list certificate accounts for the number and size of candidate words.
Candidate generation preserves the finite decoder's order and duplicates.
Candidate checking composes evaluation, equality, captured search and a runtime fallback.
Searching the word representation preserves the finite decoder's first-match behavior.
Decode a predictor using one mask tape, then check the candidates against the image. The predictor may capture arbitrary public data and saved coins independently of that image.
Instances For
The complete decoder is polynomial-time for each fixed precision degree.
The full word decoder agrees with its finite mathematical algorithm for every predictor and mask tape. No assumption about how the predictor obtains its auxiliary data is required.
Uniform mask bits give exactly the finite inversion experiment for a captured predictor.
A sufficiently correlated word predictor yields a valid preimage with probability at least
one half. Auxiliary data stay captured in predictor; the recovered preimage need not be x.