Finite probability bound toward search-to-decision for prime-modulus LWE #
Using Regev's coordinate transformation, a decision distinguisher D yields a finite-budget
secret-recovery procedure over prime ZMod q. To test whether a guess g equals coordinate j
of the secret s, it takes a fresh m-row sample [b | A], re-randomizes the secret to s + s'
with a uniform s' (b ↦ b + A *ᵥ s'), and adds r to column j of A and (g + s' j) • r to
b for a uniform r. When g = s j the result is a fresh LWE sample; otherwise its first column
is uniform and independent of the rest, so the result is a uniform matrix. Each trial therefore
accepts with D's acceptance probability on real samples or on uniform matrices, independently of
all other trials.
The procedure runs N such trials for every coordinate j and guess g, each on its own block of
m samples, and N trials of D on uniform matrices. For each j it outputs a guess whose
acceptance count is farthest from the uniform count. Hoeffding's inequality and a union bound over
the n * q + 1 estimators bound its failure probability.
This theorem and reduceSearchToDecision are finite steps toward Regev's polynomial-time
search-to-decision reduction (#3673): the procedure samples exact uniform elements of ZMod q
(which a fair-coin machine cannot sample exactly for odd primes q) and selects maximizing guesses
via noncomputable guessSecret, so no IsPPTOn certificate or asymptotic SearchLWE → DecisionLWE
implication is proved here.
Main definitions #
Cslib.Crypto.PrimeLWE.lweSelfReduceDistinguisher: shift coordinatejby a guess, then run the distinguisher.Cslib.Crypto.PrimeLWE.rerandomizeSecret: move the secret of a sample fromstos + s'.Cslib.Crypto.PrimeLWE.reduceSearchToDecision: finite-budget search procedure onsearchSamples n q N m = (n * q + 1) * N * msamples (a finite step toward Regev's reduction).
Main results #
Cslib.Crypto.PrimeLWE.lweSelfReduce_real,Cslib.Crypto.PrimeLWE.lweSelfReduce_ideal: a correct guess preserves an LWE sample; a wrong guess makes it uniform.Cslib.Crypto.PrimeLWE.searchToDecision: finite probability step showing thatreduceSearchToDecisionrecovers the uniform secret insearchGamewith probability at least1 - (n * q + 1) * 2 * exp (-N * ε ^ 2 / 8), whereεis the distinguisher'sm-sample decision-LWE advantage.
References #
- O. Regev, On lattices, learning with errors, random linear codes, and cryptography
(May 2, 2009 author PDF,
https://cims.nyu.edu/~regev/papers/qcrypto.pdf), Lemma 4.1 (pp. 30–31) and Lemma 4.2 (p. 31). Regev's Lemma 4.1 shows that an asymptotic uniform-secret distinguisher succeeds on a non-negligible fraction of fixed secrets, and Lemma 4.2 assumes a strong distinguisher succeeding for all secrets together with a prime modulus2 ≤ p ≤ poly(n)to obtain a polynomial-time search reduction. By contrast,searchToDecisionis a quantitative finite-parameter adaptation:- It takes a fixed-batch
m-sample distinguisher's absolute averaged acceptance gap (Game.advantageover a uniform secret) directly rather than an all-secret distinguisher or a good-secret fraction; - It re-randomizes the secret freshly in every trial (
rerandomizeSecret) across a fresh sample budget ofsearchSamples n q N m = (n * q + 1) * N * mframed binary matrix words (encMatrix); - It applies to any finite prime
q(withoutq ≤ poly(n)), any dimensionsn, m, any noise law onZMod q, and any trial countN, with the explicit Hoeffding constant1 - (n * q + 1) * (2 * exp (-N * ε ^ 2 / 8)); - It leaves native
IsPPTOnefficiency open becausereduceSearchToDecisiondraws exact uniform residues inZMod q(which fair-coin machines cannot sample exactly for odd primesq) and selects maximizing guesses via noncomputableguessSecret(Classical.choose).
- It takes a fixed-batch
- C. Peikert, A Decade of Lattice Cryptography (February 17, 2016 author PDF,
https://web.eecs.umich.edu/~cpeikert/pubs/lattice-survey.pdf), Section 4.2 (p. 23).
Shifting one coordinate #
Shifting an LWE sample adds r to column j of A and (g - s j) * r to the error.
The self-reduction for decision LWE: shift coordinate j by the guess g with a uniform
vector, then run the distinguisher.
Over a uniform A, the self-reduction runs the distinguisher on an LWE sample with error
e + (g - s j) • r for a uniform r.
A correct guess leaves the law of an LWE sample with a uniform A unchanged.
A wrong guess replaces the error of an LWE sample with a uniform A by a uniform vector.
Secret re-randomization and single trials #
One trial for coordinate j and guess g on a fresh sample: re-randomize the secret by a
uniform s', then run the self-reduction with the guess g + s' j.
The trial of an estimator on a sample. The estimator none runs the distinguisher on a fresh
uniform matrix and ignores the sample; some (j, g) tests the guess g for coordinate j.
On a fresh sample with secret s, a trial of guess g for coordinate j behaves like the
distinguisher on real samples when g = s j and like the distinguisher on uniform matrices
otherwise.
On a fresh sample with secret s, each estimator's trial has law estimatorLaw.
Independent blocks #
Number of samples used by reduceSearchToDecision: N blocks of m samples for each of
the n * q + 1 estimators.
With secret s, the blocks of a searchSamples n q N m-row sample are independent
m-row samples.
On a sample with secret s, all trials are independent with their estimators' laws.
Choosing the secret from the counts #
If every count is within N * |pR - pU| / 4 of its mean, where correct guesses have mean
N * pR and the uniform estimator and wrong guesses have mean N * pU, then guessSecret
returns the secret.
When the trials are drawn from their estimators' laws, guessSecret misses the secret with
probability at most (n * q + 1) * 2 * exp (-N * |pR - pU| ^ 2 / 8).
Finite-budget search procedure #
Finite-budget search procedure on searchSamples n q N m samples (a finite step toward Regev's
search-to-decision reduction): decode the sample, run N trials of every estimator on its own
m-row blocks, each with the decision adversary on encoded matrices, and output a maximizing
guessed secret.
Finite probability step toward search-to-decision for prime-modulus LWE. From a
decision-LWE adversary with advantage ε on m samples, reduceSearchToDecision recovers the
uniform secret in searchGame from (n * q + 1) * N * m samples with probability at least
1 - (n * q + 1) * 2 * exp (-N * ε ^ 2 / 8).