Elliptic Curve Pairing
The pairing extension enables usage of the optimal Ate pairing check on the BN254 and BLS12-381 elliptic curves. The following field extension tower for is used for pairings in this crate:
The main feature of the pairing extension is the pairing_check
function, which asserts that a product of pairings evaluates to 1.
For example, for the BLS12-381 curve,
let res = Bls12_381::pairing_check(&[p0, -q0], &[p1, q1]);
assert!(res.is_ok());
This asserts that . Naturally, this can be extended to more points by adding more elements to the arrays.
The pairing extension additionally provides field operations in for both BN254 and BLS12-381 curves where is the coordinate field.
See the Pairing guest library for usage details.