aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2016-02-18 15:54:37 +0100
committerRenĂ© Korthaus <[email protected]>2016-02-18 16:13:55 +0100
commit3a8dcbed75892ee63d73e9f9310f811e6267e504 (patch)
tree7553c5eb2936898d65b89b2407d016306d257dd1 /src/lib/pubkey
parent0c76098cbaa8002fb89756d6fa2b02359f3f5f88 (diff)
Fix remaining Wshadow warnings and enable on gcc and clang
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r--src/lib/pubkey/curve25519/donna.cpp6
-rw-r--r--src/lib/pubkey/mce/polyn_gf2m.cpp12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/pubkey/curve25519/donna.cpp b/src/lib/pubkey/curve25519/donna.cpp
index 78966f745..9b28e412c 100644
--- a/src/lib/pubkey/curve25519/donna.cpp
+++ b/src/lib/pubkey/curve25519/donna.cpp
@@ -350,9 +350,9 @@ cmult(limb *resultx, limb *resultz, const u8 *n, const limb *q) {
copy_mem(nqpqx, q, 5);
for (i = 0; i < 32; ++i) {
- u8 byte = n[31 - i];
+ u8 byteval = n[31 - i];
for (j = 0; j < 8; ++j) {
- const limb bit = byte >> 7;
+ const limb bit = byteval >> 7;
swap_conditional(nqx, nqpqx, bit);
swap_conditional(nqz, nqpqz, bit);
@@ -377,7 +377,7 @@ cmult(limb *resultx, limb *resultz, const u8 *n, const limb *q) {
nqpqz = nqpqz2;
nqpqz2 = t;
- byte <<= 1;
+ byteval <<= 1;
}
}
diff --git a/src/lib/pubkey/mce/polyn_gf2m.cpp b/src/lib/pubkey/mce/polyn_gf2m.cpp
index 01a62da7d..a957b8cc1 100644
--- a/src/lib/pubkey/mce/polyn_gf2m.cpp
+++ b/src/lib/pubkey/mce/polyn_gf2m.cpp
@@ -647,16 +647,16 @@ polyn_gf2m::polyn_gf2m(int t, Botan::RandomNumberGenerator& rng, std::shared_ptr
int i;
(*this).set_coef( t, 1);
i = 0;
- int m_deg;
+ int degree = 0;
do
{
for (i = 0; i < t; ++i)
{
(*this).set_coef( i, random_code_element(sp_field->get_cardinality(), rng));
}
- polyn_gf2m::degppf(*this, &m_deg);
+ polyn_gf2m::degppf(*this, &degree);
}
- while (m_deg < t);
+ while (degree < t);
}
@@ -666,15 +666,15 @@ void polyn_gf2m::poly_shiftmod( const polyn_gf2m & g)
{
throw Invalid_Argument("shiftmod cannot be called on polynomials of degree 1 or less");
}
- std::shared_ptr<GF2m_Field> msp_field = g.msp_field;
+ std::shared_ptr<GF2m_Field> field = g.msp_field;
int t = g.get_degree();
- gf2m a = msp_field->gf_div(this->coeff[t-1], g.coeff[t]);
+ gf2m a = field->gf_div(this->coeff[t-1], g.coeff[t]);
for (int i = t - 1; i > 0; --i)
{
this->coeff[i] = this->coeff[i - 1] ^ this->msp_field->gf_mul(a, g.coeff[i]);
}
- this->coeff[0] = msp_field->gf_mul(a, g.coeff[0]);
+ this->coeff[0] = field->gf_mul(a, g.coeff[0]);
}
std::vector<polyn_gf2m> polyn_gf2m::sqrt_mod_init(const polyn_gf2m & g)