aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/mce/code_based_key_gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey/mce/code_based_key_gen.cpp')
-rw-r--r--src/lib/pubkey/mce/code_based_key_gen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/pubkey/mce/code_based_key_gen.cpp b/src/lib/pubkey/mce/code_based_key_gen.cpp
index 7adf85112..a3749abef 100644
--- a/src/lib/pubkey/mce/code_based_key_gen.cpp
+++ b/src/lib/pubkey/mce/code_based_key_gen.cpp
@@ -156,7 +156,7 @@ McEliece_PrivateKey generate_mceliece_key( RandomNumberGenerator & rng, u32bit e
{
k = (l * ext_deg) / 32;
j = (l * ext_deg) % 32;
- sk[k] ^= F[i].get_coef( l) << j;
+ sk[k] ^= static_cast<u32bit>(F[i].get_coef(l)) << j;
if (j + ext_deg > 32)
{
sk[k + 1] ^= F[i].get_coef( l) >> (32 - j);