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

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

Tento commit je obsažen v:
John M. Schanck 2020-09-15 12:24:07 -04:00 odevzdal Kris Kwiatkowski
rodič fdd73d893c
revize 798a7ba86b
22 změnil soubory, kde provedl 72 přidání a 50 odebrání

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {

Zobrazit soubor

@ -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) {