mirror of
https://github.com/henrydcase/pqc.git
synced 2024-11-22 23:48:58 +00:00
Fix Windows compiler warnings and endianness
This commit is contained in:
parent
30c8661d82
commit
7e8bd90d8c
@ -24,10 +24,14 @@ 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] = i; // Loading values in the little-endian order
|
||||
A[i*PARAMS_N + j + 1] = 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++) {
|
||||
A[i] = PQCLEAN_FRODOKEM1344AES_CLEAN_UINT16_TO_LE(A[i]);
|
||||
}
|
||||
|
||||
aes128_ecb((uint8_t *) A, (uint8_t *) A, PARAMS_N * PARAMS_N * sizeof(int16_t) / AES_BLOCKBYTES, &ctx128);
|
||||
|
||||
for (i = 0; i < PARAMS_N * PARAMS_N; i++) {
|
||||
@ -60,10 +64,14 @@ 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] = i; // Loading values in the little-endian order
|
||||
A[i*PARAMS_N + j + 1] = 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++) {
|
||||
A[i] = PQCLEAN_FRODOKEM1344AES_CLEAN_UINT16_TO_LE(A[i]);
|
||||
}
|
||||
|
||||
aes128_ecb((uint8_t *) A, (uint8_t *) A, PARAMS_N * PARAMS_N * sizeof(int16_t) / AES_BLOCKBYTES, &ctx128);
|
||||
|
||||
for (i = 0; i < PARAMS_N * PARAMS_N; i++) {
|
||||
|
@ -24,10 +24,14 @@ 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] = i; // Loading values in the little-endian order
|
||||
A[i*PARAMS_N + j + 1] = 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++) {
|
||||
A[i] = PQCLEAN_FRODOKEM640AES_CLEAN_UINT16_TO_LE(A[i]);
|
||||
}
|
||||
|
||||
aes128_ecb((uint8_t *) A, (uint8_t *) A, PARAMS_N * PARAMS_N * sizeof(int16_t) / AES_BLOCKBYTES, &ctx128);
|
||||
|
||||
for (i = 0; i < PARAMS_N * PARAMS_N; i++) {
|
||||
@ -60,10 +64,14 @@ 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] = i; // Loading values in the little-endian order
|
||||
A[i*PARAMS_N + j + 1] = 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++) {
|
||||
A[i] = PQCLEAN_FRODOKEM640AES_CLEAN_UINT16_TO_LE(A[i]);
|
||||
}
|
||||
|
||||
aes128_ecb((uint8_t *) A, (uint8_t *) A, PARAMS_N * PARAMS_N * sizeof(int16_t) / AES_BLOCKBYTES, &ctx128);
|
||||
|
||||
for (i = 0; i < PARAMS_N * PARAMS_N; i++) {
|
||||
|
@ -24,10 +24,14 @@ 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] = i; // Loading values in the little-endian order
|
||||
A[i*PARAMS_N + j + 1] = 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++) {
|
||||
A[i] = PQCLEAN_FRODOKEM976AES_CLEAN_UINT16_TO_LE(A[i]);
|
||||
}
|
||||
|
||||
aes128_ecb((uint8_t *) A, (uint8_t *) A, PARAMS_N * PARAMS_N * sizeof(int16_t) / AES_BLOCKBYTES, &ctx128);
|
||||
|
||||
for (i = 0; i < PARAMS_N * PARAMS_N; i++) {
|
||||
@ -60,10 +64,14 @@ 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] = i; // Loading values in the little-endian order
|
||||
A[i*PARAMS_N + j + 1] = 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++) {
|
||||
A[i] = PQCLEAN_FRODOKEM976AES_CLEAN_UINT16_TO_LE(A[i]);
|
||||
}
|
||||
|
||||
aes128_ecb((uint8_t *) A, (uint8_t *) A, PARAMS_N * PARAMS_N * sizeof(int16_t) / AES_BLOCKBYTES, &ctx128);
|
||||
|
||||
for (i = 0; i < PARAMS_N * PARAMS_N; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user