1
1
spogulis no https://github.com/henrydcase/pqc.git synced 2024-11-22 07:35:38 +00:00

mceliece, ntru, ntruprime: satisfy test_boolean (in int32_sort)"

Šī revīzija ir iekļauta:
John M. Schanck 2020-09-15 12:24:07 -04:00 revīziju iesūtīja Kris Kwiatkowski
vecāks fdd73d893c
revīzija 798a7ba86b
22 mainīti faili ar 72 papildinājumiem un 50 dzēšanām

Parādīt failu

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

Parādīt failu

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

Parādīt failu

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

Parādīt failu

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

Parādīt failu

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

Parādīt failu

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

Parādīt failu

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

Parādīt failu

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

Parādīt failu

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

Parādīt failu

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

Parādīt failu

@ -1,8 +1,8 @@
#include "crypto_sort_int32.h"
#include <immintrin.h>
// Based on supercop-20200820/crypto_sort/int32/avx2
#include "crypto_sort_int32.h"
#include <immintrin.h>
#define int32 int32_t
typedef __m256i int32x8;
@ -469,8 +469,11 @@ static void int32_sort_2power(int32 *x, size_t n, int flagdown) {
}
q = n >> 3;
flip = (p << 1 == q);
flipflip = !flip;
flip = 0;
if (p << 1 == q) {
flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) {

Parādīt failu

@ -1,11 +1,10 @@
#ifndef CRYPTO_SORT
#define CRYPTO_SORT
#include "params.h"
#include <stddef.h>
#include <stdint.h>
void PQCLEAN_NTRUHPS2048509_AVX2_crypto_sort_int32(int32_t *x, size_t n);
#endif

Parādīt failu

@ -1,8 +1,8 @@
#include "crypto_sort_int32.h"
#include <immintrin.h>
// Based on supercop-20200820/crypto_sort/int32/avx2
#include "crypto_sort_int32.h"
#include <immintrin.h>
#define int32 int32_t
typedef __m256i int32x8;
@ -469,8 +469,11 @@ static void int32_sort_2power(int32 *x, size_t n, int flagdown) {
}
q = n >> 3;
flip = (p << 1 == q);
flipflip = !flip;
flip = 0;
if (p << 1 == q) {
flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) {

Parādīt failu

@ -1,11 +1,10 @@
#ifndef CRYPTO_SORT
#define CRYPTO_SORT
#include "params.h"
#include <stddef.h>
#include <stdint.h>
void PQCLEAN_NTRUHPS2048677_AVX2_crypto_sort_int32(int32_t *x, size_t n);
#endif

Parādīt failu

@ -1,8 +1,8 @@
#include "crypto_sort_int32.h"
#include <immintrin.h>
// Based on supercop-20200820/crypto_sort/int32/avx2
#include "crypto_sort_int32.h"
#include <immintrin.h>
#define int32 int32_t
typedef __m256i int32x8;
@ -469,8 +469,11 @@ static void int32_sort_2power(int32 *x, size_t n, int flagdown) {
}
q = n >> 3;
flip = (p << 1 == q);
flipflip = !flip;
flip = 0;
if (p << 1 == q) {
flip = 1;
}
flipflip = 1 - flip;
for (j = 0; j < q; j += p + p) {
for (k = j; k < j + p + p; k += p) {
for (i = k; i < k + p; i += 8) {

Parādīt failu

@ -1,11 +1,10 @@
#ifndef CRYPTO_SORT
#define CRYPTO_SORT
#include "params.h"
#include <stddef.h>
#include <stdint.h>
void PQCLEAN_NTRUHPS4096821_AVX2_crypto_sort_int32(int32_t *x, size_t n);
#endif

Parādīt failu

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

Parādīt failu

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

Parādīt failu

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

Parādīt failu

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

Parādīt failu

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

Parādīt failu

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