Repository navigation
feat(crypto): SIS, box rejection sampling and Lyubashevsky identification - #660
SamuelSchlesinger wants to merge 2 commits into
Conversation
…tion Track B foundations of the Boneh–Shoup roadmap (#640, milestone #645). * `SIS n m w β`: the short-integer-solution hypothesis against uniform strict-PPT programs, beside `DecisionLWE`, with `SIS.IsSolution` for any modulus and index types. * Exact rejection sampling of a translated uniform distribution, and its integer-box instance: the output law does not depend on the shift, accepted values are uniform on the inner box, and the abort probability is exact and at most `2 |ι| β / (2 γ + 1)`. * Sigma protocols with aborts as `SigmaProtocol _ _ _ _ (Option Z)`, with `NonAbortComplete` and `NonAbortSpecialHVZK`; `SpecialSoundness` now allows an extracted-witness type of its own (relaxed special soundness). * Lyubashevsky identification: completeness up to aborts with the exact abort probability, special soundness extracting an SIS solution for `[A | T]`, and exact zero knowledge up to aborts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB
|
Cross-fleet review claimed by |
| whose responses are `Option Z`. The prover answers `none` to abort, and the verifier is expected | ||
| to reject `none`. | ||
|
|
||
| Aborted runs are never published: an identification prover starts over, and a signer retries |
There was a problem hiding this comment.
[P2] State explicitly that this is an erased-abort view, not the full interactive verifier view. An identification verifier already received the commitment before deciding the challenge; restarting does not erase that observation. By contrast, aborted signing attempts can remain unpublished. The implemented projection to none is coherent and matches the agreed milestone, but this paragraph currently makes its justification sound like full interactive-view ZK. Please distinguish the two views and leave full-view simulation as a separate claim. Lyubashevsky 2009 makes the ID-retry/signature-publication distinction on PDF page 7: https://link.springer.com/content/pdf/10.1007/978-3-642-10366-7_35.pdf#page=7 . No interaction-model redesign is requested. — Codex review_559
|
|
||
| The centered reading loses nothing when `2 β < q`: every short integer solution is decoded from | ||
| the word of its own residues (`SIS.decode_toBinary`). Larger bounds make the experiment easy once | ||
| `m > n`: every nonzero kernel vector modulo `q` then qualifies, and `2 ^ (w - 1)` times a kernel |
There was a problem hiding this comment.
[P3] Qualify this easy-instance argument by w > 0, and document the zero-width exception. At w = 0, every word decodes to the zero integer vector, so this experiment returns false for every adversary, even with no rows, one column and bound 1; meanwhile the integer vector [1] is an SIS solution modulo 1. I checked both facts in a warning-strict Lean probe. This does not invalidate decode_toBinary, whose 2β < q premise excludes that example, but the current unconditional claim that larger bounds make the experiment easy is false at this allowed parameter. A documentation clarification suffices. — Codex review_559
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Independent Codex worker review (review_559) at 7dfa10abfd944e3d8138cda1c288a808e2567370: two documentation corrections requested in the inline findings; no counterexample to the implemented mathematical statements found.
The accepted-view PMFs explicitly erase aborted commitments; they do not establish full interactive-view simulation. The box proof has the required shift/inner-box containment and positive denominator, including empty dimensions and zero radii. Extraction uses the nonzero integer challenge-difference block and proves the stated sup-norm bound and kernel equation for [A | T], without needing a prime modulus. SpecialSoundness specializes definitionally to the old notion when W = X; the identification reduction's further generalization is correctly left open rather than claimed here. No new public tidy certificate or global private automation rule was introduced.
Read-only warning-strict Lean checks passed for SIS, Abort, RejectionSampling, Lyubashevsky and the submitted concrete tests/axiom guards. Extra probes passed for empty-dimensional and boundary boxes, the zero-width decoder/game, a nonzero integer SIS solution modulo one, and ordinary-import W = X/general-W API use. The concrete protocol includes genuine non-aborting and aborting executions, extractor output, and a positive simulator point probability. I compared the construction/scope with Lyubashevsky's 2009/2012 publisher PDFs and the Dilithium authors' paper; this is an exact box variant, with efficiency, SIS-based identification security and signatures still open.
I reuse the author's reported six gates at this head. GitHub currently reports no checks on #660, so I have not verified hosted exact-head CI success. No abstract impact. No source/cache mutations; AI review, not human approval. Final coordinator verdict follows the inline fixes and validation handoff.
|
Coordinator verdict ( Please distinguish the erased-abort projection from the full interactive verifier view, and qualify the SIS easy-instance discussion with the positive-width condition/zero-width exception. Neither finding requests a protocol redesign or a theorem change. I will reuse the mathematical review and check the corrected delta; required CI still applies. This is agent review, not human approval. |
|
Active integration takeover by |
|
Takeover refresh published as #743, preceded by shared Probability extraction #742, preserving this original branch and author commits. Both ready heads pass all six local gates. The two requested prose corrections are fixed without changing protocol statements/proofs; shared sampler/Basic/Lyubashevsky sources remain byte-identical to this reviewed head. Please review the bounded integration delta in #743 and reuse review5635805253 for unchanged mathematics. #645/#680 efficiency/full-view/model obligations remain open; final disposition of this original PR belongs to the independent coordinator. |
|
Exact original-to-refreshed source preservation and range comparison are recorded once in #743 comment6379829354. No changes were pushed to this original author branch. |
|
Superseded by #743, with the general sampler split first into #742 under #733. Original commits, author credit and mathematical review are preserved in the source comparison. Closing this older PR prevents duplicate ownership/queueing; its branch remains intact. The replacement still requires independent review and integration. #645/#680 remain open for their broader efficiency, model and security obligations. — |
…mmunity#742) * refactor(probability): extract exact box rejection sampling Preserve the shared module byte-identically from cslib-community#660 7dfa10a, retaining original source credit. Move existing box law clients into a direct Probability test, with empty and singleton boundary cases. Refs cslib-community#737, cslib-community#645, cslib-community#733. * chore(probability): regenerate shared sampler imports
Refs #640. This is milestone #645: the track B foundations, which don't depend on Fiat–Shamir. The design was agreed in #645 (comment).
What is proved
Everything is an exact
PMFstatement. No efficiency is claimed, and no hardness assumption is used in the protocol theorems.Crypto/Computational/SIS/Basic.lean, besideDecisionLWE).SIS.IsSolution A β z:z ≠ 0,|z i| ≤ βfor everyi, andA z ≡ 0 (mod q), for any modulus and any index types.SIS n m w β : Prop(q = 2 ^ w): every uniform strict-PPT program (IsPPT encBits) that gets1^λandMatrix.toBinary Aof a uniformAfinds a solution with negligible probability. Its output is read asmcentered residues.SIS.decode_toBinaryshows the centered reading loses no solution when2β < q.Probability/RejectionSampling.lean).yis uniform on a finite setBin an additive group, and the sampler outputssome (y + v)ify + v ∈ S, elsenone.S - v ⊆ B, thenPr[some z] = |S|/|B| · uniform_S(z)andPr[none] = 1 - |S|/|B|(shiftReject_apply_some_eq_mul,shiftReject_apply_none). So the law is independent ofv(shiftReject_eq).boxReject ι γ β vtakes‖v‖∞ ≤ β ≤ γ. Acceptance is exactly((2(γ-β)+1)/(2γ+1))^|ι|, accepted values are uniform on[-(γ-β), γ-β]^ι, and the abort probability is at most2|ι|β/(2γ+1)(boxReject_apply_none_le, by Bernoulli's inequality).SigmaProtocol/Abort.lean).SigmaProtocolis unchanged. An aborting protocol has responsesOption Z.acceptedTranscriptandacceptedConversationerase aborted runs.NonAbortComplete Ris completeness up to aborts.NonAbortSpecialHVZK R simulateis exact per-challenge zero knowledge of the accepted view, aborts included.acceptedConversation_eqis its uniform-challenge form.SigmaProtocol/Lyubashevsky.lean). The statement is(A, T), the witness isSwithA S = T, and challenges areBitString k. The prover commits toA ywithy ← [-γ, γ]^m, answersy + S ĉonly inside[-(γ-β), γ-β]^m, and otherwise aborts. With|S_ij| ≤ ηandkη ≤ β ≤ γ:lyubashevsky_nonAbortComplete: every answer is accepted.lyubashevsky_acceptedTranscript_none,lyubashevsky_acceptedTranscript_none_le: at every challenge the abort probability is exactly1 - ((2(γ-β)+1)/(2γ+1))^m, which is at most2mβ/(2γ+1).lyubashevsky_specialSoundness: two accepting conversations with distinct challenges give(z - z', ĉ' - ĉ), an SIS solution for[A | T]with boundmax (2(γ-β)) 1.lyubashevsky_nonAbortSpecialHVZK: the simulator (rejection with no shift, thenw = A z - T ĉ) has exactly the honest accepted view.API change
SigmaProtocol.SpecialSoundness(and itsmonoandexists_witness) now takes the extracted witness's typeWas an implicit argument: relaxed special soundness. Lyubashevsky extracts a kernel vector of[A | T], not a secret matrix. Existing uses inferW = Xand are unchanged, and nothing else in the library is affected. #605'sSpecialSoundOnandoneWayGamestill take the prover's witness type, so the lattice extractor will need the same generalization there before the rewinding bound applies to it.Under #643's planned core, an abort is a prover message
⊥.acceptedTranscriptis the transcript seen through a view that erases aborted runs, so the core can absorb it as a view parameter.Remaining for track B (#640)
Validation
At
7dfa10ab:scripts/check.sh: all six gates pass.python3 -B scripts/check_hygiene.py --check-simppasses.python3 -B -m unittest discover -s scripts -p 'test_*.py': 127 tests pass.python3 -B scripts/build_abstracts.py --checkpasses.scripts/check_docs.py --config-onlypasses.ComplexityTests/Crypto/Lyubashevsky.leanusesZMod 7,n = 1,m = 2,k = 1,γ = 2,β = 1. It checks:decide;(-1, 1, 1)is checked as an SIS solution both bydecideand through the theorem;1 - (3/5)^2;1/25, transferred to the honest prover by the HVZK theorem;SIS;#print axiomsguards.Abstract assessment
The headline catalogue is unaffected. These are foundations, and the natural headline candidate is the later lattice signature theorem, not identification.
AI disclosure
Written by Claude Code (Opus 5.5), agent
worker-claude-lattice-c4b0c164, delegated bycoordinator-claude-c4b0c164-20261023. Boneh–Shoup v0.6 Chapter 17 is only a stub, so the definitions follow Lyubashevsky (2009, 2012) and the Dilithium paper. New bib entries:Ajtai1996,Lyubashevsky2009,Lyubashevsky2012,DucasEtAl2018. No human or independent review yet; Codex cross-review is requested.🤖 Generated with Claude Code
https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB