Browse Source

astyle

master
John M. Schanck 4 years ago
parent
commit
a7e44f79ac
29 changed files with 93 additions and 57 deletions
  1. +1
    -1
      crypto_sign/falcon-1024/clean/codec.c
  2. +2
    -2
      crypto_sign/falcon-1024/clean/fpr.h
  3. +17
    -11
      crypto_sign/falcon-1024/clean/keygen.c
  4. +4
    -4
      crypto_sign/falcon-1024/clean/sign.c
  5. +1
    -1
      crypto_sign/falcon-512/clean/codec.c
  6. +2
    -2
      crypto_sign/falcon-512/clean/fpr.h
  7. +17
    -11
      crypto_sign/falcon-512/clean/keygen.c
  8. +4
    -4
      crypto_sign/falcon-512/clean/sign.c
  9. +1
    -1
      crypto_sign/rainbowIIIc-classic/clean/blas_comm.c
  10. +1
    -1
      crypto_sign/rainbowIIIc-cyclic-compressed/clean/blas_comm.c
  11. +1
    -1
      crypto_sign/rainbowIIIc-cyclic/clean/blas_comm.c
  12. +1
    -1
      crypto_sign/rainbowIa-classic/clean/blas_comm.c
  13. +1
    -1
      crypto_sign/rainbowIa-cyclic-compressed/clean/blas_comm.c
  14. +1
    -1
      crypto_sign/rainbowIa-cyclic/clean/blas_comm.c
  15. +1
    -1
      crypto_sign/rainbowVc-classic/clean/blas_comm.c
  16. +1
    -1
      crypto_sign/rainbowVc-cyclic-compressed/clean/blas_comm.c
  17. +1
    -1
      crypto_sign/rainbowVc-cyclic/clean/blas_comm.c
  18. +3
    -1
      crypto_sign/sphincs-sha256-128f-robust/avx2/sha256avx.c
  19. +3
    -1
      crypto_sign/sphincs-sha256-128f-simple/avx2/sha256avx.c
  20. +3
    -1
      crypto_sign/sphincs-sha256-128s-robust/avx2/sha256avx.c
  21. +3
    -1
      crypto_sign/sphincs-sha256-128s-simple/avx2/sha256avx.c
  22. +3
    -1
      crypto_sign/sphincs-sha256-192f-robust/avx2/sha256avx.c
  23. +3
    -1
      crypto_sign/sphincs-sha256-192f-simple/avx2/sha256avx.c
  24. +3
    -1
      crypto_sign/sphincs-sha256-192s-robust/avx2/sha256avx.c
  25. +3
    -1
      crypto_sign/sphincs-sha256-192s-simple/avx2/sha256avx.c
  26. +3
    -1
      crypto_sign/sphincs-sha256-256f-robust/avx2/sha256avx.c
  27. +3
    -1
      crypto_sign/sphincs-sha256-256f-simple/avx2/sha256avx.c
  28. +3
    -1
      crypto_sign/sphincs-sha256-256s-robust/avx2/sha256avx.c
  29. +3
    -1
      crypto_sign/sphincs-sha256-256s-simple/avx2/sha256avx.c

+ 1
- 1
crypto_sign/falcon-1024/clean/codec.c View File

@@ -445,7 +445,7 @@ PQCLEAN_FALCON1024_CLEAN_comp_decode(
}
x[u] = (int16_t) m;
if (s) {
x[u] = (int16_t) -x[u];
x[u] = (int16_t) - x[u];
}
}
return v;


+ 2
- 2
crypto_sign/falcon-1024/clean/fpr.h View File

@@ -436,8 +436,8 @@ fpr_lt(fpr x, fpr y) {
*/
int cc0, cc1;

cc0 = (int)((*(int64_t *)&x - *(int64_t *)&y) >> 63) & 1;
cc1 = (int)((*(int64_t *)&y - *(int64_t *)&x) >> 63) & 1;
cc0 = (int)((*(int64_t *)&x - * (int64_t *)&y) >> 63) & 1;
cc1 = (int)((*(int64_t *)&y - * (int64_t *)&x) >> 63) & 1;
return cc0 ^ ((cc0 ^ cc1) & (int)((x & y) >> 63));
}



+ 17
- 11
crypto_sign/falcon-1024/clean/keygen.c View File

@@ -1903,9 +1903,9 @@ zint_add_scaled_mul_small(uint32_t *x, size_t xlen,
*/
v = u - sch;
if (v < ylen) {
wy = y[v];
wy = y[v];
} else {
wy = ysign;
wy = ysign;
}
wys = ((wy << scl) & 0x7FFFFFFF) | tw;
tw = wy >> (31 - scl);
@@ -1965,9 +1965,9 @@ zint_sub_scaled(uint32_t *x, size_t xlen,
*/
v = u - sch;
if (v < ylen) {
wy = y[v];
wy = y[v];
} else {
wy = ysign;
wy = ysign;
}
wys = ((wy << scl) & 0x7FFFFFFF) | tw;
tw = wy >> (31 - scl);
@@ -2656,16 +2656,18 @@ make_fg(uint32_t *data, const int8_t *f, const int8_t *g,
return;
}

if (depth == 0) return;
if (depth == 0) {
return;
}
if (depth == 1) {
make_fg_step(data, logn, 0, 0, out_ntt);
return;
make_fg_step(data, logn, 0, 0, out_ntt);
return;
}
make_fg_step(data, logn, 0, 0, 1);
for (d = 1; d+1 < depth; d ++) {
for (d = 1; d + 1 < depth; d ++) {
make_fg_step(data, logn - d, d, 1, 1);
}
make_fg_step(data, logn-depth+1, depth-1, 1, out_ntt);
make_fg_step(data, logn - depth + 1, depth - 1, 1, out_ntt);
}

/*
@@ -3043,7 +3045,9 @@ solve_NTRU_intermediate(unsigned logn_top,
* middle or the upper half of these top 10 words.
*/
rlen = slen;
if (rlen > 10) rlen = 10;
if (rlen > 10) {
rlen = 10;
}
poly_big_to_fp(rt3, ft + slen - rlen, rlen, slen, logn);
poly_big_to_fp(rt4, gt + slen - rlen, rlen, slen, logn);

@@ -3118,7 +3122,9 @@ solve_NTRU_intermediate(unsigned logn_top,
* scaling if the current length is more than 10 words.
*/
rlen = FGlen;
if (rlen > 10) rlen = 10;
if (rlen > 10) {
rlen = 10;
}
scale_FG = 31 * (int)(FGlen - rlen);
poly_big_to_fp(rt1, Ft + FGlen - rlen, rlen, llen, logn);
poly_big_to_fp(rt2, Gt + FGlen - rlen, rlen, llen, logn);


+ 4
- 4
crypto_sign/falcon-1024/clean/sign.c View File

@@ -1190,9 +1190,9 @@ PQCLEAN_FALCON1024_CLEAN_sign_tree(int16_t *sig, inner_shake256_context *rng,
* SHAKE context ('rng').
*/
if (logn == 10) {
spc.sigma_min = fpr_sigma_min_10;
spc.sigma_min = fpr_sigma_min_10;
} else {
spc.sigma_min = fpr_sigma_min_9;
spc.sigma_min = fpr_sigma_min_9;
}
PQCLEAN_FALCON1024_CLEAN_prng_init(&spc.p, rng);
samp = PQCLEAN_FALCON1024_CLEAN_sampler;
@@ -1237,9 +1237,9 @@ PQCLEAN_FALCON1024_CLEAN_sign_dyn(int16_t *sig, inner_shake256_context *rng,
* SHAKE context ('rng').
*/
if (logn == 10) {
spc.sigma_min = fpr_sigma_min_10;
spc.sigma_min = fpr_sigma_min_10;
} else {
spc.sigma_min = fpr_sigma_min_9;
spc.sigma_min = fpr_sigma_min_9;
}
PQCLEAN_FALCON1024_CLEAN_prng_init(&spc.p, rng);
samp = PQCLEAN_FALCON1024_CLEAN_sampler;


+ 1
- 1
crypto_sign/falcon-512/clean/codec.c View File

@@ -445,7 +445,7 @@ PQCLEAN_FALCON512_CLEAN_comp_decode(
}
x[u] = (int16_t) m;
if (s) {
x[u] = (int16_t) -x[u];
x[u] = (int16_t) - x[u];
}
}
return v;


+ 2
- 2
crypto_sign/falcon-512/clean/fpr.h View File

@@ -436,8 +436,8 @@ fpr_lt(fpr x, fpr y) {
*/
int cc0, cc1;

cc0 = (int)((*(int64_t *)&x - *(int64_t *)&y) >> 63) & 1;
cc1 = (int)((*(int64_t *)&y - *(int64_t *)&x) >> 63) & 1;
cc0 = (int)((*(int64_t *)&x - * (int64_t *)&y) >> 63) & 1;
cc1 = (int)((*(int64_t *)&y - * (int64_t *)&x) >> 63) & 1;
return cc0 ^ ((cc0 ^ cc1) & (int)((x & y) >> 63));
}



+ 17
- 11
crypto_sign/falcon-512/clean/keygen.c View File

@@ -1903,9 +1903,9 @@ zint_add_scaled_mul_small(uint32_t *x, size_t xlen,
*/
v = u - sch;
if (v < ylen) {
wy = y[v];
wy = y[v];
} else {
wy = ysign;
wy = ysign;
}
wys = ((wy << scl) & 0x7FFFFFFF) | tw;
tw = wy >> (31 - scl);
@@ -1965,9 +1965,9 @@ zint_sub_scaled(uint32_t *x, size_t xlen,
*/
v = u - sch;
if (v < ylen) {
wy = y[v];
wy = y[v];
} else {
wy = ysign;
wy = ysign;
}
wys = ((wy << scl) & 0x7FFFFFFF) | tw;
tw = wy >> (31 - scl);
@@ -2656,16 +2656,18 @@ make_fg(uint32_t *data, const int8_t *f, const int8_t *g,
return;
}

if (depth == 0) return;
if (depth == 0) {
return;
}
if (depth == 1) {
make_fg_step(data, logn, 0, 0, out_ntt);
return;
make_fg_step(data, logn, 0, 0, out_ntt);
return;
}
make_fg_step(data, logn, 0, 0, 1);
for (d = 1; d+1 < depth; d ++) {
for (d = 1; d + 1 < depth; d ++) {
make_fg_step(data, logn - d, d, 1, 1);
}
make_fg_step(data, logn-depth+1, depth-1, 1, out_ntt);
make_fg_step(data, logn - depth + 1, depth - 1, 1, out_ntt);
}

/*
@@ -3043,7 +3045,9 @@ solve_NTRU_intermediate(unsigned logn_top,
* middle or the upper half of these top 10 words.
*/
rlen = slen;
if (rlen > 10) rlen = 10;
if (rlen > 10) {
rlen = 10;
}
poly_big_to_fp(rt3, ft + slen - rlen, rlen, slen, logn);
poly_big_to_fp(rt4, gt + slen - rlen, rlen, slen, logn);

@@ -3118,7 +3122,9 @@ solve_NTRU_intermediate(unsigned logn_top,
* scaling if the current length is more than 10 words.
*/
rlen = FGlen;
if (rlen > 10) rlen = 10;
if (rlen > 10) {
rlen = 10;
}
scale_FG = 31 * (int)(FGlen - rlen);
poly_big_to_fp(rt1, Ft + FGlen - rlen, rlen, llen, logn);
poly_big_to_fp(rt2, Gt + FGlen - rlen, rlen, llen, logn);


+ 4
- 4
crypto_sign/falcon-512/clean/sign.c View File

@@ -1190,9 +1190,9 @@ PQCLEAN_FALCON512_CLEAN_sign_tree(int16_t *sig, inner_shake256_context *rng,
* SHAKE context ('rng').
*/
if (logn == 10) {
spc.sigma_min = fpr_sigma_min_10;
spc.sigma_min = fpr_sigma_min_10;
} else {
spc.sigma_min = fpr_sigma_min_9;
spc.sigma_min = fpr_sigma_min_9;
}
PQCLEAN_FALCON512_CLEAN_prng_init(&spc.p, rng);
samp = PQCLEAN_FALCON512_CLEAN_sampler;
@@ -1237,9 +1237,9 @@ PQCLEAN_FALCON512_CLEAN_sign_dyn(int16_t *sig, inner_shake256_context *rng,
* SHAKE context ('rng').
*/
if (logn == 10) {
spc.sigma_min = fpr_sigma_min_10;
spc.sigma_min = fpr_sigma_min_10;
} else {
spc.sigma_min = fpr_sigma_min_9;
spc.sigma_min = fpr_sigma_min_9;
}
PQCLEAN_FALCON512_CLEAN_prng_init(&spc.p, rng);
samp = PQCLEAN_FALCON512_CLEAN_sampler;


+ 1
- 1
crypto_sign/rainbowIIIc-classic/clean/blas_comm.c View File

@@ -72,7 +72,7 @@ static unsigned int gf256mat_gauss_elim_ref(uint8_t *mat, unsigned int h, unsign

for (unsigned int j = i + 1; j < h; j++) {
uint8_t *aj = mat + w * j;
PQCLEAN_RAINBOWIIICCLASSIC_CLEAN_gf256v_predicated_add(ai + skip_len_align4, 1^PQCLEAN_RAINBOWIIICCLASSIC_CLEAN_gf256_is_nonzero(ai[i]), aj + skip_len_align4, w - skip_len_align4);
PQCLEAN_RAINBOWIIICCLASSIC_CLEAN_gf256v_predicated_add(ai + skip_len_align4, 1 ^ PQCLEAN_RAINBOWIIICCLASSIC_CLEAN_gf256_is_nonzero(ai[i]), aj + skip_len_align4, w - skip_len_align4);
}
r8 &= PQCLEAN_RAINBOWIIICCLASSIC_CLEAN_gf256_is_nonzero(ai[i]);
uint8_t pivot = ai[i];


+ 1
- 1
crypto_sign/rainbowIIIc-cyclic-compressed/clean/blas_comm.c View File

@@ -72,7 +72,7 @@ static unsigned int gf256mat_gauss_elim_ref(uint8_t *mat, unsigned int h, unsign

for (unsigned int j = i + 1; j < h; j++) {
uint8_t *aj = mat + w * j;
PQCLEAN_RAINBOWIIICCYCLICCOMPRESSED_CLEAN_gf256v_predicated_add(ai + skip_len_align4, 1^PQCLEAN_RAINBOWIIICCYCLICCOMPRESSED_CLEAN_gf256_is_nonzero(ai[i]), aj + skip_len_align4, w - skip_len_align4);
PQCLEAN_RAINBOWIIICCYCLICCOMPRESSED_CLEAN_gf256v_predicated_add(ai + skip_len_align4, 1 ^ PQCLEAN_RAINBOWIIICCYCLICCOMPRESSED_CLEAN_gf256_is_nonzero(ai[i]), aj + skip_len_align4, w - skip_len_align4);
}
r8 &= PQCLEAN_RAINBOWIIICCYCLICCOMPRESSED_CLEAN_gf256_is_nonzero(ai[i]);
uint8_t pivot = ai[i];


+ 1
- 1
crypto_sign/rainbowIIIc-cyclic/clean/blas_comm.c View File

@@ -72,7 +72,7 @@ static unsigned int gf256mat_gauss_elim_ref(uint8_t *mat, unsigned int h, unsign

for (unsigned int j = i + 1; j < h; j++) {
uint8_t *aj = mat + w * j;
PQCLEAN_RAINBOWIIICCYCLIC_CLEAN_gf256v_predicated_add(ai + skip_len_align4, 1^PQCLEAN_RAINBOWIIICCYCLIC_CLEAN_gf256_is_nonzero(ai[i]), aj + skip_len_align4, w - skip_len_align4);
PQCLEAN_RAINBOWIIICCYCLIC_CLEAN_gf256v_predicated_add(ai + skip_len_align4, 1 ^ PQCLEAN_RAINBOWIIICCYCLIC_CLEAN_gf256_is_nonzero(ai[i]), aj + skip_len_align4, w - skip_len_align4);
}
r8 &= PQCLEAN_RAINBOWIIICCYCLIC_CLEAN_gf256_is_nonzero(ai[i]);
uint8_t pivot = ai[i];


+ 1
- 1
crypto_sign/rainbowIa-classic/clean/blas_comm.c View File

@@ -74,7 +74,7 @@ static unsigned int gf16mat_gauss_elim_ref(uint8_t *mat, unsigned int h, unsigne
uint8_t *ai = mat + n_w_byte * i;
for (unsigned int j = i + 1; j < h; j++) {
uint8_t *aj = mat + n_w_byte * j;
PQCLEAN_RAINBOWIACLASSIC_CLEAN_gf256v_predicated_add(ai + offset_byte, 1^PQCLEAN_RAINBOWIACLASSIC_CLEAN_gf16_is_nonzero(PQCLEAN_RAINBOWIACLASSIC_CLEAN_gf16v_get_ele(ai, i)), aj + offset_byte, n_w_byte - offset_byte);
PQCLEAN_RAINBOWIACLASSIC_CLEAN_gf256v_predicated_add(ai + offset_byte, 1 ^ PQCLEAN_RAINBOWIACLASSIC_CLEAN_gf16_is_nonzero(PQCLEAN_RAINBOWIACLASSIC_CLEAN_gf16v_get_ele(ai, i)), aj + offset_byte, n_w_byte - offset_byte);
}
uint8_t pivot = PQCLEAN_RAINBOWIACLASSIC_CLEAN_gf16v_get_ele(ai, i);
r8 &= PQCLEAN_RAINBOWIACLASSIC_CLEAN_gf16_is_nonzero(pivot);


+ 1
- 1
crypto_sign/rainbowIa-cyclic-compressed/clean/blas_comm.c View File

@@ -74,7 +74,7 @@ static unsigned int gf16mat_gauss_elim_ref(uint8_t *mat, unsigned int h, unsigne
uint8_t *ai = mat + n_w_byte * i;
for (unsigned int j = i + 1; j < h; j++) {
uint8_t *aj = mat + n_w_byte * j;
PQCLEAN_RAINBOWIACYCLICCOMPRESSED_CLEAN_gf256v_predicated_add(ai + offset_byte, 1^PQCLEAN_RAINBOWIACYCLICCOMPRESSED_CLEAN_gf16_is_nonzero(PQCLEAN_RAINBOWIACYCLICCOMPRESSED_CLEAN_gf16v_get_ele(ai, i)), aj + offset_byte, n_w_byte - offset_byte);
PQCLEAN_RAINBOWIACYCLICCOMPRESSED_CLEAN_gf256v_predicated_add(ai + offset_byte, 1 ^ PQCLEAN_RAINBOWIACYCLICCOMPRESSED_CLEAN_gf16_is_nonzero(PQCLEAN_RAINBOWIACYCLICCOMPRESSED_CLEAN_gf16v_get_ele(ai, i)), aj + offset_byte, n_w_byte - offset_byte);
}
uint8_t pivot = PQCLEAN_RAINBOWIACYCLICCOMPRESSED_CLEAN_gf16v_get_ele(ai, i);
r8 &= PQCLEAN_RAINBOWIACYCLICCOMPRESSED_CLEAN_gf16_is_nonzero(pivot);


+ 1
- 1
crypto_sign/rainbowIa-cyclic/clean/blas_comm.c View File

@@ -74,7 +74,7 @@ static unsigned int gf16mat_gauss_elim_ref(uint8_t *mat, unsigned int h, unsigne
uint8_t *ai = mat + n_w_byte * i;
for (unsigned int j = i + 1; j < h; j++) {
uint8_t *aj = mat + n_w_byte * j;
PQCLEAN_RAINBOWIACYCLIC_CLEAN_gf256v_predicated_add(ai + offset_byte, 1^PQCLEAN_RAINBOWIACYCLIC_CLEAN_gf16_is_nonzero(PQCLEAN_RAINBOWIACYCLIC_CLEAN_gf16v_get_ele(ai, i)), aj + offset_byte, n_w_byte - offset_byte);
PQCLEAN_RAINBOWIACYCLIC_CLEAN_gf256v_predicated_add(ai + offset_byte, 1 ^ PQCLEAN_RAINBOWIACYCLIC_CLEAN_gf16_is_nonzero(PQCLEAN_RAINBOWIACYCLIC_CLEAN_gf16v_get_ele(ai, i)), aj + offset_byte, n_w_byte - offset_byte);
}
uint8_t pivot = PQCLEAN_RAINBOWIACYCLIC_CLEAN_gf16v_get_ele(ai, i);
r8 &= PQCLEAN_RAINBOWIACYCLIC_CLEAN_gf16_is_nonzero(pivot);


+ 1
- 1
crypto_sign/rainbowVc-classic/clean/blas_comm.c View File

@@ -72,7 +72,7 @@ static unsigned int gf256mat_gauss_elim_ref(uint8_t *mat, unsigned int h, unsign

for (unsigned int j = i + 1; j < h; j++) {
uint8_t *aj = mat + w * j;
PQCLEAN_RAINBOWVCCLASSIC_CLEAN_gf256v_predicated_add(ai + skip_len_align4, 1^PQCLEAN_RAINBOWVCCLASSIC_CLEAN_gf256_is_nonzero(ai[i]), aj + skip_len_align4, w - skip_len_align4);
PQCLEAN_RAINBOWVCCLASSIC_CLEAN_gf256v_predicated_add(ai + skip_len_align4, 1 ^ PQCLEAN_RAINBOWVCCLASSIC_CLEAN_gf256_is_nonzero(ai[i]), aj + skip_len_align4, w - skip_len_align4);
}
r8 &= PQCLEAN_RAINBOWVCCLASSIC_CLEAN_gf256_is_nonzero(ai[i]);
uint8_t pivot = ai[i];


+ 1
- 1
crypto_sign/rainbowVc-cyclic-compressed/clean/blas_comm.c View File

@@ -72,7 +72,7 @@ static unsigned int gf256mat_gauss_elim_ref(uint8_t *mat, unsigned int h, unsign

for (unsigned int j = i + 1; j < h; j++) {
uint8_t *aj = mat + w * j;
PQCLEAN_RAINBOWVCCYCLICCOMPRESSED_CLEAN_gf256v_predicated_add(ai + skip_len_align4, 1^PQCLEAN_RAINBOWVCCYCLICCOMPRESSED_CLEAN_gf256_is_nonzero(ai[i]), aj + skip_len_align4, w - skip_len_align4);
PQCLEAN_RAINBOWVCCYCLICCOMPRESSED_CLEAN_gf256v_predicated_add(ai + skip_len_align4, 1 ^ PQCLEAN_RAINBOWVCCYCLICCOMPRESSED_CLEAN_gf256_is_nonzero(ai[i]), aj + skip_len_align4, w - skip_len_align4);
}
r8 &= PQCLEAN_RAINBOWVCCYCLICCOMPRESSED_CLEAN_gf256_is_nonzero(ai[i]);
uint8_t pivot = ai[i];


+ 1
- 1
crypto_sign/rainbowVc-cyclic/clean/blas_comm.c View File

@@ -72,7 +72,7 @@ static unsigned int gf256mat_gauss_elim_ref(uint8_t *mat, unsigned int h, unsign

for (unsigned int j = i + 1; j < h; j++) {
uint8_t *aj = mat + w * j;
PQCLEAN_RAINBOWVCCYCLIC_CLEAN_gf256v_predicated_add(ai + skip_len_align4, 1^PQCLEAN_RAINBOWVCCYCLIC_CLEAN_gf256_is_nonzero(ai[i]), aj + skip_len_align4, w - skip_len_align4);
PQCLEAN_RAINBOWVCCYCLIC_CLEAN_gf256v_predicated_add(ai + skip_len_align4, 1 ^ PQCLEAN_RAINBOWVCCYCLIC_CLEAN_gf256_is_nonzero(ai[i]), aj + skip_len_align4, w - skip_len_align4);
}
r8 &= PQCLEAN_RAINBOWVCCYCLIC_CLEAN_gf256_is_nonzero(ai[i]);
uint8_t pivot = ai[i];


+ 3
- 1
crypto_sign/sphincs-sha256-128f-robust/avx2/sha256avx.c View File

@@ -67,7 +67,9 @@ void PQCLEAN_SPHINCSSHA256128FROBUST_AVX2_sha256_update8x(sha256ctxx8 *ctx,

while (i < len) {
bytes_to_copy = len - i;
if (bytes_to_copy > 64) bytes_to_copy = 64;
if (bytes_to_copy > 64) {
bytes_to_copy = 64;
}
memcpy(&ctx->msgblocks[64 * 0], d0 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 1], d1 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 2], d2 + i, bytes_to_copy);


+ 3
- 1
crypto_sign/sphincs-sha256-128f-simple/avx2/sha256avx.c View File

@@ -67,7 +67,9 @@ void PQCLEAN_SPHINCSSHA256128FSIMPLE_AVX2_sha256_update8x(sha256ctxx8 *ctx,

while (i < len) {
bytes_to_copy = len - i;
if (bytes_to_copy > 64) bytes_to_copy = 64;
if (bytes_to_copy > 64) {
bytes_to_copy = 64;
}
memcpy(&ctx->msgblocks[64 * 0], d0 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 1], d1 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 2], d2 + i, bytes_to_copy);


+ 3
- 1
crypto_sign/sphincs-sha256-128s-robust/avx2/sha256avx.c View File

@@ -67,7 +67,9 @@ void PQCLEAN_SPHINCSSHA256128SROBUST_AVX2_sha256_update8x(sha256ctxx8 *ctx,

while (i < len) {
bytes_to_copy = len - i;
if (bytes_to_copy > 64) bytes_to_copy = 64;
if (bytes_to_copy > 64) {
bytes_to_copy = 64;
}
memcpy(&ctx->msgblocks[64 * 0], d0 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 1], d1 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 2], d2 + i, bytes_to_copy);


+ 3
- 1
crypto_sign/sphincs-sha256-128s-simple/avx2/sha256avx.c View File

@@ -67,7 +67,9 @@ void PQCLEAN_SPHINCSSHA256128SSIMPLE_AVX2_sha256_update8x(sha256ctxx8 *ctx,

while (i < len) {
bytes_to_copy = len - i;
if (bytes_to_copy > 64) bytes_to_copy = 64;
if (bytes_to_copy > 64) {
bytes_to_copy = 64;
}
memcpy(&ctx->msgblocks[64 * 0], d0 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 1], d1 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 2], d2 + i, bytes_to_copy);


+ 3
- 1
crypto_sign/sphincs-sha256-192f-robust/avx2/sha256avx.c View File

@@ -67,7 +67,9 @@ void PQCLEAN_SPHINCSSHA256192FROBUST_AVX2_sha256_update8x(sha256ctxx8 *ctx,

while (i < len) {
bytes_to_copy = len - i;
if (bytes_to_copy > 64) bytes_to_copy = 64;
if (bytes_to_copy > 64) {
bytes_to_copy = 64;
}
memcpy(&ctx->msgblocks[64 * 0], d0 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 1], d1 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 2], d2 + i, bytes_to_copy);


+ 3
- 1
crypto_sign/sphincs-sha256-192f-simple/avx2/sha256avx.c View File

@@ -67,7 +67,9 @@ void PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_sha256_update8x(sha256ctxx8 *ctx,

while (i < len) {
bytes_to_copy = len - i;
if (bytes_to_copy > 64) bytes_to_copy = 64;
if (bytes_to_copy > 64) {
bytes_to_copy = 64;
}
memcpy(&ctx->msgblocks[64 * 0], d0 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 1], d1 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 2], d2 + i, bytes_to_copy);


+ 3
- 1
crypto_sign/sphincs-sha256-192s-robust/avx2/sha256avx.c View File

@@ -67,7 +67,9 @@ void PQCLEAN_SPHINCSSHA256192SROBUST_AVX2_sha256_update8x(sha256ctxx8 *ctx,

while (i < len) {
bytes_to_copy = len - i;
if (bytes_to_copy > 64) bytes_to_copy = 64;
if (bytes_to_copy > 64) {
bytes_to_copy = 64;
}
memcpy(&ctx->msgblocks[64 * 0], d0 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 1], d1 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 2], d2 + i, bytes_to_copy);


+ 3
- 1
crypto_sign/sphincs-sha256-192s-simple/avx2/sha256avx.c View File

@@ -67,7 +67,9 @@ void PQCLEAN_SPHINCSSHA256192SSIMPLE_AVX2_sha256_update8x(sha256ctxx8 *ctx,

while (i < len) {
bytes_to_copy = len - i;
if (bytes_to_copy > 64) bytes_to_copy = 64;
if (bytes_to_copy > 64) {
bytes_to_copy = 64;
}
memcpy(&ctx->msgblocks[64 * 0], d0 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 1], d1 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 2], d2 + i, bytes_to_copy);


+ 3
- 1
crypto_sign/sphincs-sha256-256f-robust/avx2/sha256avx.c View File

@@ -67,7 +67,9 @@ void PQCLEAN_SPHINCSSHA256256FROBUST_AVX2_sha256_update8x(sha256ctxx8 *ctx,

while (i < len) {
bytes_to_copy = len - i;
if (bytes_to_copy > 64) bytes_to_copy = 64;
if (bytes_to_copy > 64) {
bytes_to_copy = 64;
}
memcpy(&ctx->msgblocks[64 * 0], d0 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 1], d1 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 2], d2 + i, bytes_to_copy);


+ 3
- 1
crypto_sign/sphincs-sha256-256f-simple/avx2/sha256avx.c View File

@@ -67,7 +67,9 @@ void PQCLEAN_SPHINCSSHA256256FSIMPLE_AVX2_sha256_update8x(sha256ctxx8 *ctx,

while (i < len) {
bytes_to_copy = len - i;
if (bytes_to_copy > 64) bytes_to_copy = 64;
if (bytes_to_copy > 64) {
bytes_to_copy = 64;
}
memcpy(&ctx->msgblocks[64 * 0], d0 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 1], d1 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 2], d2 + i, bytes_to_copy);


+ 3
- 1
crypto_sign/sphincs-sha256-256s-robust/avx2/sha256avx.c View File

@@ -67,7 +67,9 @@ void PQCLEAN_SPHINCSSHA256256SROBUST_AVX2_sha256_update8x(sha256ctxx8 *ctx,

while (i < len) {
bytes_to_copy = len - i;
if (bytes_to_copy > 64) bytes_to_copy = 64;
if (bytes_to_copy > 64) {
bytes_to_copy = 64;
}
memcpy(&ctx->msgblocks[64 * 0], d0 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 1], d1 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 2], d2 + i, bytes_to_copy);


+ 3
- 1
crypto_sign/sphincs-sha256-256s-simple/avx2/sha256avx.c View File

@@ -67,7 +67,9 @@ void PQCLEAN_SPHINCSSHA256256SSIMPLE_AVX2_sha256_update8x(sha256ctxx8 *ctx,

while (i < len) {
bytes_to_copy = len - i;
if (bytes_to_copy > 64) bytes_to_copy = 64;
if (bytes_to_copy > 64) {
bytes_to_copy = 64;
}
memcpy(&ctx->msgblocks[64 * 0], d0 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 1], d1 + i, bytes_to_copy);
memcpy(&ctx->msgblocks[64 * 2], d2 + i, bytes_to_copy);


Loading…
Cancel
Save