Skip to content

feat: batch verification with ZK proof support (#458)#642

Merged
fejilaup-cloud merged 1 commit into
AtomicIP:mainfrom
Emmy6654:feat/458-batch-verification-zk-proofs
Jun 17, 2026
Merged

feat: batch verification with ZK proof support (#458)#642
fejilaup-cloud merged 1 commit into
AtomicIP:mainfrom
Emmy6654:feat/458-batch-verification-zk-proofs

Conversation

@Emmy6654

Copy link
Copy Markdown
Contributor

Implements batch verification for Pedersen commitments with ZK proof support to handle multiple IP commitments simultaneously without revealing individual secrets.

  • Adds constant-time comparison to prevent timing attacks
  • Hash aggregation via incremental SHA-256 for deterministic proof
  • b_vfy event emission with aggregate proof and summary counts
  • On-chain storage of BatchVerifyResult
  • Comprehensive tests including empty batch, single item, event emission
  • Updated commitment-scheme.md documentation

Closes #458.

- Add hash aggregation logic combining multiple commitments into single deterministic proof
- Implement incremental SHA-256 hashing for deterministic proof validation
- Add constant-time comparison (constant_time_bytes_32_eq) to prevent timing side-channel attacks
- Remove conflicting old tuple-based batch_verify_commitments (Issue AtomicIP#432)
- Emit b_vfy event with aggregate proof and summary counts on batch completion
- Store BatchVerifyResult on-chain keyed by aggregate proof hash
- Update verify_commitment to use constant-time comparison
- Add unit tests: valid/invalid proofs, empty batch, single item, event emission
- Update test.rs trait and tests to use VerifyRequest/VerifyResult struct types
- Update commitment-scheme.md with full batch verification flow documentation
@fejilaup-cloud fejilaup-cloud merged commit eafcf5e into AtomicIP:main Jun 17, 2026
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add IP Commitment Batch Verification with Proofs

2 participants