diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2016-05-30 09:51:47 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2016-05-30 09:51:47 +0800 |
commit | ac1a5d95729650ca3e62fae5a9f9782dc8d31922 (patch) | |
tree | 8b19fb5ad3ba8678587e5dbe1ab856ae503eb324 | |
parent | 69138da370a11dfc886acd46126c228895fe54f9 (diff) | |
download | dexon-mcl-ac1a5d95729650ca3e62fae5a9f9782dc8d31922.tar.gz dexon-mcl-ac1a5d95729650ca3e62fae5a9f9782dc8d31922.tar.zst dexon-mcl-ac1a5d95729650ca3e62fae5a9f9782dc8d31922.zip |
rename optimalAtePairing to pairing
-rw-r--r-- | include/mcl/bn.hpp | 2 | ||||
-rw-r--r-- | sample/pairing.cpp | 4 | ||||
-rw-r--r-- | test/bn_test.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/include/mcl/bn.hpp b/include/mcl/bn.hpp index f6e51d7..7526a85 100644 --- a/include/mcl/bn.hpp +++ b/include/mcl/bn.hpp @@ -702,7 +702,7 @@ struct BNT { #endif exp_d1(y, y); } - static void optimalAtePairing(Fp12& f, const G2& Q, const G1& P) + static void pairing(Fp12& f, const G2& Q, const G1& P) { P.normalize(); Q.normalize(); diff --git a/sample/pairing.cpp b/sample/pairing.cpp index 443f0b3..ec3c9bc 100644 --- a/sample/pairing.cpp +++ b/sample/pairing.cpp @@ -25,10 +25,10 @@ void minimum_sample() const mpz_class a = 123; const mpz_class b = 456; Fp12 e1, e2; - BN::optimalAtePairing(e1, Q, P); + BN::pairing(e1, Q, P); G2::mul(Q, Q, a); G1::mul(P, P, b); - BN::optimalAtePairing(e2, Q, P); + BN::pairing(e2, Q, P); Fp12::pow(e1, e1, a * b); printf("%s\n", e1 == e2 ? "ok" : "ng"); } diff --git a/test/bn_test.cpp b/test/bn_test.cpp index 78868e3..c629a20 100644 --- a/test/bn_test.cpp +++ b/test/bn_test.cpp @@ -72,7 +72,7 @@ CYBOZU_TEST_AUTO(naive) G1 P(ts.g1.a, ts.g1.b); G2 Q(Fp2(ts.g2.aa, ts.g2.ab), Fp2(ts.g2.ba, ts.g2.bb)); Fp12 e1; - BN::optimalAtePairing(e1, Q, P); + BN::pairing(e1, Q, P); Fp12 e2; { std::stringstream ss(ts.e); @@ -87,6 +87,6 @@ CYBOZU_TEST_AUTO(naive) miller loop : 700Kclk final exp : 460Kclk */ - CYBOZU_BENCH("pairing", BN::optimalAtePairing, e1, Q, P); // 2.4Mclk + CYBOZU_BENCH("pairing", BN::pairing, e1, Q, P); // 2.4Mclk CYBOZU_BENCH("finalExp", BN::finalExp, e1, e1); // 1.3Mclk } |