aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/math')
-rw-r--r--src/lib/math/numbertheory/monty_exp.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/math/numbertheory/monty_exp.cpp b/src/lib/math/numbertheory/monty_exp.cpp
index f067f33f8..02ae795cd 100644
--- a/src/lib/math/numbertheory/monty_exp.cpp
+++ b/src/lib/math/numbertheory/monty_exp.cpp
@@ -54,11 +54,9 @@ Montgomery_Exponentation_State::Montgomery_Exponentation_State(std::shared_ptr<c
m_g.push_back(Montgomery_Int(m_params, g));
- const Montgomery_Int& monty_g = m_g[1];
-
for(size_t i = 2; i != window_size; ++i)
{
- m_g.push_back(monty_g * m_g[i - 1]);
+ m_g.push_back(m_g[1] * m_g[i - 1]);
}
// Resize each element to exactly p words