From 6e9f21d1afbdc207202d4a6e75d0bddc9c1f187b Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Tue, 30 Jul 2019 13:44:08 +0900 Subject: [PATCH] [she] use initCurve --- include/mcl/she.hpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/include/mcl/she.hpp b/include/mcl/she.hpp index 84f3e55..b95f01c 100644 --- a/include/mcl/she.hpp +++ b/include/mcl/she.hpp @@ -577,22 +577,12 @@ public: */ static void initG1only(const mcl::EcParam& para, size_t hashSize = 1024, size_t tryNum = local::defaultTryNum) { - Fp::init(para.p); - Fr::init(para.n); - G1::init(para.a, para.b); - const Fp x0(para.gx); - const Fp y0(para.gy); - P_.set(x0, y0); - + mcl::initCurve(para.curveType, &P_); setRangeForG1DLP(hashSize); useDecG1ViaGT_ = false; useDecG2ViaGT_ = false; isG1only_ = true; setTryNum(tryNum); - if (std::string(para.name) == mcl::ecparam::secp256k1.name) { - mcl::GLV1T::initForSecp256k1(Fr::getOp().mp); - G1::setMulArrayGLV(mcl::GLV1T::mulArray); - } } /* set range for G1-DLP