github.com/arjunbeliever/ignite@v0.0.0-20220406110515-46bbbbec2587/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 // +build amd64 arm64 6 7 // Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve. 8 package bn256 9 10 import ( 11 bn256cf "github.com/arjunbeliever/ignite/crypto/bn256/cloudflare" 12 ) 13 14 // G1 is an abstract cyclic group. The zero value is suitable for use as the 15 // output of an operation, but cannot be used as an input. 16 type G1 = bn256cf.G1 17 18 // G2 is an abstract cyclic group. The zero value is suitable for use as the 19 // output of an operation, but cannot be used as an input. 20 type G2 = bn256cf.G2 21 22 // PairingCheck calculates the Optimal Ate pairing for a set of points. 23 func PairingCheck(a []*G1, b []*G2) bool { 24 return bn256cf.PairingCheck(a, b) 25 }