diff --git a/crypto_kem/ledakemlt12/clean/niederreiter.c b/crypto_kem/ledakemlt12/clean/niederreiter.c index e78ef814..419a00c5 100644 --- a/crypto_kem/ledakemlt12/clean/niederreiter.c +++ b/crypto_kem/ledakemlt12/clean/niederreiter.c @@ -19,7 +19,7 @@ void PQCLEAN_LEDAKEMLT12_CLEAN_niederreiter_keygen(publicKeyNiederreiter_t *pk, DIGIT Ln0dense[NUM_DIGITS_GF2X_ELEMENT]; DIGIT Ln0Inv[NUM_DIGITS_GF2X_ELEMENT]; int is_L_full = 0; - uint8_t threshold; // threshold for round 2 + uint8_t threshold = (DV * M) / 2 + 1; // threshold for round 2 sk->rejections = (int8_t) 0; do { diff --git a/crypto_kem/ledakemlt32/clean/niederreiter.c b/crypto_kem/ledakemlt32/clean/niederreiter.c index 540151f7..1d67281c 100644 --- a/crypto_kem/ledakemlt32/clean/niederreiter.c +++ b/crypto_kem/ledakemlt32/clean/niederreiter.c @@ -19,7 +19,7 @@ void PQCLEAN_LEDAKEMLT32_CLEAN_niederreiter_keygen(publicKeyNiederreiter_t *pk, DIGIT Ln0dense[NUM_DIGITS_GF2X_ELEMENT]; DIGIT Ln0Inv[NUM_DIGITS_GF2X_ELEMENT]; int is_L_full = 0; - uint8_t threshold; // threshold for round 2 + uint8_t threshold = (DV * M) / 2 + 1; // threshold for round 2 sk->rejections = (int8_t) 0; do { diff --git a/crypto_kem/ledakemlt52/clean/niederreiter.c b/crypto_kem/ledakemlt52/clean/niederreiter.c index 03d5d84b..82fabcc5 100644 --- a/crypto_kem/ledakemlt52/clean/niederreiter.c +++ b/crypto_kem/ledakemlt52/clean/niederreiter.c @@ -19,7 +19,7 @@ void PQCLEAN_LEDAKEMLT52_CLEAN_niederreiter_keygen(publicKeyNiederreiter_t *pk, DIGIT Ln0dense[NUM_DIGITS_GF2X_ELEMENT]; DIGIT Ln0Inv[NUM_DIGITS_GF2X_ELEMENT]; int is_L_full = 0; - uint8_t threshold; // threshold for round 2 + uint8_t threshold = (DV * M) / 2 + 1; // threshold for round 2 sk->rejections = (int8_t) 0; do {