fix(LatticeCrypto): bind SelfTargetMSIS solutions to their hashed preimage - #503
Conversation
…image Thread the RO preimage through SelfTargetMSIS.Problem.isValid (now Challenge → Target → HashInput → HashOutput → Response → Bool) and have the experiment pass the cache-consistent hashInput it already looks up. The ML-DSA instance mldsaSTMSIS additionally requires hashInput.2 = w' — the recovered commitment must equal the commitment component of the hashed pair — closing the trivial X = X solution the tailored relation previously admitted. On the accepting path the forger's own returned (msg, w') is the queried preimage, so the extraction proof discharges the binding for free. The characterization mldsaSTMSIS_isValid_eq_true_iff states acceptance as verifier acceptance ∧ the binding conjunct, keeping the self-target requirement visible. The abstract SelfTargetMSIS.Problem type parameters are unchanged, so abstract references elsewhere are unaffected; the diff is confined to the two touched declarations. Claude-Session: https://claude.ai/code/session_01DaNGD9nDo3Grwk58nsjS77
🤖 PR SummaryPR Overview: Bind SelfTargetMSIS solutions to their hashed preimage This PR closes a soundness gap in the ML-DSA tailored SelfTargetMSIS problem by requiring Mathematical Formalization
Proof Completion (sorries removed) No Refactoring The Scope
Note on PR Body Accuracy
No other headers apply: This PR does not touch Protocols, Soundness (beyond the soundness repair itself), Infrastructure/CI, Documentation, or Refactoring (beyond the minimal signature change). Key Files
Statistics
Lean Declarations ✏️ Added: 1 declaration(s)
📋 **Additional Analysis**No findings. 📄 **Per-File Summaries**
Last updated: 2026-07-28 10:16 UTC. |
dtumad
left a comment
There was a problem hiding this comment.
Reviewed the exact head against the generic experiment, the ML-DSA extraction, and the standard self-target shape used in the Dilithium literature. This is the focused soundness repair the stack needs: the experiment still enforces RO consistency through the cache, but now also makes that exact preimage available to validity; the ML-DSA instance uses it to require the hashed commitment to equal the commitment recovered from the response. The characterization theorem exposes that conjunct directly, and the NMA extractor preserves it by querying and returning the same (message, commitment) pair.
The scope is appropriately narrow: this fixes the previously trivial tailored relation without claiming that the tailored UseHint/HighBits relation has already been reduced to standard [I | A]-form SelfTargetMSIS. I also built LatticeCrypto from this exact head on Lean 4.32. This looks safe to land as the dependency root for #504/#506.
Extracts the generic
SelfTargetMSISbinding repair as a small, self-contained PR — step 1 of the decomposition @dtumad proposed on #467/#479. It is independently necessary (it closes a soundness gap in the tailored ML-DSA self-target problem) and it unblocks a sound review of #479.The soundness gap
SelfTargetMSIS.Problem.isValidreceived onlyChallenge → Target → HashOutput → Response, never the RO preimage the experiment looks up. SomldsaSTMSIS.isValidrecomputed a commitmentw'from(pk, c̃, (z, h))and verified against that same recomputed value, without ever requiring the commitment component of the hashed pair(msg, w)to equalw'. The relevant equality closed asX = X. That makes the tailored problem strictly easier than the literature relation — a zero-response / zero-hint solution wins after querying an unrelated commitment, subject only to the verifier norm gates.The repair
ShortIntegerSolution.lean):isValid : Challenge → Target → HashInput → HashOutput → Response → Bool, andexperimentnow passes the cache-consistenthashInput(the same preimage it already looks up) intoisValid. The structure's type parameters are unchanged, so abstract references toSelfTargetMSIS.Problem …elsewhere are unaffected.SecurityNMA.lean):mldsaSTMSIS.isValidnow additionally requireshashInput.2 = w'— the recovered commitment must equal the commitment component of the hashed preimage. On the accepting path the forger's own returned(msg, w')is the queried preimage, so the extraction proof discharges the binding for free (it reduces tow' = w'); the read-back proof (stmsis_tail_le) is updated accordingly.mldsaSTMSIS_isValid_eq_true_iff): acceptance is exactly verifier acceptance ∧ the binding conjunct, stated explicitly so the self-target requirement stays visible — an instantiation that silently dropped the preimage would fail this lemma, making the regression hard to reintroduce.Scope (deliberately narrow)
This PR fixes only the SelfTargetMSIS binding. The other items from the #467 review are separate, larger pieces and are not in this PR:
H([I_m | A]·y, μ)with the challenge asy's final coefficient block) — the endpoint bridge;The characterization lemma here is the lightweight binding statement, not the full algebraic normal-form bridge (that lives with the standard-STMSIS reduction).
Verification
Off current
main.lake build LatticeCrypto(and the full CI library set) green on Lean v4.32.0;mldsaSTMSIS_isValid_eq_true_iffand the affectednmaAdvantage_keygen1_le_stmsisextraction kernel-check[propext, Classical.choice, Quot.sound]. No statement outside the three touched declarations changes.https://claude.ai/code/session_01DaNGD9nDo3Grwk58nsjS77