zrcadlo
https://github.com/henrydcase/pqc.git
synchronizováno 2024-11-22 07:35:38 +00:00
astyle
Tento commit je obsažen v:
rodič
1ba4f503a7
revize
ff16fec435
@ -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;
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -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];
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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];
|
||||
|
@ -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];
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Načítá se…
Odkázat v novém úkolu
Zablokovat Uživatele