bn256_slow.go 850 B

123456789101112131415161718192021222324
  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. //go:build !amd64 && !arm64
  5. // +build !amd64,!arm64
  6. // Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
  7. package bn256
  8. import bn256 "github.com/ethereum/go-ethereum/crypto/bn256/google"
  9. // G1 is an abstract cyclic group. The zero value is suitable for use as the
  10. // output of an operation, but cannot be used as an input.
  11. type G1 = bn256.G1
  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. // PairingCheck calculates the Optimal Ate pairing for a set of points.
  16. func PairingCheck(a []*G1, b []*G2) bool {
  17. return bn256.PairingCheck(a, b)
  18. }