aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/numbertheory/reducer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/math/numbertheory/reducer.cpp')
-rw-r--r--src/lib/math/numbertheory/reducer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/math/numbertheory/reducer.cpp b/src/lib/math/numbertheory/reducer.cpp
index 0468d004b..ec0071eac 100644
--- a/src/lib/math/numbertheory/reducer.cpp
+++ b/src/lib/math/numbertheory/reducer.cpp
@@ -84,7 +84,8 @@ void Modular_Reducer::reduce(BigInt& t1, const BigInt& x, secure_vector<word>& w
t1.add(ws.data(), m_mod_words + 2, BigInt::Positive);
- t1.reduce_below(m_modulus, ws);
+ // Per HAC this step requires at most 2 subtractions
+ t1.ct_reduce_below(m_modulus, ws, 2);
if(x.is_negative() && t1.is_nonzero())
{