ark-curves-cherry-picked/bls12_377/src/constraints/curves.rs
bls12_377/src/constraints/curves.rsRaw
1use crate::Parameters;
2use ark_r1cs_std::groups::bls12;
3
4/// An element of G1 in the BLS12-377 bilinear group.
5pub type G1Var = bls12::G1Var<Parameters>;
6/// An element of G2 in the BLS12-377 bilinear group.
7pub type G2Var = bls12::G2Var<Parameters>;
8
9/// Represents the cached precomputation that can be performed on a G1 element
10/// which enables speeding up pairing computation.
11pub type G1PreparedVar = bls12::G1PreparedVar<Parameters>;
12/// Represents the cached precomputation that can be performed on a G2 element
13/// which enables speeding up pairing computation.
14pub type G2PreparedVar = bls12::G2PreparedVar<Parameters>;
15
16#[test]
17fn test() {
18 use ark_ec::models::bls12::Bls12Parameters;
19 ark_curve_constraint_tests::curves::sw_test::<
20 <Parameters as Bls12Parameters>::G1Parameters,
21 >()
22 .unwrap();
23 ark_curve_constraint_tests::curves::sw_test::<
24 <Parameters as Bls12Parameters>::G2Parameters,
25 >()
26 .unwrap();
27}