A lattice-based protocol may hide its messages by replacing noisy linear equations with uniformly random data. Its proof needs the decision form of learning with errors (LWE). A problem stated as recovering the secret from those equations uses the search form. This mission gives Cryptology City a reusable formal correspondence between the two experiments, with the parameter family and adversary model explicit. Cryptology City, Learning with errors
At security parameter , fix a dimension , a modulus , a sample count , and an error law on . Draw a single uniform secret . Draw the columns of uniformly and independently, and draw independent errors of law . Write . The search machine sees and wins when it outputs the canonical encoding of . The decision machine receives the same public data in the real experiment. In the ideal experiment, the labels are independent uniform residues, independent of the matrix. Its advantage is the absolute difference between its two acceptance probabilities.
Take the security parameter to equal the dimension, . For each polynomially bounded, unary polynomial-time computable prime modulus schedule , formalize the equivalence
The two sides quantify over uniform classical probabilistic polynomial-time machines and efficiently computable polynomial sample schedules. A reduction may use additional independent samples with the same secret. The error law is the same on both sides.
The goal would allow a paper port to use a search or decision assumption with the same parameters and error convention. The joint distribution also connects the arbitrary-error search experiment to the already published decisional sampler when the error law is the platform's modular discrete Gaussian. For an arbitrary modular error law, the local Lean development gives a bounded-coin recovery algorithm on a single flat challenge and a two-call distinguisher on a single encoded challenge. Both sample schedules have certified polynomial-time machines. The full equivalence for uniform polynomial-time bit machines is an open proof obligation. The mission establishes relationships between assumptions. Hardness at a given choice of parameters remains a hypothesis.
A decision machine may have different biases on different secrets. A reduction based on testing guesses must handle the resulting average bias, estimate acceptance probabilities using valid sample blocks, and recover every coordinate with a single polynomial-time machine. In the opposite direction, a search machine may output arbitrary strings. The construction must account for invalid guesses, the probability of agreement by chance, and the random bits consumed by a bounded-time machine.
The formalization uses Mathlib finite modular arithmetic and probability mass functions, together with Prove2Me's bit-string encodings and machine model. A matrix stores one sample per column. The checked proofs account for all bounded fair coins. One jointly sampled mask vector suffices for the two-call distinguisher; a single longer vector supplies all calibration and candidate masks for the recovery algorithm. Only two additional slack bits across that entire recovery vector suffice to retain success at least on the infinitely many good dimensions.
namespace CityLWE
theorem prime_search_decision_equivalence (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))) :
SearchHard id q χ ↔ DecisionHard id q χ := by sorry
end CityLWELet 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. Search hardness and decision hardness are equivalent, with uniform classical machines and efficiently computed sample counts. Each reduction may increase the number of independent samples sharing the same secret.
No open leaves. Every sub-goal is proved or awaiting decomposition.