aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2019-07-30 12:44:08 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2019-07-30 12:44:08 +0800
commit6e9f21d1afbdc207202d4a6e75d0bddc9c1f187b (patch)
treeb3127278a2e58274d07b20fab469de3889d6320e
parentb57e25f0cf0cca7738c3716b92b247f14184cff4 (diff)
downloadtangerine-mcl-6e9f21d1afbdc207202d4a6e75d0bddc9c1f187b.tar.gz
tangerine-mcl-6e9f21d1afbdc207202d4a6e75d0bddc9c1f187b.tar.zst
tangerine-mcl-6e9f21d1afbdc207202d4a6e75d0bddc9c1f187b.zip
[she] use initCurve
-rw-r--r--include/mcl/she.hpp12
1 files changed, 1 insertions, 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<G1, Fr>(para.curveType, &P_);
setRangeForG1DLP(hashSize);
useDecG1ViaGT_ = false;
useDecG2ViaGT_ = false;
isG1only_ = true;
setTryNum(tryNum);
- if (std::string(para.name) == mcl::ecparam::secp256k1.name) {
- mcl::GLV1T<G1>::initForSecp256k1(Fr::getOp().mp);
- G1::setMulArrayGLV(mcl::GLV1T<G1>::mulArray);
- }
}
/*
set range for G1-DLP