aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/gfpmath/gfp_element.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-02-23 19:33:39 +0000
committerlloyd <[email protected]>2010-02-23 19:33:39 +0000
commit31b12b7756094231672555604550e51eecaeb04c (patch)
tree094c5ce9358a64a6aca2b9e276a1418f9d47e43f /src/math/gfpmath/gfp_element.cpp
parent848fcbccec00ba0ce0f6bca7a4c6e3873b653362 (diff)
in GFpElement remove some mutables and de-const membmer funcs as necessary
Diffstat (limited to 'src/math/gfpmath/gfp_element.cpp')
-rw-r--r--src/math/gfpmath/gfp_element.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/math/gfpmath/gfp_element.cpp b/src/math/gfpmath/gfp_element.cpp
index 7e660213e..863135491 100644
--- a/src/math/gfpmath/gfp_element.cpp
+++ b/src/math/gfpmath/gfp_element.cpp
@@ -165,20 +165,20 @@ BigInt montg_trf_to_ordres(const BigInt& m_res, const BigInt& m, const BigInt& r
}
-GFpElement::GFpElement(const BigInt& p, const BigInt& value, bool use_montgm)
- : modulus(p), m_value(value %p), m_use_montgm(use_montgm), m_is_trf(false)
+GFpElement::GFpElement(const BigInt& p, const BigInt& value, bool use_montgomery)
+ : modulus(p), m_value(value %p), m_use_montgm(use_montgomery), m_is_trf(false)
{
if(m_use_montgm)
ensure_montgm_precomp();
}
-void GFpElement::turn_on_sp_red_mul() const
+void GFpElement::turn_on_sp_red_mul()
{
ensure_montgm_precomp();
m_use_montgm = true;
}
-void GFpElement::turn_off_sp_red_mul() const
+void GFpElement::turn_off_sp_red_mul()
{
if(m_is_trf)
{
@@ -189,7 +189,7 @@ void GFpElement::turn_off_sp_red_mul() const
m_use_montgm = false;
}
-void GFpElement::ensure_montgm_precomp() const
+void GFpElement::ensure_montgm_precomp()
{
if((!modulus.get_r().is_zero()) && (!modulus.get_r_inv().is_zero()) && (!modulus.get_p_dash().is_zero()))
{