diff options
author | lloyd <[email protected]> | 2010-03-13 05:21:33 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-13 05:21:33 +0000 |
commit | 7a3a641568e66eb7e39b5491bf41f84e1cb0df61 (patch) | |
tree | 437acc3ef8d0154cef34081f09a551fa98f55b49 | |
parent | 404f61129c61eba941caac067728174e3efca21f (diff) |
Single word p-dash
-rw-r--r-- | src/math/numbertheory/curve_gfp.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/math/numbertheory/curve_gfp.h b/src/math/numbertheory/curve_gfp.h index 3c9eb90ca..68f07a331 100644 --- a/src/math/numbertheory/curve_gfp.h +++ b/src/math/numbertheory/curve_gfp.h @@ -41,7 +41,7 @@ class BOTAN_DLL CurveGFp r_inv = inverse_mod(r, p); - p_dash = ((r * r_inv) - 1) / p; + p_dash = (((r * r_inv) - 1) / p).word_at(0); } // CurveGFp(const CurveGFp& other) = default; @@ -78,7 +78,7 @@ class BOTAN_DLL CurveGFp /** * @return Montgomery parameter p-dash */ - const BigInt& get_p_dash() const { return p_dash; } + word get_p_dash() const { return p_dash; } const Modular_Reducer& mod_p() const { return reducer_p; } @@ -108,7 +108,8 @@ class BOTAN_DLL CurveGFp BigInt p, a, b; // Montgomery parameters - BigInt r, r_inv, p_dash; + BigInt r, r_inv; + word p_dash; Modular_Reducer reducer_p; }; |