diff --git a/crypto_kem/frodokem1344aes/clean/matrix_aes.c b/crypto_kem/frodokem1344aes/clean/matrix_aes.c index 5647f3c1..645901b0 100644 --- a/crypto_kem/frodokem1344aes/clean/matrix_aes.c +++ b/crypto_kem/frodokem1344aes/clean/matrix_aes.c @@ -24,8 +24,8 @@ int PQCLEAN_FRODOKEM1344AES_CLEAN_mul_add_as_plus_e(uint16_t *out, const uint16_ aes128_keyexp(&ctx128, seed_A); for (i = 0; i < PARAMS_N; i++) { for (j = 0; j < PARAMS_N; j += PARAMS_STRIPE_STEP) { - A[i*PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order - A[i*PARAMS_N + j + 1] = (int16_t) j; + A[i * PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order + A[i * PARAMS_N + j + 1] = (int16_t) j; } } for (i = 0; i < PARAMS_N * PARAMS_N; i++) { @@ -64,8 +64,8 @@ int PQCLEAN_FRODOKEM1344AES_CLEAN_mul_add_sa_plus_e(uint16_t *out, const uint16_ aes128_keyexp(&ctx128, seed_A); for (i = 0; i < PARAMS_N; i++) { for (j = 0; j < PARAMS_N; j += PARAMS_STRIPE_STEP) { - A[i*PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order - A[i*PARAMS_N + j + 1] = (int16_t) j; + A[i * PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order + A[i * PARAMS_N + j + 1] = (int16_t) j; } } for (i = 0; i < PARAMS_N * PARAMS_N; i++) { diff --git a/crypto_kem/frodokem1344aes/clean/util.c b/crypto_kem/frodokem1344aes/clean/util.c index e900a858..e66409c7 100644 --- a/crypto_kem/frodokem1344aes/clean/util.c +++ b/crypto_kem/frodokem1344aes/clean/util.c @@ -13,7 +13,7 @@ #define min(x, y) (((x) < (y)) ? (x) : (y)) uint16_t PQCLEAN_FRODOKEM1344AES_CLEAN_LE_TO_UINT16(const uint16_t n) { - return (((uint8_t *) &(n))[0] | (((uint8_t *) &(n))[1] << 8)); + return (((uint8_t *) &n)[0] | (((uint8_t *) &n)[1] << 8)); } uint16_t PQCLEAN_FRODOKEM1344AES_CLEAN_UINT16_TO_LE(const uint16_t n) { diff --git a/crypto_kem/frodokem640aes/clean/matrix_aes.c b/crypto_kem/frodokem640aes/clean/matrix_aes.c index f3331e11..65344e3d 100644 --- a/crypto_kem/frodokem640aes/clean/matrix_aes.c +++ b/crypto_kem/frodokem640aes/clean/matrix_aes.c @@ -24,8 +24,8 @@ int PQCLEAN_FRODOKEM640AES_CLEAN_mul_add_as_plus_e(uint16_t *out, const uint16_t aes128_keyexp(&ctx128, seed_A); for (i = 0; i < PARAMS_N; i++) { for (j = 0; j < PARAMS_N; j += PARAMS_STRIPE_STEP) { - A[i*PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order - A[i*PARAMS_N + j + 1] = (int16_t) j; + A[i * PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order + A[i * PARAMS_N + j + 1] = (int16_t) j; } } for (i = 0; i < PARAMS_N * PARAMS_N; i++) { @@ -64,8 +64,8 @@ int PQCLEAN_FRODOKEM640AES_CLEAN_mul_add_sa_plus_e(uint16_t *out, const uint16_t aes128_keyexp(&ctx128, seed_A); for (i = 0; i < PARAMS_N; i++) { for (j = 0; j < PARAMS_N; j += PARAMS_STRIPE_STEP) { - A[i*PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order - A[i*PARAMS_N + j + 1] = (int16_t) j; + A[i * PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order + A[i * PARAMS_N + j + 1] = (int16_t) j; } } for (i = 0; i < PARAMS_N * PARAMS_N; i++) { diff --git a/crypto_kem/frodokem640aes/clean/util.c b/crypto_kem/frodokem640aes/clean/util.c index 4fec5624..d7567777 100644 --- a/crypto_kem/frodokem640aes/clean/util.c +++ b/crypto_kem/frodokem640aes/clean/util.c @@ -13,7 +13,7 @@ #define min(x, y) (((x) < (y)) ? (x) : (y)) uint16_t PQCLEAN_FRODOKEM640AES_CLEAN_LE_TO_UINT16(const uint16_t n) { - return (((uint8_t *) &(n))[0] | (((uint8_t *) &(n))[1] << 8)); + return (((uint8_t *) &n)[0] | (((uint8_t *) &n)[1] << 8)); } uint16_t PQCLEAN_FRODOKEM640AES_CLEAN_UINT16_TO_LE(const uint16_t n) { diff --git a/crypto_kem/frodokem976aes/clean/matrix_aes.c b/crypto_kem/frodokem976aes/clean/matrix_aes.c index 19236b46..2596fc25 100644 --- a/crypto_kem/frodokem976aes/clean/matrix_aes.c +++ b/crypto_kem/frodokem976aes/clean/matrix_aes.c @@ -24,8 +24,8 @@ int PQCLEAN_FRODOKEM976AES_CLEAN_mul_add_as_plus_e(uint16_t *out, const uint16_t aes128_keyexp(&ctx128, seed_A); for (i = 0; i < PARAMS_N; i++) { for (j = 0; j < PARAMS_N; j += PARAMS_STRIPE_STEP) { - A[i*PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order - A[i*PARAMS_N + j + 1] = (int16_t) j; + A[i * PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order + A[i * PARAMS_N + j + 1] = (int16_t) j; } } for (i = 0; i < PARAMS_N * PARAMS_N; i++) { @@ -64,8 +64,8 @@ int PQCLEAN_FRODOKEM976AES_CLEAN_mul_add_sa_plus_e(uint16_t *out, const uint16_t aes128_keyexp(&ctx128, seed_A); for (i = 0; i < PARAMS_N; i++) { for (j = 0; j < PARAMS_N; j += PARAMS_STRIPE_STEP) { - A[i*PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order - A[i*PARAMS_N + j + 1] = (int16_t) j; + A[i * PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order + A[i * PARAMS_N + j + 1] = (int16_t) j; } } for (i = 0; i < PARAMS_N * PARAMS_N; i++) { diff --git a/crypto_kem/frodokem976aes/clean/util.c b/crypto_kem/frodokem976aes/clean/util.c index 39516957..7c797e60 100644 --- a/crypto_kem/frodokem976aes/clean/util.c +++ b/crypto_kem/frodokem976aes/clean/util.c @@ -13,7 +13,7 @@ #define min(x, y) (((x) < (y)) ? (x) : (y)) uint16_t PQCLEAN_FRODOKEM976AES_CLEAN_LE_TO_UINT16(const uint16_t n) { - return (((uint8_t *) &(n))[0] | (((uint8_t *) &(n))[1] << 8)); + return (((uint8_t *) &n)[0] | (((uint8_t *) &n)[1] << 8)); } uint16_t PQCLEAN_FRODOKEM976AES_CLEAN_UINT16_TO_LE(const uint16_t n) {