diff options
author | lloyd <[email protected]> | 2011-05-19 13:35:11 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-05-19 13:35:11 +0000 |
commit | 8bb2bba80af0e39848c769c2ea408b831ca7391e (patch) | |
tree | 3e5c48c80fab4ebca4577e7b85b10558bb8db5a6 /src | |
parent | 2bceb3e60fdb7f7cb10dadfdb8535ceeaf793e86 (diff) |
Only call p.sig_words once in CurveGFp constructor.
Fix build log; copy and paste error.
Diffstat (limited to 'src')
-rw-r--r-- | src/math/ec_gfp/curve_gfp.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/math/ec_gfp/curve_gfp.h b/src/math/ec_gfp/curve_gfp.h index 4f339126e..9867f82fe 100644 --- a/src/math/ec_gfp/curve_gfp.h +++ b/src/math/ec_gfp/curve_gfp.h @@ -33,17 +33,15 @@ class BOTAN_DLL CurveGFp * @param b second coefficient */ CurveGFp(const BigInt& p, const BigInt& a, const BigInt& b) : - p(p), a(a), b(b) + p(p), a(a), b(b), p_words(p.sig_words()) { - BigInt r(BigInt::Power2, p.sig_words() * BOTAN_MP_WORD_BITS); + BigInt r(BigInt::Power2, p_words * BOTAN_MP_WORD_BITS); p_dash = (((r * inverse_mod(r, p)) - 1) / p).word_at(0); r2 = (r * r) % p; a_r = (a * r) % p; b_r = (b * r) % p; - - p_words = p.sig_words(); } // CurveGFp(const CurveGFp& other) = default; |