This commit is contained in:
John M. Schanck 2020-09-15 17:23:57 -04:00 committed by Kris Kwiatkowski
parent 82ae2d3e34
commit 6154c0d7d3
28 changed files with 112 additions and 56 deletions

View File

@ -12,8 +12,10 @@
#include "params.h" #include "params.h"
static inline uint8_t min(uint8_t x, uint8_t y) { static inline uint8_t min(uint8_t x, uint8_t y) {
if (x < y) return x; if (x < y) {
return y; return x;
}
return y;
} }
uint16_t PQCLEAN_FRODOKEM1344AES_CLEAN_LE_TO_UINT16(uint16_t n) { uint16_t PQCLEAN_FRODOKEM1344AES_CLEAN_LE_TO_UINT16(uint16_t n) {

View File

@ -12,8 +12,10 @@
#include "params.h" #include "params.h"
static inline uint8_t min(uint8_t x, uint8_t y) { static inline uint8_t min(uint8_t x, uint8_t y) {
if (x < y) return x; if (x < y) {
return y; return x;
}
return y;
} }
uint16_t PQCLEAN_FRODOKEM1344AES_OPT_LE_TO_UINT16(uint16_t n) { uint16_t PQCLEAN_FRODOKEM1344AES_OPT_LE_TO_UINT16(uint16_t n) {

View File

@ -12,8 +12,10 @@
#include "params.h" #include "params.h"
static inline uint8_t min(uint8_t x, uint8_t y) { static inline uint8_t min(uint8_t x, uint8_t y) {
if (x < y) return x; if (x < y) {
return y; return x;
}
return y;
} }
uint16_t PQCLEAN_FRODOKEM1344SHAKE_CLEAN_LE_TO_UINT16(uint16_t n) { uint16_t PQCLEAN_FRODOKEM1344SHAKE_CLEAN_LE_TO_UINT16(uint16_t n) {

View File

@ -12,8 +12,10 @@
#include "params.h" #include "params.h"
static inline uint8_t min(uint8_t x, uint8_t y) { static inline uint8_t min(uint8_t x, uint8_t y) {
if (x < y) return x; if (x < y) {
return y; return x;
}
return y;
} }
uint16_t PQCLEAN_FRODOKEM1344SHAKE_OPT_LE_TO_UINT16(uint16_t n) { uint16_t PQCLEAN_FRODOKEM1344SHAKE_OPT_LE_TO_UINT16(uint16_t n) {

View File

@ -12,8 +12,10 @@
#include "params.h" #include "params.h"
static inline uint8_t min(uint8_t x, uint8_t y) { static inline uint8_t min(uint8_t x, uint8_t y) {
if (x < y) return x; if (x < y) {
return y; return x;
}
return y;
} }
uint16_t PQCLEAN_FRODOKEM640AES_CLEAN_LE_TO_UINT16(uint16_t n) { uint16_t PQCLEAN_FRODOKEM640AES_CLEAN_LE_TO_UINT16(uint16_t n) {

View File

@ -12,8 +12,10 @@
#include "params.h" #include "params.h"
static inline uint8_t min(uint8_t x, uint8_t y) { static inline uint8_t min(uint8_t x, uint8_t y) {
if (x < y) return x; if (x < y) {
return y; return x;
}
return y;
} }
uint16_t PQCLEAN_FRODOKEM640AES_OPT_LE_TO_UINT16(uint16_t n) { uint16_t PQCLEAN_FRODOKEM640AES_OPT_LE_TO_UINT16(uint16_t n) {

View File

@ -12,8 +12,10 @@
#include "params.h" #include "params.h"
static inline uint8_t min(uint8_t x, uint8_t y) { static inline uint8_t min(uint8_t x, uint8_t y) {
if (x < y) return x; if (x < y) {
return y; return x;
}
return y;
} }
uint16_t PQCLEAN_FRODOKEM640SHAKE_CLEAN_LE_TO_UINT16(uint16_t n) { uint16_t PQCLEAN_FRODOKEM640SHAKE_CLEAN_LE_TO_UINT16(uint16_t n) {

View File

@ -12,8 +12,10 @@
#include "params.h" #include "params.h"
static inline uint8_t min(uint8_t x, uint8_t y) { static inline uint8_t min(uint8_t x, uint8_t y) {
if (x < y) return x; if (x < y) {
return y; return x;
}
return y;
} }
uint16_t PQCLEAN_FRODOKEM640SHAKE_OPT_LE_TO_UINT16(uint16_t n) { uint16_t PQCLEAN_FRODOKEM640SHAKE_OPT_LE_TO_UINT16(uint16_t n) {

View File

@ -12,8 +12,10 @@
#include "params.h" #include "params.h"
static inline uint8_t min(uint8_t x, uint8_t y) { static inline uint8_t min(uint8_t x, uint8_t y) {
if (x < y) return x; if (x < y) {
return y; return x;
}
return y;
} }
uint16_t PQCLEAN_FRODOKEM976AES_CLEAN_LE_TO_UINT16(uint16_t n) { uint16_t PQCLEAN_FRODOKEM976AES_CLEAN_LE_TO_UINT16(uint16_t n) {

View File

@ -12,8 +12,10 @@
#include "params.h" #include "params.h"
static inline uint8_t min(uint8_t x, uint8_t y) { static inline uint8_t min(uint8_t x, uint8_t y) {
if (x < y) return x; if (x < y) {
return y; return x;
}
return y;
} }
uint16_t PQCLEAN_FRODOKEM976AES_OPT_LE_TO_UINT16(uint16_t n) { uint16_t PQCLEAN_FRODOKEM976AES_OPT_LE_TO_UINT16(uint16_t n) {

View File

@ -12,8 +12,10 @@
#include "params.h" #include "params.h"
static inline uint8_t min(uint8_t x, uint8_t y) { static inline uint8_t min(uint8_t x, uint8_t y) {
if (x < y) return x; if (x < y) {
return y; return x;
}
return y;
} }
uint16_t PQCLEAN_FRODOKEM976SHAKE_CLEAN_LE_TO_UINT16(uint16_t n) { uint16_t PQCLEAN_FRODOKEM976SHAKE_CLEAN_LE_TO_UINT16(uint16_t n) {

View File

@ -12,8 +12,10 @@
#include "params.h" #include "params.h"
static inline uint8_t min(uint8_t x, uint8_t y) { static inline uint8_t min(uint8_t x, uint8_t y) {
if (x < y) return x; if (x < y) {
return y; return x;
}
return y;
} }
uint16_t PQCLEAN_FRODOKEM976SHAKE_OPT_LE_TO_UINT16(uint16_t n) { uint16_t PQCLEAN_FRODOKEM976SHAKE_OPT_LE_TO_UINT16(uint16_t n) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, size_t n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, size_t n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, size_t n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, size_t n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, size_t n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, size_t n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, size_t n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, size_t n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, size_t n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, size_t n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, long long n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, long long n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, long long n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, long long n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, long long n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {

View File

@ -463,8 +463,10 @@ static void int32_sort_2power(int32 *x, long long n, int flagdown) {
q = n >> 3; q = n >> 3;
flip = 0; flip = 0;
if (p << 1 == q) flip = 1; if (p << 1 == q) {
flipflip = 1-flip; flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) { for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) { for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) { for (i = k; i < k + p; i += 8) {