aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-09-20 03:38:26 -0400
committerJack Lloyd <[email protected]>2017-09-20 03:38:26 -0400
commitf26eb881d648814163a82a2cc9e841fa55b6ce3b (patch)
tree59ecbec0ae8ec019ea4ce5ecf7e4fddba86e9235 /src/lib/pubkey
parent8731d4920fa8b17374a442d62c2d8c1c6d34967a (diff)
Avoid using double underscore in variable names
Reserved identifiers, per C++ standard GH #512 [ci skip]
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r--src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp6
-rw-r--r--src/lib/pubkey/mce/goppa_code.cpp12
-rw-r--r--src/lib/pubkey/mce/polyn_gf2m.cpp3
3 files changed, 10 insertions, 11 deletions
diff --git a/src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp b/src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp
index be2c5380e..1d35447fa 100644
--- a/src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp
+++ b/src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp
@@ -59,7 +59,7 @@ class gf2m_decomp_rootfind_state
* !! Attention: assumes gf2m is 16bit !!
*/
#if 0
-gf2m brootf_decomp__gray_to_lex(gf2m gray)
+gf2m brootf_decomp_gray_to_lex(gf2m gray)
{
static_assert(sizeof(gf2m) == 2, "Expected size");
gf2m result = gray ^ (gray>>8);
@@ -73,7 +73,7 @@ gf2m brootf_decomp__gray_to_lex(gf2m gray)
/**
* calculates ceil((t-4)/5) = outer_summands - 1
*/
-uint32_t brootf_decomp__calc_sum_limit(uint32_t t)
+uint32_t brootf_decomp_calc_sum_limit(uint32_t t)
{
uint32_t result;
if(t < 4)
@@ -112,7 +112,7 @@ gf2m_decomp_rootfind_state::gf2m_decomp_rootfind_state(const polyn_gf2m & polyn,
this->m_sigma_3_neq_0_mask = 0 ;
}
- this->m_outer_summands = 1 + brootf_decomp__calc_sum_limit(deg_sigma);
+ this->m_outer_summands = 1 + brootf_decomp_calc_sum_limit(deg_sigma);
this->m_Lik.resize(this->m_outer_summands * sp_field->get_extension_degree());
this->m_Aij.resize(this->m_outer_summands);
}
diff --git a/src/lib/pubkey/mce/goppa_code.cpp b/src/lib/pubkey/mce/goppa_code.cpp
index 97cdf947e..e28e3b9b0 100644
--- a/src/lib/pubkey/mce/goppa_code.cpp
+++ b/src/lib/pubkey/mce/goppa_code.cpp
@@ -48,9 +48,9 @@ secure_vector<gf2m> goppa_decode(const polyn_gf2m & syndrom_polyn,
std::shared_ptr<GF2m_Field> sp_field = g.get_sp_field();
- std::pair<polyn_gf2m, polyn_gf2m> h__aux = polyn_gf2m::eea_with_coefficients( syndrom_polyn, g, 1);
- polyn_gf2m & h = h__aux.first;
- polyn_gf2m & aux = h__aux.second;
+ std::pair<polyn_gf2m, polyn_gf2m> h_aux = polyn_gf2m::eea_with_coefficients( syndrom_polyn, g, 1);
+ polyn_gf2m & h = h_aux.first;
+ polyn_gf2m & aux = h_aux.second;
a = sp_field->gf_inv(aux.get_coef(0));
gf2m log_a = sp_field->gf_log(a);
for(int i = 0; i <= h.get_degree(); ++i)
@@ -83,9 +83,9 @@ secure_vector<gf2m> goppa_decode(const polyn_gf2m & syndrom_polyn,
S.get_degree();
- std::pair<polyn_gf2m, polyn_gf2m> v__u = polyn_gf2m::eea_with_coefficients(S, g, t/2+1);
- polyn_gf2m & u = v__u.second;
- polyn_gf2m & v = v__u.first;
+ std::pair<polyn_gf2m, polyn_gf2m> v_u = polyn_gf2m::eea_with_coefficients(S, g, t/2+1);
+ polyn_gf2m & u = v_u.second;
+ polyn_gf2m & v = v_u.first;
// sigma = u^2+z*v^2
polyn_gf2m sigma ( t , g.get_sp_field());
diff --git a/src/lib/pubkey/mce/polyn_gf2m.cpp b/src/lib/pubkey/mce/polyn_gf2m.cpp
index ba80f8d4a..2541c164f 100644
--- a/src/lib/pubkey/mce/polyn_gf2m.cpp
+++ b/src/lib/pubkey/mce/polyn_gf2m.cpp
@@ -321,7 +321,7 @@ std::vector<polyn_gf2m> polyn_gf2m::sqmod_init(const polyn_gf2m & g)
/*Modulo p square of a certain polynomial g, sq[] contains the square
Modulo g of the base canonical polynomials of degree < d, where d is
-the degree of G. The table sq[] will be calculated by polyn_gf2m__sqmod_init*/
+the degree of G. The table sq[] will be calculated by polyn_gf2m_sqmod_init*/
polyn_gf2m polyn_gf2m::sqmod( const std::vector<polyn_gf2m> & sq, int d)
{
int i, j;
@@ -531,7 +531,6 @@ std::pair<polyn_gf2m, polyn_gf2m> polyn_gf2m::eea_with_coefficients( const polyn
cond1 &= cond2;
}
/* expand cond1 to a full mask */
- //CSEC_MASK__GEN_MASK_16B(cond1, mask);
gf2m mask = generate_gf2m_mask(cond1);
fake_elem &= mask;
r0.patchup_deg_secure(trgt_deg, fake_elem);