Browse Source

Fix left shift overflow for MASK_N2

kyber
John M. Schanck 4 years ago
committed by Kris Kwiatkowski
parent
commit
2767acd007
4 changed files with 4 additions and 4 deletions
  1. +1
    -1
      crypto_kem/hqc-128/avx2/repetition.c
  2. +1
    -1
      crypto_kem/hqc-128/clean/repetition.c
  3. +1
    -1
      crypto_kem/hqc-192/avx2/repetition.c
  4. +1
    -1
      crypto_kem/hqc-192/clean/repetition.c

+ 1
- 1
crypto_kem/hqc-128/avx2/repetition.c View File

@@ -10,7 +10,7 @@
*/


#define MASK_N2 ((1UL << PARAM_N2) - 1)
#define MASK_N2 ((((uint64_t) 1) << PARAM_N2) - 1)

/**
* @brief Decoding the code words to a message using the repetition code


+ 1
- 1
crypto_kem/hqc-128/clean/repetition.c View File

@@ -8,7 +8,7 @@
* @brief Implementation of repetition codes
*/

#define MASK_N2 ((1UL << PARAM_N2) - 1)
#define MASK_N2 ((((uint64_t) 1) << PARAM_N2) - 1)

static inline int32_t popcount(uint64_t n);



+ 1
- 1
crypto_kem/hqc-192/avx2/repetition.c View File

@@ -10,7 +10,7 @@
*/


#define MASK_N2 ((1UL << PARAM_N2) - 1)
#define MASK_N2 ((((uint64_t) 1) << PARAM_N2) - 1)

/**
* @brief Decoding the code words to a message using the repetition code


+ 1
- 1
crypto_kem/hqc-192/clean/repetition.c View File

@@ -8,7 +8,7 @@
* @brief Implementation of repetition codes
*/

#define MASK_N2 ((1UL << PARAM_N2) - 1)
#define MASK_N2 ((((uint64_t) 1) << PARAM_N2) - 1)

static inline int32_t popcount(uint64_t n);



Loading…
Cancel
Save