github.com/consensys/gnark-crypto@v0.14.0/internal/apicheck_test.go (about) 1 package main 2 3 import ( 4 bls377 "github.com/consensys/gnark-crypto/ecc/bls12-377" 5 bls378 "github.com/consensys/gnark-crypto/ecc/bls12-378" 6 bls381 "github.com/consensys/gnark-crypto/ecc/bls12-381" 7 "github.com/consensys/gnark-crypto/ecc/bn254" 8 bw761 "github.com/consensys/gnark-crypto/ecc/bw6-761" 9 ) 10 11 // note: pairing API is not code generated, and don't use interfaces{} for performance reasons 12 // we end up having some API disparities -- this section ensures that we don't forget to update some APIs 13 14 var err error 15 16 var ( 17 gtbls377 bls377.GT 18 gtbls378 bls378.GT 19 gtbls381 bls381.GT 20 gtbn254 bn254.GT 21 gtbw761 bw761.GT 22 ) 23 24 func init() { 25 // Pair 26 gtbls377, err = bls377.Pair([]bls377.G1Affine{}, []bls377.G2Affine{}) 27 gtbls378, err = bls378.Pair([]bls378.G1Affine{}, []bls378.G2Affine{}) 28 gtbls381, err = bls381.Pair([]bls381.G1Affine{}, []bls381.G2Affine{}) 29 gtbn254, err = bn254.Pair([]bn254.G1Affine{}, []bn254.G2Affine{}) 30 gtbw761, err = bw761.Pair([]bw761.G1Affine{}, []bw761.G2Affine{}) 31 32 // MillerLoop 33 gtbls377, err = bls377.MillerLoop([]bls377.G1Affine{}, []bls377.G2Affine{}) 34 gtbls378, err = bls378.MillerLoop([]bls378.G1Affine{}, []bls378.G2Affine{}) 35 gtbls381, err = bls381.MillerLoop([]bls381.G1Affine{}, []bls381.G2Affine{}) 36 gtbn254, err = bn254.MillerLoop([]bn254.G1Affine{}, []bn254.G2Affine{}) 37 gtbw761, err = bw761.MillerLoop([]bw761.G1Affine{}, []bw761.G2Affine{}) 38 39 // FinalExp 40 gtbls377 = bls377.FinalExponentiation(>bls377) 41 gtbls378 = bls378.FinalExponentiation(>bls378) 42 gtbls381 = bls381.FinalExponentiation(>bls381) 43 gtbn254 = bn254.FinalExponentiation(>bn254) 44 gtbw761 = bw761.FinalExponentiation(>bw761) 45 }