Skip to content

fix: security hardening for ZK proofs and protocol input validation#84

Merged
hsiuhsiu merged 1 commit intomasterfrom
various-fix
Jan 7, 2026
Merged

fix: security hardening for ZK proofs and protocol input validation#84
hsiuhsiu merged 1 commit intomasterfrom
various-fix

Conversation

@hsiuhsiu
Copy link
Copy Markdown
Contributor

@hsiuhsiu hsiuhsiu commented Jan 7, 2026

  • Add input range checks and curve point validation in ZK verifiers
  • Add Fischlin parameter validation with check() methods
  • Fix hash encoding for vectors to include length/size prefixes
  • Add batch size consistency checks in ECDSA, Schnorr, and DKG protocols
  • Handle edge cases: secp256k1 infinity points, 0-bit bn_t, mod_t m<=1
  • Add unit test for hash vector encoding

- Add input range checks and curve point validation in ZK verifiers
- Add Fischlin parameter validation with check() methods
- Fix hash encoding for vectors to include length/size prefixes
- Add batch size consistency checks in ECDSA, Schnorr, and DKG protocols
- Handle edge cases: secp256k1 infinity points, 0-bit bn_t, mod_t m<=1
- Add unit test for hash vector encoding
@cb-heimdall
Copy link
Copy Markdown

cb-heimdall commented Jan 7, 2026

✅ Heimdall Review Status

Requirement Status More Info
Reviews 2/2
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 2
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 1
Global minimum 0
Max 2
2
1 if commit is unverified 0
Sum 2
CODEOWNERS ✅ None for this change

@hsiuhsiu hsiuhsiu marked this pull request as ready for review January 7, 2026 17:20
Copy link
Copy Markdown

@valery-osheter-cb valery-osheter-cb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@hsiuhsiu hsiuhsiu merged commit f36b009 into master Jan 7, 2026
8 checks passed
@hsiuhsiu hsiuhsiu deleted the various-fix branch January 7, 2026 18:55
tankbottoms added a commit to tankbottoms/cb-mpc that referenced this pull request Mar 2, 2026
tankbottoms pushed a commit to tankbottoms/cb-mpc that referenced this pull request Mar 15, 2026
dafisher2000 added a commit to IntegraLedger/cb-mpc that referenced this pull request Mar 23, 2026
Merge coinbase/cb-mpc master (cb60753) into Integra fork:
- PR coinbase#88: constant-time hardening, input validation, prove() error returns
- PR coinbase#84: ZK proof hardening, Fischlin parameter validation
- PR coinbase#75: FFI module extraction (mem_t → ffi::view)
- PR coinbase#71-76: benchmarks, refactoring, CI improvements

Integra customizations preserved:
- derive_child_key() asymmetric HD derivation
- MarshalBinary/UnmarshalECDSA2PCKey/DeriveChild Go API
- P2 server-first protocol support
- WASM build support

Post-merge adaptations:
- Custom CGO bindings updated to use ffi::view() pattern (2 call sites)
- WASM rebuilt with Emscripten (includes Node.js environment support)
- Dockerfile.wasm-build added for reproducible WASM builds

Validated: 19/19 C++ tests, 11/11 Go tests, interactive keygen+sign+derive
(Go P1 ↔ Go P2, WASM P2 ↔ Go P1)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants