aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/ec_gfp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-08-01 19:42:20 +0000
committerlloyd <[email protected]>2012-08-01 19:42:20 +0000
commitcf445ea944734e3ace1c496c43971f1dfadb9e02 (patch)
treef7e8428666a29459b0afc7cb4183d76cfa569f0b /src/math/ec_gfp
parent7dbcedf896b78db3920368d7dabf2dbc2fa50e09 (diff)
Move monty_invert to numthry.h and use it in CurveGFp as well
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;