-
Notifications
You must be signed in to change notification settings - Fork 15
Description
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