diff --git a/crypto_kem/ledakemlt12/clean/gf2x_arith_mod_xPplusOne.c b/crypto_kem/ledakemlt12/clean/gf2x_arith_mod_xPplusOne.c index 7d2add83..a5adb29e 100644 --- a/crypto_kem/ledakemlt12/clean/gf2x_arith_mod_xPplusOne.c +++ b/crypto_kem/ledakemlt12/clean/gf2x_arith_mod_xPplusOne.c @@ -94,7 +94,7 @@ static void left_bit_shift_wide_n(const int length, DIGIT in[], unsigned int amo } static uint8_t byte_reverse_with_64bitDIGIT(uint8_t b) { - b = (b * 0x0202020202ULL & 0x010884422010ULL) % 1023; + b = (uint8_t)((b * 0x0202020202ULL & 0x010884422010ULL) % 1023); return b; } diff --git a/crypto_kem/ledakemlt12/clean/niederreiter.c b/crypto_kem/ledakemlt12/clean/niederreiter.c index e52a7077..07da2d30 100644 --- a/crypto_kem/ledakemlt12/clean/niederreiter.c +++ b/crypto_kem/ledakemlt12/clean/niederreiter.c @@ -28,8 +28,8 @@ void PQCLEAN_LEDAKEMLT12_CLEAN_niederreiter_keygen(publicKeyNiederreiter_t *pk, /*Rejection-sample for a full L*/ POSITION_T LPosOnes[N0][DV * M]; - int is_L_full; - int isDFRok; + int is_L_full = 0; + int isDFRok = 0; sk->rejections = (int8_t) 0; do { PQCLEAN_LEDAKEMLT12_CLEAN_generateHPosOnes_HtrPosOnes(HPosOnes,