Browse Source

Fix too-large shift in mceliece*f

kyber
Thom Wiggers 4 years ago
committed by Kris Kwiatkowski
parent
commit
fcd81030d6
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      crypto_kem/mceliece348864f/vec/pk_gen.c
  2. +1
    -1
      crypto_kem/mceliece460896f/vec/pk_gen.c

+ 1
- 1
crypto_kem/mceliece348864f/vec/pk_gen.c View File

@@ -57,7 +57,7 @@ static inline int ctz(uint64_t in) {
int i, b, m = 0, r = 0;

for (i = 0; i < 64; i++) {
b = ((int)in >> i) & 1;
b = ((int)(in >> i)) & 1;
m |= b;
r += (m ^ 1) & (b ^ 1);
}


+ 1
- 1
crypto_kem/mceliece460896f/vec/pk_gen.c View File

@@ -57,7 +57,7 @@ static inline int ctz(uint64_t in) {
int i, b, m = 0, r = 0;

for (i = 0; i < 64; i++) {
b = ((int)in >> i) & 1;
b = ((int)(in >> i)) & 1;
m |= b;
r += (m ^ 1) & (b ^ 1);
}


Loading…
Cancel
Save