aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/numbertheory
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/math/numbertheory')
-rw-r--r--src/lib/math/numbertheory/powm_fw.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/math/numbertheory/powm_fw.cpp b/src/lib/math/numbertheory/powm_fw.cpp
index c326ffa44..c6ff169a1 100644
--- a/src/lib/math/numbertheory/powm_fw.cpp
+++ b/src/lib/math/numbertheory/powm_fw.cpp
@@ -27,7 +27,7 @@ void Fixed_Window_Exponentiator::set_base(const BigInt& base)
m_g.resize(static_cast<size_t>(1) << m_window_bits);
m_g[0] = 1;
- m_g[1] = base;
+ m_g[1] = m_reducer.reduce(base);
for(size_t i = 2; i != m_g.size(); ++i)
m_g[i] = m_reducer.multiply(m_g[i-1], m_g[1]);