aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-06-29 12:48:56 -0400
committerJack Lloyd <[email protected]>2018-06-29 12:48:56 -0400
commitd04f788c86cb5df2d3353774a98a8ed9d8f179fc (patch)
tree85e564028b3fcb793ae64b1a1722bc5afb7025e9 /src/lib
parent39f05c81899ab778458d2a74ab58a549e4d765c0 (diff)
Fix some -Wshadow warnings
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/math/numbertheory/monty_exp.cpp3
-rw-r--r--src/lib/pubkey/ec_group/point_mul.cpp8
2 files changed, 5 insertions, 6 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)
{
diff --git a/src/lib/pubkey/ec_group/point_mul.cpp b/src/lib/pubkey/ec_group/point_mul.cpp
index 0124c70ef..760f060ce 100644
--- a/src/lib/pubkey/ec_group/point_mul.cpp
+++ b/src/lib/pubkey/ec_group/point_mul.cpp
@@ -255,11 +255,11 @@ PointGFp PointGFp_Var_Point_Precompute::mul(const BigInt& k,
clear_mem(e.data(), e.size());
for(size_t i = 1; i != window_elems; ++i)
{
- const word mask = CT::is_equal<word>(w, i);
+ const word wmask = CT::is_equal<word>(w, i);
for(size_t j = 0; j != elem_size; ++j)
{
- e[j] |= mask & m_T[i * elem_size + j];
+ e[j] |= wmask & m_T[i * elem_size + j];
}
}
@@ -282,10 +282,10 @@ PointGFp PointGFp_Var_Point_Precompute::mul(const BigInt& k,
clear_mem(e.data(), e.size());
for(size_t i = 1; i != window_elems; ++i)
{
- const word mask = CT::is_equal<word>(w, i);
+ const word wmask = CT::is_equal<word>(w, i);
for(size_t j = 0; j != elem_size; ++j)
- e[j] |= mask & m_T[i * elem_size + j];
+ e[j] |= wmask & m_T[i * elem_size + j];
}
R.add(&e[0], m_p_words, &e[m_p_words], m_p_words, &e[2*m_p_words], m_p_words, ws);