diff --git a/crypto_kem/saber/clean/cbd.c b/crypto_kem/saber/clean/cbd.c index f5d02deb..9fb397cb 100644 --- a/crypto_kem/saber/clean/cbd.c +++ b/crypto_kem/saber/clean/cbd.c @@ -55,7 +55,7 @@ void PQCLEAN_SABER_CLEAN_cbd(uint16_t *r, const unsigned char *buf) { int i, j; for (i = 0; i < SABER_N / 4; i++) { - t = load_littleendian(buf + 4 * i, 4); + t = (uint32_t) load_littleendian(buf + 4 * i, 4); d = 0; for (j = 0; j < 4; j++) { d += (t >> j) & 0x11111111; diff --git a/crypto_kem/saber/clean/kem.c b/crypto_kem/saber/clean/kem.c index 5ee4a856..05ffde7c 100644 --- a/crypto_kem/saber/clean/kem.c +++ b/crypto_kem/saber/clean/kem.c @@ -47,7 +47,8 @@ int PQCLEAN_SABER_CLEAN_crypto_kem_enc(unsigned char *ct, unsigned char *ss, con int PQCLEAN_SABER_CLEAN_crypto_kem_dec(unsigned char *ss, const unsigned char *ct, const unsigned char *sk) { - int i, fail; + int i; + unsigned char fail; unsigned char cmp[SABER_BYTES_CCA_DEC]; unsigned char buf[64]; unsigned char kr[64]; // Will contain key, coins diff --git a/crypto_kem/saber/clean/poly.c b/crypto_kem/saber/clean/poly.c index 6004529d..98290e36 100644 --- a/crypto_kem/saber/clean/poly.c +++ b/crypto_kem/saber/clean/poly.c @@ -5,7 +5,7 @@ of "CRYSTALS – Kyber: a CCA-secure module-lattice-based KEM" by : Joppe Bos, Leo Ducas, Eike Kiltz, Tancrede Lepoint, Vadim Lyubashevsky, John M. Schanck, Peter Schwabe & Damien stehle ----------------------------------------------------------------------*/ -#include "api.h" +#include "SABER_params.h" #include "cbd.h" #include "fips202.h" #include "poly.h" diff --git a/crypto_kem/saber/clean/poly_mul.c b/crypto_kem/saber/clean/poly_mul.c index 60ff22de..541c5b35 100644 --- a/crypto_kem/saber/clean/poly_mul.c +++ b/crypto_kem/saber/clean/poly_mul.c @@ -1,7 +1,6 @@ #include "poly_mul.h" +#include "SABER_params.h" #include -#include -#include #include #define SCHB_N 16