From 8bb2bba80af0e39848c769c2ea408b831ca7391e Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 19 May 2011 13:35:11 +0000 Subject: Only call p.sig_words once in CurveGFp constructor. Fix build log; copy and paste error. --- src/math/ec_gfp/curve_gfp.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') 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; -- cgit v1.2.3