NTRU Prime: More changes for MS compiler
This commit is contained in:
parent
565cd17478
commit
09d3f1e1e6
@ -282,5 +282,5 @@ void PQCLEAN_NTRULPR653_AVX2_crypto_encode_653x1541(unsigned char *out, const vo
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -284,5 +284,5 @@ void PQCLEAN_NTRULPR653_AVX2_crypto_encode_653x1541round(unsigned char *out, con
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ static Fq Fq_bigfreeze(uint32 x) {
|
|||||||
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
||||||
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
||||||
x -= q;
|
x -= q;
|
||||||
x += (-(x >> 31)) & (uint32)q;
|
x += (~(x >> 31) + 1) & (uint32)q;
|
||||||
return (Fq) x;
|
return (Fq) x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ static void uint32_divmod_uint14(uint32 *q, uint16 *r, uint32 x, uint16 m) {
|
|||||||
|
|
||||||
x -= m;
|
x -= m;
|
||||||
*q += 1;
|
*q += 1;
|
||||||
mask = -(x >> 31);
|
mask = (~(x >> 31) + 1);
|
||||||
x += mask & (uint32)m;
|
x += mask & (uint32)m;
|
||||||
*q += mask;
|
*q += mask;
|
||||||
/* x < m */
|
/* x < m */
|
||||||
|
@ -123,5 +123,5 @@ void PQCLEAN_NTRULPR653_CLEAN_crypto_encode_653x1541(unsigned char *out, const v
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ static Fq Fq_bigfreeze(uint32 x) {
|
|||||||
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
||||||
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
||||||
x -= q;
|
x -= q;
|
||||||
x += (-(x >> 31)) & (uint32)q;
|
x += (~(x >> 31) + 1) & (uint32)q;
|
||||||
return (Fq) x;
|
return (Fq) x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,5 +297,5 @@ void PQCLEAN_NTRULPR761_AVX2_crypto_encode_761x1531(unsigned char *out, const vo
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,5 @@ void PQCLEAN_NTRULPR761_AVX2_crypto_encode_761x1531round(unsigned char *out, con
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ static Fq Fq_bigfreeze(uint32 x) {
|
|||||||
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
||||||
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
||||||
x -= q;
|
x -= q;
|
||||||
x += (-(x >> 31)) & (uint32)q;
|
x += (~(x >> 31) + 1) & (uint32)q;
|
||||||
return (Fq) x;
|
return (Fq) x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ static void uint32_divmod_uint14(uint32 *q, uint16 *r, uint32 x, uint16 m) {
|
|||||||
|
|
||||||
x -= m;
|
x -= m;
|
||||||
*q += 1;
|
*q += 1;
|
||||||
mask = -(x >> 31);
|
mask = (~(x >> 31) + 1);
|
||||||
x += mask & (uint32)m;
|
x += mask & (uint32)m;
|
||||||
*q += mask;
|
*q += mask;
|
||||||
/* x < m */
|
/* x < m */
|
||||||
|
@ -115,5 +115,5 @@ void PQCLEAN_NTRULPR761_CLEAN_crypto_encode_761x1531(unsigned char *out, const v
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ static Fq Fq_bigfreeze(uint32 x) {
|
|||||||
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
||||||
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
||||||
x -= q;
|
x -= q;
|
||||||
x += (-(x >> 31)) & (uint32)q;
|
x += (~(x >> 31) + 1) & (uint32)q;
|
||||||
return (Fq) x;
|
return (Fq) x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,5 +279,5 @@ void PQCLEAN_NTRULPR857_AVX2_crypto_encode_857x1723(unsigned char *out, const vo
|
|||||||
R[0] = (uint16) r2;
|
R[0] = (uint16) r2;
|
||||||
|
|
||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -281,5 +281,5 @@ void PQCLEAN_NTRULPR857_AVX2_crypto_encode_857x1723round(unsigned char *out, con
|
|||||||
R[0] = (uint16) r2;
|
R[0] = (uint16) r2;
|
||||||
|
|
||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ static Fq Fq_bigfreeze(uint32 x) {
|
|||||||
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
||||||
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
||||||
x -= q;
|
x -= q;
|
||||||
x += (-(x >> 31)) & (uint32)q;
|
x += (~(x >> 31) + 1) & (uint32)q;
|
||||||
return (Fq) x;
|
return (Fq) x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ static void uint32_divmod_uint14(uint32 *q, uint16 *r, uint32 x, uint16 m) {
|
|||||||
|
|
||||||
x -= m;
|
x -= m;
|
||||||
*q += 1;
|
*q += 1;
|
||||||
mask = -(x >> 31);
|
mask = (~(x >> 31) + 1);
|
||||||
x += mask & (uint32)m;
|
x += mask & (uint32)m;
|
||||||
*q += mask;
|
*q += mask;
|
||||||
/* x < m */
|
/* x < m */
|
||||||
|
@ -126,5 +126,5 @@ void PQCLEAN_NTRULPR857_CLEAN_crypto_encode_857x1723(unsigned char *out, const v
|
|||||||
R[0] = (uint16) r2;
|
R[0] = (uint16) r2;
|
||||||
|
|
||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ static Fq Fq_bigfreeze(uint32 x) {
|
|||||||
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
||||||
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
x -= (uint32) (q * ((x * (uint64)q31) >> 31));
|
||||||
x -= q;
|
x -= q;
|
||||||
x += (-(x >> 31)) & (uint32)q;
|
x += (~(x >> 31) + 1) & (uint32)q;
|
||||||
return (Fq) x;
|
return (Fq) x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,5 +282,5 @@ void PQCLEAN_SNTRUP653_AVX2_crypto_encode_653x1541(unsigned char *out, const voi
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -284,5 +284,5 @@ void PQCLEAN_SNTRUP653_AVX2_crypto_encode_653x1541round(unsigned char *out, cons
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ void PQCLEAN_SNTRUP653_AVX2_crypto_encode_653x4621(unsigned char *out, const voi
|
|||||||
writing += 16;
|
writing += 16;
|
||||||
out += 32;
|
out += 32;
|
||||||
}
|
}
|
||||||
R[326] = ((R0[652] + 2310) & 16383);
|
R[326] = (uint16) (((R0[652] + 2310) & 16383));
|
||||||
|
|
||||||
reading = (uint16 *) R;
|
reading = (uint16 *) R;
|
||||||
writing = R;
|
writing = R;
|
||||||
@ -284,5 +284,5 @@ void PQCLEAN_SNTRUP653_AVX2_crypto_encode_653x4621(unsigned char *out, const voi
|
|||||||
R[0] = (uint16) r2;
|
R[0] = (uint16) r2;
|
||||||
|
|
||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ static void uint32_divmod_uint14(uint32 *q, uint16 *r, uint32 x, uint16 m) {
|
|||||||
|
|
||||||
x -= m;
|
x -= m;
|
||||||
*q += 1;
|
*q += 1;
|
||||||
mask = -(x >> 31);
|
mask = (~(x >> 31) + 1);
|
||||||
x += mask & (uint32)m;
|
x += mask & (uint32)m;
|
||||||
*q += mask;
|
*q += mask;
|
||||||
/* x < m */
|
/* x < m */
|
||||||
|
@ -54,7 +54,7 @@ static void uint32_divmod_uint14(uint32 *q, uint16 *r, uint32 x, uint16 m) {
|
|||||||
|
|
||||||
x -= m;
|
x -= m;
|
||||||
*q += 1;
|
*q += 1;
|
||||||
mask = -(x >> 31);
|
mask = (~(x >> 31) + 1);
|
||||||
x += mask & (uint32)m;
|
x += mask & (uint32)m;
|
||||||
*q += mask;
|
*q += mask;
|
||||||
/* x < m */
|
/* x < m */
|
||||||
|
@ -123,5 +123,5 @@ void PQCLEAN_SNTRUP653_CLEAN_crypto_encode_653x1541(unsigned char *out, const vo
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@ void PQCLEAN_SNTRUP653_CLEAN_crypto_encode_653x4621(unsigned char *out, const vo
|
|||||||
uint32 r2;
|
uint32 r2;
|
||||||
|
|
||||||
for (i = 0; i < 326; ++i) {
|
for (i = 0; i < 326; ++i) {
|
||||||
r0 = (R0[2 * i] + 2310) & 16383;
|
r0 = (uint16) ((R0[2 * i] + 2310) & 16383);
|
||||||
r1 = (R0[2 * i + 1] + 2310) & 16383;
|
r1 = (uint16) ((R0[2 * i + 1] + 2310) & 16383);
|
||||||
r2 = r0 + r1 * (uint32)4621;
|
r2 = r0 + r1 * (uint32)4621;
|
||||||
*out++ = (unsigned char) r2;
|
*out++ = (unsigned char) r2;
|
||||||
r2 >>= 8;
|
r2 >>= 8;
|
||||||
@ -24,7 +24,7 @@ void PQCLEAN_SNTRUP653_CLEAN_crypto_encode_653x4621(unsigned char *out, const vo
|
|||||||
r2 >>= 8;
|
r2 >>= 8;
|
||||||
R[i] = (uint16) r2;
|
R[i] = (uint16) r2;
|
||||||
}
|
}
|
||||||
R[326] = (R0[652] + 2310) & 16383;
|
R[326] = (uint16) ((R0[652] + 2310) & 16383);
|
||||||
|
|
||||||
for (i = 0; i < 163; ++i) {
|
for (i = 0; i < 163; ++i) {
|
||||||
r0 = R[2 * i];
|
r0 = R[2 * i];
|
||||||
@ -123,5 +123,5 @@ void PQCLEAN_SNTRUP653_CLEAN_crypto_encode_653x4621(unsigned char *out, const vo
|
|||||||
R[0] = (uint16) r2;
|
R[0] = (uint16) r2;
|
||||||
|
|
||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -297,5 +297,5 @@ void PQCLEAN_SNTRUP761_AVX2_crypto_encode_761x1531(unsigned char *out, const voi
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -299,5 +299,5 @@ void PQCLEAN_SNTRUP761_AVX2_crypto_encode_761x1531round(unsigned char *out, cons
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ void PQCLEAN_SNTRUP761_AVX2_crypto_encode_761x4591(unsigned char *out, const voi
|
|||||||
writing += 16;
|
writing += 16;
|
||||||
out += 32;
|
out += 32;
|
||||||
}
|
}
|
||||||
R[380] = ((R0[760] + 2295) & 16383);
|
R[380] = (uint16) (((R0[760] + 2295) & 16383));
|
||||||
|
|
||||||
reading = (uint16 *) R;
|
reading = (uint16 *) R;
|
||||||
writing = R;
|
writing = R;
|
||||||
@ -304,5 +304,5 @@ void PQCLEAN_SNTRUP761_AVX2_crypto_encode_761x4591(unsigned char *out, const voi
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ static void uint32_divmod_uint14(uint32 *q, uint16 *r, uint32 x, uint16 m) {
|
|||||||
|
|
||||||
x -= m;
|
x -= m;
|
||||||
*q += 1;
|
*q += 1;
|
||||||
mask = -(x >> 31);
|
mask = (~(x >> 31) + 1);
|
||||||
x += mask & (uint32)m;
|
x += mask & (uint32)m;
|
||||||
*q += mask;
|
*q += mask;
|
||||||
/* x < m */
|
/* x < m */
|
||||||
|
@ -54,7 +54,7 @@ static void uint32_divmod_uint14(uint32 *q, uint16 *r, uint32 x, uint16 m) {
|
|||||||
|
|
||||||
x -= m;
|
x -= m;
|
||||||
*q += 1;
|
*q += 1;
|
||||||
mask = -(x >> 31);
|
mask = (~(x >> 31) + 1);
|
||||||
x += mask & (uint32)m;
|
x += mask & (uint32)m;
|
||||||
*q += mask;
|
*q += mask;
|
||||||
/* x < m */
|
/* x < m */
|
||||||
|
@ -115,5 +115,5 @@ void PQCLEAN_SNTRUP761_CLEAN_crypto_encode_761x1531(unsigned char *out, const vo
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@ void PQCLEAN_SNTRUP761_CLEAN_crypto_encode_761x4591(unsigned char *out, const vo
|
|||||||
uint32 r2;
|
uint32 r2;
|
||||||
|
|
||||||
for (i = 0; i < 380; ++i) {
|
for (i = 0; i < 380; ++i) {
|
||||||
r0 = (R0[2 * i] + 2295) & 16383;
|
r0 = (uint16) ((R0[2 * i] + 2295) & 16383);
|
||||||
r1 = (R0[2 * i + 1] + 2295) & 16383;
|
r1 = (uint16) ((R0[2 * i + 1] + 2295) & 16383);
|
||||||
r2 = r0 + r1 * (uint32)4591;
|
r2 = r0 + r1 * (uint32)4591;
|
||||||
*out++ = (unsigned char) r2;
|
*out++ = (unsigned char) r2;
|
||||||
r2 >>= 8;
|
r2 >>= 8;
|
||||||
@ -24,7 +24,7 @@ void PQCLEAN_SNTRUP761_CLEAN_crypto_encode_761x4591(unsigned char *out, const vo
|
|||||||
r2 >>= 8;
|
r2 >>= 8;
|
||||||
R[i] = (uint16) r2;
|
R[i] = (uint16) r2;
|
||||||
}
|
}
|
||||||
R[380] = (R0[760] + 2295) & 16383;
|
R[380] = (uint16) ((R0[760] + 2295) & 16383);
|
||||||
|
|
||||||
for (i = 0; i < 190; ++i) {
|
for (i = 0; i < 190; ++i) {
|
||||||
r0 = R[2 * i];
|
r0 = R[2 * i];
|
||||||
@ -143,5 +143,5 @@ void PQCLEAN_SNTRUP761_CLEAN_crypto_encode_761x4591(unsigned char *out, const vo
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ void PQCLEAN_SNTRUP857_AVX2_crypto_decode_857x5167(void *v, const unsigned char
|
|||||||
a2 = a0 = R9[i];
|
a2 = a0 = R9[i];
|
||||||
a0 = mulhi(a0, -28) - mulhi(mullo(a0, -886), 74); /* -44...37 */
|
a0 = mulhi(a0, -28) - mulhi(mullo(a0, -886), 74); /* -44...37 */
|
||||||
a0 += (a0 >> 15) & 74; /* 0...73 */
|
a0 += (a0 >> 15) & 74; /* 0...73 */
|
||||||
a1 = (int16) (a2 - a0) >> 1;
|
a1 = (int16) ((a2 - a0) >> 1);
|
||||||
a1 = mullo(a1, 7085);
|
a1 = mullo(a1, 7085);
|
||||||
|
|
||||||
/* invalid inputs might need reduction mod 74 */
|
/* invalid inputs might need reduction mod 74 */
|
||||||
|
@ -279,5 +279,5 @@ void PQCLEAN_SNTRUP857_AVX2_crypto_encode_857x1723(unsigned char *out, const voi
|
|||||||
R[0] = (uint16) r2;
|
R[0] = (uint16) r2;
|
||||||
|
|
||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -281,5 +281,5 @@ void PQCLEAN_SNTRUP857_AVX2_crypto_encode_857x1723round(unsigned char *out, cons
|
|||||||
R[0] = (uint16) r2;
|
R[0] = (uint16) r2;
|
||||||
|
|
||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ void PQCLEAN_SNTRUP857_AVX2_crypto_encode_857x5167(unsigned char *out, const voi
|
|||||||
writing += 16;
|
writing += 16;
|
||||||
out += 32;
|
out += 32;
|
||||||
}
|
}
|
||||||
R[428] = ((R0[856] + 2583) & 16383);
|
R[428] = (uint16) (((R0[856] + 2583) & 16383));
|
||||||
|
|
||||||
reading = (uint16 *) R;
|
reading = (uint16 *) R;
|
||||||
writing = R;
|
writing = R;
|
||||||
@ -327,5 +327,5 @@ void PQCLEAN_SNTRUP857_AVX2_crypto_encode_857x5167(unsigned char *out, const voi
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ static void uint32_divmod_uint14(uint32 *q, uint16 *r, uint32 x, uint16 m) {
|
|||||||
|
|
||||||
x -= m;
|
x -= m;
|
||||||
*q += 1;
|
*q += 1;
|
||||||
mask = -(x >> 31);
|
mask = (~(x >> 31) + 1);
|
||||||
x += mask & (uint32)m;
|
x += mask & (uint32)m;
|
||||||
*q += mask;
|
*q += mask;
|
||||||
/* x < m */
|
/* x < m */
|
||||||
|
@ -54,7 +54,7 @@ static void uint32_divmod_uint14(uint32 *q, uint16 *r, uint32 x, uint16 m) {
|
|||||||
|
|
||||||
x -= m;
|
x -= m;
|
||||||
*q += 1;
|
*q += 1;
|
||||||
mask = -(x >> 31);
|
mask = (~(x >> 31) + 1);
|
||||||
x += mask & (uint32)m;
|
x += mask & (uint32)m;
|
||||||
*q += mask;
|
*q += mask;
|
||||||
/* x < m */
|
/* x < m */
|
||||||
|
@ -126,5 +126,5 @@ void PQCLEAN_SNTRUP857_CLEAN_crypto_encode_857x1723(unsigned char *out, const vo
|
|||||||
R[0] = (uint16) r2;
|
R[0] = (uint16) r2;
|
||||||
|
|
||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@ void PQCLEAN_SNTRUP857_CLEAN_crypto_encode_857x5167(unsigned char *out, const vo
|
|||||||
uint32 r2;
|
uint32 r2;
|
||||||
|
|
||||||
for (i = 0; i < 428; ++i) {
|
for (i = 0; i < 428; ++i) {
|
||||||
r0 = (R0[2 * i] + 2583) & 16383;
|
r0 = (uint16) ((R0[2 * i] + 2583) & 16383);
|
||||||
r1 = (R0[2 * i + 1] + 2583) & 16383;
|
r1 = (uint16) ((R0[2 * i + 1] + 2583) & 16383);
|
||||||
r2 = r0 + r1 * (uint32)5167;
|
r2 = r0 + r1 * (uint32)5167;
|
||||||
*out++ = (unsigned char) r2;
|
*out++ = (unsigned char) r2;
|
||||||
r2 >>= 8;
|
r2 >>= 8;
|
||||||
@ -24,7 +24,7 @@ void PQCLEAN_SNTRUP857_CLEAN_crypto_encode_857x5167(unsigned char *out, const vo
|
|||||||
r2 >>= 8;
|
r2 >>= 8;
|
||||||
R[i] = (uint16) r2;
|
R[i] = (uint16) r2;
|
||||||
}
|
}
|
||||||
R[428] = (R0[856] + 2583) & 16383;
|
R[428] = (uint16) ((R0[856] + 2583) & 16383);
|
||||||
|
|
||||||
for (i = 0; i < 214; ++i) {
|
for (i = 0; i < 214; ++i) {
|
||||||
r0 = R[2 * i];
|
r0 = R[2 * i];
|
||||||
@ -134,5 +134,5 @@ void PQCLEAN_SNTRUP857_CLEAN_crypto_encode_857x5167(unsigned char *out, const vo
|
|||||||
r0 = R[0];
|
r0 = R[0];
|
||||||
*out++ = (unsigned char) r0;
|
*out++ = (unsigned char) r0;
|
||||||
r0 >>= 8;
|
r0 >>= 8;
|
||||||
*out++ = (unsigned char) r0; /*clang-analyzer-deadcode.DeadStores*/ /*r0 >>= 8;*/
|
*out++ = (unsigned char) r0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user