1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-22 15:39:07 +00:00

typo and unary negation

This commit is contained in:
John M. Schanck 2020-09-14 17:11:08 -04:00 committed by Kris Kwiatkowski
parent 42473fab3b
commit 5cddb24de4
18 changed files with 18 additions and 18 deletions

View File

@ -167,7 +167,7 @@ uint8_t PQCLEAN_HQC128_AVX2_vect_compare(const uint8_t *v1, const uint8_t *v2, u
for (size_t i = 0; i < size; i++) {
r |= v1[i] ^ v2[i];
}
r = (-r) >> 63;
r = (~r + 1) >> 63;
return (uint8_t) r;
}

View File

@ -183,7 +183,7 @@ uint8_t PQCLEAN_HQC128_CLEAN_vect_compare(const uint8_t *v1, const uint8_t *v2,
for (size_t i = 0; i < size; i++) {
r |= v1[i] ^ v2[i];
}
r = (-r) >> 63;
r = (~r + 1) >> 63;
return (uint8_t) r;
}

View File

@ -167,7 +167,7 @@ uint8_t PQCLEAN_HQC192_AVX2_vect_compare(const uint8_t *v1, const uint8_t *v2, u
for (size_t i = 0; i < size; i++) {
r |= v1[i] ^ v2[i];
}
r = (-r) >> 63;
r = (~r + 1) >> 63;
return (uint8_t) r;
}

View File

@ -183,7 +183,7 @@ uint8_t PQCLEAN_HQC192_CLEAN_vect_compare(const uint8_t *v1, const uint8_t *v2,
for (size_t i = 0; i < size; i++) {
r |= v1[i] ^ v2[i];
}
r = (-r) >> 63;
r = (~r + 1) >> 63;
return (uint8_t) r;
}

View File

@ -167,7 +167,7 @@ uint8_t PQCLEAN_HQC256_AVX2_vect_compare(const uint8_t *v1, const uint8_t *v2, u
for (size_t i = 0; i < size; i++) {
r |= v1[i] ^ v2[i];
}
r = (-r) >> 63;
r = (~r + 1) >> 63;
return (uint8_t) r;
}

View File

@ -183,7 +183,7 @@ uint8_t PQCLEAN_HQC256_CLEAN_vect_compare(const uint8_t *v1, const uint8_t *v2,
for (size_t i = 0; i < size; i++) {
r |= v1[i] ^ v2[i];
}
r = (-r) >> 63;
r = (~r + 1) >> 63;
return (uint8_t) r;
}

View File

@ -53,7 +53,7 @@ void PQCLEAN_HQCRMRS128_AVX2_reed_solomon_encode(uint8_t *cdw, const uint8_t *ms
prev = 0;
for (k = 0; k < PARAM_N1 - PARAM_K; k++) {
x = cdw[k];
cdw[k] = (uint8_t) prev ^ tmp[k];
cdw[k] = (uint8_t) (prev ^ tmp[k]);
prev = x;
}
}

View File

@ -151,7 +151,7 @@ uint8_t PQCLEAN_HQCRMRS128_AVX2_vect_compare(const uint8_t *v1, const uint8_t *v
for (size_t i = 0; i < size; i++) {
r |= v1[i] ^ v2[i];
}
r = (-r) >> 63;
r = (~r + 1) >> 63;
return (uint8_t) r;
}

View File

@ -53,7 +53,7 @@ void PQCLEAN_HQCRMRS128_CLEAN_reed_solomon_encode(uint8_t *cdw, const uint8_t *m
prev = 0;
for (k = 0; k < PARAM_N1 - PARAM_K; k++) {
x = cdw[k];
cdw[k] = (uint8_t) prev ^ tmp[k];
cdw[k] = (uint8_t) (prev ^ tmp[k]);
prev = x;
}
}

View File

@ -183,7 +183,7 @@ uint8_t PQCLEAN_HQCRMRS128_CLEAN_vect_compare(const uint8_t *v1, const uint8_t *
for (size_t i = 0; i < size; i++) {
r |= v1[i] ^ v2[i];
}
r = (-r) >> 63;
r = (~r + 1) >> 63;
return (uint8_t) r;
}

View File

@ -53,7 +53,7 @@ void PQCLEAN_HQCRMRS192_AVX2_reed_solomon_encode(uint8_t *cdw, const uint8_t *ms
prev = 0;
for (k = 0; k < PARAM_N1 - PARAM_K; k++) {
x = cdw[k];
cdw[k] = (uint8_t) prev ^ tmp[k];
cdw[k] = (uint8_t) (prev ^ tmp[k]);
prev = x;
}
}

View File

@ -151,7 +151,7 @@ uint8_t PQCLEAN_HQCRMRS192_AVX2_vect_compare(const uint8_t *v1, const uint8_t *v
for (size_t i = 0; i < size; i++) {
r |= v1[i] ^ v2[i];
}
r = (-r) >> 63;
r = (~r + 1) >> 63;
return (uint8_t) r;
}

View File

@ -53,7 +53,7 @@ void PQCLEAN_HQCRMRS192_CLEAN_reed_solomon_encode(uint8_t *cdw, const uint8_t *m
prev = 0;
for (k = 0; k < PARAM_N1 - PARAM_K; k++) {
x = cdw[k];
cdw[k] = (uint8_t) prev ^ tmp[k];
cdw[k] = (uint8_t) (prev ^ tmp[k]);
prev = x;
}
}

View File

@ -183,7 +183,7 @@ uint8_t PQCLEAN_HQCRMRS192_CLEAN_vect_compare(const uint8_t *v1, const uint8_t *
for (size_t i = 0; i < size; i++) {
r |= v1[i] ^ v2[i];
}
r = (-r) >> 63;
r = (~r + 1) >> 63;
return (uint8_t) r;
}

View File

@ -53,7 +53,7 @@ void PQCLEAN_HQCRMRS256_AVX2_reed_solomon_encode(uint8_t *cdw, const uint8_t *ms
prev = 0;
for (k = 0; k < PARAM_N1 - PARAM_K; k++) {
x = cdw[k];
cdw[k] = (uint8_t) prev ^ tmp[k];
cdw[k] = (uint8_t) (prev ^ tmp[k]);
prev = x;
}
}

View File

@ -151,7 +151,7 @@ uint8_t PQCLEAN_HQCRMRS256_AVX2_vect_compare(const uint8_t *v1, const uint8_t *v
for (size_t i = 0; i < size; i++) {
r |= v1[i] ^ v2[i];
}
r = (-r) >> 63;
r = (~r + 1) >> 63;
return (uint8_t) r;
}

View File

@ -53,7 +53,7 @@ void PQCLEAN_HQCRMRS256_CLEAN_reed_solomon_encode(uint8_t *cdw, const uint8_t *m
prev = 0;
for (k = 0; k < PARAM_N1 - PARAM_K; k++) {
x = cdw[k];
cdw[k] = (uint8_t) prev ^ tmp[k];
cdw[k] = (uint8_t) (prev ^ tmp[k]);
prev = x;
}
}

View File

@ -183,7 +183,7 @@ uint8_t PQCLEAN_HQCRMRS256_CLEAN_vect_compare(const uint8_t *v1, const uint8_t *
for (size_t i = 0; i < size; i++) {
r |= v1[i] ^ v2[i];
}
r = (-r) >> 63;
r = (~r + 1) >> 63;
return (uint8_t) r;
}