Skip to content

Commit

Permalink
fix FpToG1(u, v) and Fp2ToG2(u, v) for u == v
Browse files Browse the repository at this point in the history
  • Loading branch information
herumi committed Jan 30, 2022
1 parent e374ba6 commit 0ddbe94
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions include/mcl/mapto_wb19.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,9 @@ struct MapTo_WB19 {
g2A.b = 240;
g2B.a = 1012;
g2B.b = 1012;
E1::a_.clear();
E1::b_ = 4;
E1::specialA_ = ec::Zero;
E2::a_.clear();
E2::b_.a = 4;
E2::b_.b = 4;
E2::specialA_ = ec::Zero;
E2::a_ = g2A;
E2::b_ = g2B;
E2::specialA_ = ec::GenericA;
sqrtConst = Fp::getOp().mp;
sqrtConst *= sqrtConst;
sqrtConst -= 9;
Expand Down Expand Up @@ -128,6 +124,9 @@ struct MapTo_WB19 {
assert(b); (void)b;
}
init_iso11();
E1::a_ = g1A;
E1::b_ = g1B;
E1::specialA_ = ec::GenericA;
}
void initArray(Fp *dst, const char **s, size_t n) const
{
Expand Down

0 comments on commit 0ddbe94

Please sign in to comment.