github.com/theQRL/go-zond@v0.1.1/crypto/bn256/bn256_fast.go (about) 1 // Copyright 2018 Péter Szilágyi. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be found 3 // in the LICENSE file. 4 5 //go:build amd64 || arm64 6 // +build amd64 arm64 7 8 // Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve. 9 package bn256 10 11 import ( 12 bn256cf "github.com/theQRL/go-zond/crypto/bn256/cloudflare" 13 ) 14 15 // G1 is an abstract cyclic group. The zero value is suitable for use as the 16 // output of an operation, but cannot be used as an input. 17 type G1 = bn256cf.G1 18 19 // G2 is an abstract cyclic group. The zero value is suitable for use as the 20 // output of an operation, but cannot be used as an input. 21 type G2 = bn256cf.G2 22 23 // PairingCheck calculates the Optimal Ate pairing for a set of points. 24 func PairingCheck(a []*G1, b []*G2) bool { 25 return bn256cf.PairingCheck(a, b) 26 }