aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/ec_gfp
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/ec_gfp')
-rw-r--r--src/math/ec_gfp/curve_gfp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/math/ec_gfp/curve_gfp.h b/src/math/ec_gfp/curve_gfp.h
index 9d10c2028..d6c2f2a8c 100644
--- a/src/math/ec_gfp/curve_gfp.h
+++ b/src/math/ec_gfp/curve_gfp.h
@@ -37,7 +37,7 @@ class BOTAN_DLL CurveGFp
{
const BigInt r = BigInt::power_of_2(p_words * BOTAN_MP_WORD_BITS);
- p_dash = (((r * inverse_mod(r, p)) - 1) / p).word_at(0);
+ p_dash = monty_inverse(p.word_at(0));
r2 = (r * r) % p;
a_r = (a * r) % p;