aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/mce/mceliece_key.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-09-03 14:47:40 -0400
committerJack Lloyd <[email protected]>2017-09-03 14:47:40 -0400
commit79480d1d8ee2acb604b8b8aa1daf37f7abfa73c4 (patch)
treeac7c7d43c0cae8754c37fac66a9b7c04ee0f11f6 /src/lib/pubkey/mce/mceliece_key.cpp
parent776e1a2f80c03bedf94a6a7665680c0d794f1073 (diff)
Avoid g_ prefix on local variable
Reserving it for globals so they are easy to grep for
Diffstat (limited to 'src/lib/pubkey/mce/mceliece_key.cpp')
-rw-r--r--src/lib/pubkey/mce/mceliece_key.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/pubkey/mce/mceliece_key.cpp b/src/lib/pubkey/mce/mceliece_key.cpp
index 4c7eb6670..24a6420f2 100644
--- a/src/lib/pubkey/mce/mceliece_key.cpp
+++ b/src/lib/pubkey/mce/mceliece_key.cpp
@@ -165,7 +165,7 @@ bool McEliece_PrivateKey::check_key(RandomNumberGenerator& rng, bool) const
McEliece_PrivateKey::McEliece_PrivateKey(const secure_vector<uint8_t>& key_bits)
{
size_t n, t;
- secure_vector<uint8_t> g_enc;
+ secure_vector<uint8_t> enc_g;
BER_Decoder dec_base(key_bits);
BER_Decoder dec = dec_base.start_cons(SEQUENCE)
.start_cons(SEQUENCE)
@@ -173,7 +173,7 @@ McEliece_PrivateKey::McEliece_PrivateKey(const secure_vector<uint8_t>& key_bits)
.decode(t)
.end_cons()
.decode(m_public_matrix, OCTET_STRING)
- .decode(g_enc, OCTET_STRING);
+ .decode(enc_g, OCTET_STRING);
if(t == 0 || n == 0)
throw Decoding_Error("invalid McEliece parameters");
@@ -185,7 +185,7 @@ McEliece_PrivateKey::McEliece_PrivateKey(const secure_vector<uint8_t>& key_bits)
m_dimension = (n - m_codimension);
std::shared_ptr<GF2m_Field> sp_field(new GF2m_Field(ext_deg));
- m_g = polyn_gf2m(g_enc, sp_field);
+ m_g = polyn_gf2m(enc_g, sp_field);
if(m_g.get_degree() != static_cast<int>(t))
{
throw Decoding_Error("degree of decoded Goppa polynomial is incorrect");