Skip to content

LatticeCrypto: discharging the challenge–secret norm-bound hypotheses — offering a proved no-wraparound multiplication bound #469

Description

@jasonsoroko

Several ML-DSA lemmas in LatticeCrypto currently carry the challenge–secret
product bound as a hypothesis rather than a theorem, e.g. the
h_s_bound-style binders in
MLDSA/Signature.lean
(also here and
here):

(h_s_bound : LatticeCrypto.cInfNorm ((prims.sampleInBall sig.cTilde • sk.s2).get j) ≤ p.beta)

We have a complete, sorry-free Lean 4 / Mathlib development of exactly this
fact and would like to contribute it. In your vocabulary (canonical vector
backend over ZMod q), the general lemma is:

theorem cInfNorm_mul_le_of_lt {q n} (c s : Poly (ZMod q) n)
    (h : 2 * (l1Norm c * cInfNorm s) < q) :
    cInfNorm (c * s) ≤ l1Norm c * cInfNorm s

Two points worth making explicit:

  1. The size condition is essential, not an artifact. Over centered
    representatives the unconditional cInfNorm (c * s) ≤ l1Norm c * cInfNorm s
    is false — the centered lift of a product can wrap mod q. The
    2·(l1Norm c · cInfNorm s) < q guard is exactly the no-wraparound
    condition; for the FIPS 204 parameter sets it holds with 4 orders of
    magnitude to spare (2τη = 156 / 392 / 240 against q = 8380417). We
    believe this is precisely why the fact sits as a hypothesis today — it is
    a real theorem, not a one-liner.

  2. The port looks direct. Since
    negacyclicMulPure_coeff
    makes your product coefficient definitionally a negacyclicConvCoeff, the
    proof reduces to (i) an integer-side bound on the negacyclic convolution
    (‖c·s‖∞ ≤ ‖c‖₁·‖s‖∞, which we have, sharp — the bound is attained), and
    (ii) the centered-lift/no-wrap argument through zmodCenteredCoeffView
    the same uniqueness-of-small-representative fact we proved for
    ℤ_q[X]/(X^n+1), which needs only 1 < q (monicity of X^n + 1; no
    primality or field structure).

What we hold today, verified with #print axioms = [propext, Classical.choice, Quot.sound] throughout, on Lean 4.22.0 + Mathlib v4.22.0
(we would of course port to your v4.30.0 pin and house idioms per
AGENTS.md): the sharp product bound with an attainment witness; the
∃!-small-representative theorem mod q for any q > 1; and the y + c·s
no-wraparound corollary underpinning the ‖z‖∞ < γ₁ − β check (it
guarantees the centered mod-q representative of z is the faithful integer
value the check inspects), instantiated at all three FIPS 204 parameter
sets. The proof files, an axiom-audit transcript, and build instructions are
in this gist:
https://gist.github.com/jasonsoroko/79dab7c29a148f1766b2721aace8b4c1
(Full repository public with our forthcoming preprint.)

A natural follow-up we could include: l1Norm (sampleInBall x) ≤ τ appears
not to exist yet either — with it, the h_s_bound binders discharge
entirely; without it, they at least reduce to the more primitive sampler
sparsity spec.

Questions before we write any code:

  1. Would you take this as a PR?
  2. Preferred home and shape — a general cInfNorm_mul_le_of_lt in
    Ring/Norms.lean (possibly backend-generic via cInfNormOf/l1NormOf),
    or specialized lemmas next to their use sites in MLDSA/?
  3. Is anyone already working on this among the current in-progress items?
    Happy to coordinate or stand down if so.
  4. Any constraints beyond AGENTS.md, the v4.30.0 pin, and CI we should
    know about?

Disclosure: this development is human-directed and AI-assisted, with every
result kernel-checked and axiom-audited — we've read the workflow section of
the VCVio paper and aim to meet the same review bar as any other
contribution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions