From 8b1bd275b7bbbbb1e40ba4acf7a079bb112e9289 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Thu, 28 Jan 2021 17:06:01 +0900 Subject: [PATCH] fix : call setOrder in init for isValidOrder --- include/mcl/bn.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/mcl/bn.hpp b/include/mcl/bn.hpp index 072efab..f2a3885 100644 --- a/include/mcl/bn.hpp +++ b/include/mcl/bn.hpp @@ -944,6 +944,8 @@ struct Param { GLV1::initForBN(z, isBLS12, cp.curveType); GLV2T::init(z, isBLS12); basePoint.clear(); + G1::setOrder(r); + G2::setOrder(r); *pb = true; } void initG1only(bool *pb, const mcl::EcParam& para) @@ -2166,6 +2168,8 @@ inline void init(bool *pb, const mcl::CurveParam& cp = mcl::BN254, fp::Mode mode Fp12::setPowArrayGLV(local::powArrayGLV2, local::powVecNGLV2); G1::setCompressedExpression(); G2::setCompressedExpression(); + verifyOrderG1(false); + verifyOrderG2(false); *pb = true; }