github.com/ethw3/go-ethereuma@v0.0.0-20221013053120-c14602a4c23c/crypto/bn256/bn256_slow.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 bn256 "github.com/ethw3/go-ethereuma/crypto/bn256/google"
    12  
    13  // G1 is an abstract cyclic group. The zero value is suitable for use as the
    14  // output of an operation, but cannot be used as an input.
    15  type G1 = bn256.G1
    16  
    17  // G2 is an abstract cyclic group. The zero value is suitable for use as the
    18  // output of an operation, but cannot be used as an input.
    19  type G2 = bn256.G2
    20  
    21  // PairingCheck calculates the Optimal Ate pairing for a set of points.
    22  func PairingCheck(a []*G1, b []*G2) bool {
    23  	return bn256.PairingCheck(a, b)
    24  }