Bound random sampling domains and Paillier challenge widths - #15
Merged
Merged
Conversation
Adapt the common prime-size and unit-domain guards from public upstream dc9b957. Adapt the Paillier sampling changes from public upstream b64213a to this base. Use an 18-bit minimum for the local safe-prime candidate range and separation condition. Propagate empty sampler results through direct callers while preserving function signatures and the ordinary 2048-bit challenge output. These are source-level adaptations, not cherry-picks. This base has no quadratic-non-residue sampling helper, and its ModProof is outside the scope of this change. Add bounded domain checks, modulus-width controls, and a fixed 2048-bit challenge digest captured from base 86bd1a3.
Resolve crypto/paillier/paillier.go Proof(): keep this branch's len(xs) != iters guard together with dev's #11/#17-compatible constant-time branches (ExpCT/Exp behind common.IsConstantTimeEnabled()). The inverse M = N^-1 mod PhiN stays on math/big (PhiN is even; bigmod requires an odd modulus). crypto/mta/proofs.go and range_proof.go auto-merged: this branch's beta/random-sampler nil guards and current CT exponent-width call sites are preserved; dev dependency versions win.
|
Merged into Verification:
One local broad regex run timed out while stochastic 2048-bit safe-prime generation was still in Full report: agent-docs/pr-integration/15.md (local). |
piotr-roslaniec
added a commit
that referenced
this pull request
Sep 29, 2026
Merge current origin/dev (includes #12/#13/#15) into PR #14. Conflict choices: - No textual conflicts; clean automatic merge. - Go toolchain/deps, CT hardening, input guards and sampling-bounds changes kept from origin/dev. - Preserved PR #14 changes on top of dev: BaseParty fatal-error latch (abort/abortedWith), keygen unmarshalVSSCommitment part-count guard, and all earlier integration changes.
piotr-roslaniec
added a commit
that referenced
this pull request
Sep 29, 2026
Bring PR #9 current with dev after #17/#23/#12/#13/#15/#14/#26 landed. Conflicts resolved: - CHANGELOG.md: retain dev's PR #17/#23 composing-PR entry alongside PR #9; keep the rollout-only historical Bob compatibility (8ae2cf8) risk text. - crypto/mta/proofs.go: preserve #9 legacy vs security-v2 tau/gamma sampling branches; keep dev's #15 nil sampling guard on beta. P1 8ae2cf8 opt-in historical Bob compatibility (default tight maxT1, opt-in (q+1)*N bound) unchanged. - crypto/schnorr/schnorr_proof.go: combine #9 legacy/v2 challenge API split with dev's #23 constant-time MulCT branch for t = a + c*x. - ecdsa/keygen/round_3.go: keep #14 unmarshalVSSCommitment part-count guard and re-apply #9 mode-conditional round.proofContext(j) for FactorVerify. - ecdsa/signing/round_ct_wiring_test.go: select ProtocolModeSecurityV2 + nonce for the CT wiring test that constructs local signing parties. Auto-merged and preserved: dev toolchain (Go 1.25.7 / 1.26.8) and deps in go.mod/go.sum, #17 CT default-on behavior and fixed public-width ExpCTWithBitLen calls, #12 arity/input guards, #15 nil/bounds guards, #14 keygen changes, and dev workflows/tests. No transcript mode or CT path was dropped.
This was referenced Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #13: the safe-prime result handoff must observe cancellation before the newly accepted small parameter sizes are used. This PR is stacked on
codex/helper-lifecycle.Reject empty prime and unit sampling domains and structurally unsupported Paillier key sizes. Mask expanded
GenerateXscandidates to the modulus width before rejection, and propagate empty sampler results through encryption, quadratic-residue generation, and direct MtA prover callers. The fixed-size Paillier proof constructor reports an invalid challenge domain with an explicit panic. The 18-bit structural floor is an implementation boundary, not a cryptographic security recommendation.The 2048-bit challenge output is unchanged, checked against a digest of all 13 deterministic challenges captured from the unmodified base. Validation includes bounded parameter checks, modulus-width controls, full
commonandcryptotests, and ordinary 2048-bit Paillier/MtA tests withGOMAXPROCS=2andgo test -p 1. Formatting, diff checks, and independent patch review passed.Source-level adaptation of public upstream
dc9b957db02aa186e5e438cf9bd840c57e789008andb64213a53a9a1f822c8dcdd9ad949cdfd27d6468.Full test CI and formatting CI were dispatched for this branch because the automatic PR trigger only covers master.