github.com/arieschain/arieschain@v0.0.0-20191023063405-37c074544356/crypto/bn256/bn256_fast.go (about) 1 // +build amd64 arm64 2 3 // Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve. 4 package bn256 5 6 import "github.com/quickchainproject/quickchain/crypto/bn256/cloudflare" 7 8 // G1 is an abstract cyclic group. The zero value is suitable for use as the 9 // output of an operation, but cannot be used as an input. 10 type G1 = bn256.G1 11 12 // G2 is an abstract cyclic group. The zero value is suitable for use as the 13 // output of an operation, but cannot be used as an input. 14 type G2 = bn256.G2 15 16 // PairingCheck calculates the Optimal Ate pairing for a set of points. 17 func PairingCheck(a []*G1, b []*G2) bool { 18 return bn256.PairingCheck(a, b) 19 }