From b5c2edee03804a3e62133596df02a2d5df803ba8 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Sat, 25 Jan 2020 12:33:25 +0900 Subject: [PATCH] init mapToG2_WBP19 in initBLS12 --- include/mcl/bn.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/mcl/bn.hpp b/include/mcl/bn.hpp index 32f3928..e13cf4d 100644 --- a/include/mcl/bn.hpp +++ b/include/mcl/bn.hpp @@ -523,6 +523,7 @@ struct MapTo { assert(b); (void)b; Fr::inv(g2cofactorAdj_, g2cofactorAdjInv_); + mapToG2_WB19_.init(); } /* change mapTo function to mode @@ -537,12 +538,8 @@ struct MapTo { case MCL_MAP_TO_MODE_ORIGINAL: case MCL_MAP_TO_MODE_TRY_AND_INC: case MCL_MAP_TO_MODE_ETH2: - mapToMode_ = mode; - return true; - break; case MCL_MAP_TO_MODE_WB19: mapToMode_ = mode; - mapToG2_WB19_.init(); return true; break; default: