aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/mce
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey/mce')
-rw-r--r--src/lib/pubkey/mce/gf2m_small_m.cpp4
-rw-r--r--src/lib/pubkey/mce/goppa_code.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/pubkey/mce/gf2m_small_m.cpp b/src/lib/pubkey/mce/gf2m_small_m.cpp
index 11da30962..f427ab4f3 100644
--- a/src/lib/pubkey/mce/gf2m_small_m.cpp
+++ b/src/lib/pubkey/mce/gf2m_small_m.cpp
@@ -59,7 +59,7 @@ const std::vector<gf2m>& exp_table(size_t deg)
static std::vector<gf2m> tabs[MAX_EXT_DEG + 1];
if(deg < 2 || deg > MAX_EXT_DEG)
- throw std::runtime_error("GF2m_Field does not support degree " + std::to_string(deg));
+ throw Exception("GF2m_Field does not support degree " + std::to_string(deg));
if(tabs[deg].empty())
tabs[deg] = gf_exp_table(deg, prim_poly[deg]);
@@ -84,7 +84,7 @@ const std::vector<gf2m>& log_table(size_t deg)
static std::vector<gf2m> tabs[MAX_EXT_DEG + 1];
if(deg < 2 || deg > MAX_EXT_DEG)
- throw std::runtime_error("GF2m_Field does not support degree " + std::to_string(deg));
+ throw Exception("GF2m_Field does not support degree " + std::to_string(deg));
if(tabs[deg].empty())
tabs[deg] = gf_log_table(deg, exp_table(deg));
diff --git a/src/lib/pubkey/mce/goppa_code.cpp b/src/lib/pubkey/mce/goppa_code.cpp
index 637b8175a..02908aa4f 100644
--- a/src/lib/pubkey/mce/goppa_code.cpp
+++ b/src/lib/pubkey/mce/goppa_code.cpp
@@ -147,7 +147,7 @@ void mceliece_decrypt(
{
if(pos > code_length)
{
- throw std::invalid_argument("error position larger than code size");
+ throw Invalid_Argument("error position larger than code size");
}
result[pos / 8] |= (1 << (pos % 8));
}