aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/ec_gfp/point_gfp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/math/ec_gfp/point_gfp.cpp')
-rw-r--r--src/lib/math/ec_gfp/point_gfp.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/math/ec_gfp/point_gfp.cpp b/src/lib/math/ec_gfp/point_gfp.cpp
index 9cd5a2aaf..cf3a204d6 100644
--- a/src/lib/math/ec_gfp/point_gfp.cpp
+++ b/src/lib/math/ec_gfp/point_gfp.cpp
@@ -196,7 +196,8 @@ void PointGFp::mult2(std::vector<BigInt>& ws_bn)
monty_sqr(z4, monty_sqr(coord_z));
monty_mult(a_z4, curve.get_a_r(), z4);
- M = 3 * monty_sqr(coord_x);
+ M = monty_sqr(coord_x);
+ M *= 3;
M += a_z4;
while(M >= p)
M -= p;