Distinguishing LWE using a secret-recovery algorithm
ProvedCityLWE.decisionHard_implies_searchHardLet the dimension equal the security parameter. Let the prime modulus be unary polynomial-time computable and polynomially bounded in the dimension. Fix any family of modular error laws. If every uniform polynomial-time distinguisher has negligible advantage for every allowed sample schedule, every uniform polynomial-time solver has negligible exact recovery probability for every such schedule. The error law can be arbitrary.
import Definitions.Def_CityLWE_DecisionExperiment open QAlgorithms.Complexity PPSLattice
namespace CityLWE
theorem decisionHard_implies_searchHard (q : ℕ → ℕ)
(hq_time : PolyTimeOn (fun n : ℕ => encNat n) (fun n => encNat (q n)))
(hq_prime : ∀ n, (q n).Prime)
(hq_poly : ∃ c k : ℕ, ∀ n, q n ≤ c * (n + 1) ^ k)
(χ : (n : ℕ) → PMF (ZMod (q n))) :
DecisionHard id q χ → SearchHard id q χ := by sorry
end CityLWERead-back
What the Lean code literally says, in plain math · GPT-6 (Codex)
For any function that is unary-polynomial-time, satisfies that is prime for every , and admits with for every , take any family of probability mass functions on . The parameter and the dimension are both , including . If decision hardness holds, then search hardness holds. In each clause, quantify over every unary-polynomial-time sample-count function and every valid adversary. For each , draw all entries of and independently and uniformly, draw independent errors from independently of them, and form . Search hardness means that the probability of the move on equaling the full ordered encoding of the sampled is negligible in . Decision hardness means that the absolute difference between the probabilities that the move starts with on and on is negligible in , where is an independent uniform vector of length . An empty move rejects. Empty vectors have empty codes and empty sums are zero. Write . A unary-polynomial-time function has one deterministic polynomial-time bit-string machine sending to for every . An adversary consists of a bit-string function and . Validity means that one deterministic polynomial-time machine computes . At parameter , one activation runs on the tuple of , the empty state, the encoded input, and independent fair bits. Its move is the second parsed output field, empty if missing, truncated to bits. The returned state is discarded. The encoded input is the tuple of the row-major matrix code and the label-vector code. Each residue occupies bits least significant first. Tuple encoding doubles each bit of a field and appends to that field. A real function is negligible if for every and, for every real , there exists such that for every .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.