Skip to content

[Semaphore Integration] Issue 4: Finalize Semaphore Verifier Contract Implementation #2

@evgongora

Description

@evgongora

The Semaphore verifier contract for Soroban requires zk-SNARK proof verification using BLS12-381 pairing-based cryptography. With the introduction of CAP-0059, Soroban now provides native host functions for efficient operations on BLS12-381, enabling seamless integration of zk-SNARK verification logic.

bls12_381_multi_pairing_check: Performs pairing checks between G1 and G2 points to verify zk-SNARK proofs efficiently.
bls12_381_g1_add: Adds G1 points, which is used in aggregating cryptographic data during proof validation.
bls12_381_g1_mul: Multiplies a G1 point by a scalar to compute necessary cryptographic transformations.
bls12_381_hash_to_g1: Hashes user inputs or commitments to G1 points, enabling secure proof verification.

References:
https://github.com/stellar/stellar-protocol/blob/master/core/cap-0059.md
https://github.com/semaphore-protocol/semaphore/blob/main/packages/contracts/contracts/base/SemaphoreVerifier.sol
https://github.com/semaphore-protocol/semaphore/blob/main/packages/contracts/contracts/interfaces/ISemaphoreVerifier.sol

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions