diff options
Diffstat (limited to 'src/lib/math/numbertheory')
-rw-r--r-- | src/lib/math/numbertheory/monty_exp.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/math/numbertheory/monty_exp.cpp b/src/lib/math/numbertheory/monty_exp.cpp index 3451b1955..567492091 100644 --- a/src/lib/math/numbertheory/monty_exp.cpp +++ b/src/lib/math/numbertheory/monty_exp.cpp @@ -132,8 +132,7 @@ BigInt Montgomery_Exponentation_State::exponentiation_vartime(const BigInt& scal if(exp_nibbles == 0) return 1; - const uint32_t nibble = scalar.get_substring(m_window_bits*(exp_nibbles-1), m_window_bits); - Montgomery_Int x = m_g[nibble]; + Montgomery_Int x = m_g[scalar.get_substring(m_window_bits*(exp_nibbles-1), m_window_bits)]; for(size_t i = exp_nibbles - 1; i > 0; --i) { |