github.com/linapex/ethereum-go-chinese@v0.0.0-20190316121929-f8b7a73c3fa1/crypto/bn256/bn256_fast.go (about) 1 2 //<developer> 3 // <name>linapex 曹一峰</name> 4 // <email>linapex@163.com</email> 5 // <wx>superexc</wx> 6 // <qqgroup>128148617</qqgroup> 7 // <url>https://jsq.ink</url> 8 // <role>pku engineer</role> 9 // <date>2019-03-16 19:16:36</date> 10 //</624450083466776576> 11 12 //版权所有2018 P_ter Szil_gyi。版权所有。 13 //此源代码的使用受可以找到的BSD样式许可证的控制 14 //在许可证文件中。 15 16 //+构建AMD64 ARM64 17 18 //包bn256在256位的barreto-naehrig曲线上实现了最佳的ate对。 19 package bn256 20 21 import "github.com/ethereum/go-ethereum/crypto/bn256/cloudflare" 22 23 //g1是一个抽象的循环群。零值适合用作 24 //操作的输出,但不能用作输入。 25 type G1 = bn256.G1 26 27 //g2是一个抽象的循环群。零值适合用作 28 //操作的输出,但不能用作输入。 29 type G2 = bn256.G2 30 31 //pairingcheck计算一组点的最佳ate对。 32 func PairingCheck(a []*G1, b []*G2) bool { 33 return bn256.PairingCheck(a, b) 34 } 35