1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-27 01:41:40 +00:00

Update to latest changes from upstream, fix correctness on MS Visual Studio (#163)

This commit is contained in:
Douglas Stebila 2019-05-05 18:33:34 -04:00 committed by GitHub
parent 6e1f66d047
commit 3494c96e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 18 additions and 18 deletions

View File

@ -21,4 +21,4 @@ auxiliary-submitters:
- Brian LaMacchia, Microsoft Research - Brian LaMacchia, Microsoft Research
implementations: implementations:
- name: clean - name: clean
version: https://github.com/Microsoft/PQCrypto-LWEKE/commit/437e228fca580a82435cab09f30ae14b03183119 version: https://github.com/Microsoft/PQCrypto-LWEKE/commit/d5bbd0417ba111b08a959c0042a1dcc65fb14a89

View File

@ -20,9 +20,9 @@ void PQCLEAN_FRODOKEM1344AES_CLEAN_sample_n(uint16_t *s, size_t n) {
unsigned int j; unsigned int j;
for (i = 0; i < n; ++i) { for (i = 0; i < n; ++i) {
uint8_t sample = 0; uint16_t sample = 0;
uint16_t prnd = s[i] >> 1; // Drop the least significant bit uint16_t prnd = s[i] >> 1; // Drop the least significant bit
uint8_t sign = s[i] & 0x1; // Pick the least significant bit uint16_t sign = s[i] & 0x1; // Pick the least significant bit
// No need to compare with the last value. // No need to compare with the last value.
for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) { for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) {

View File

@ -21,4 +21,4 @@ auxiliary-submitters:
- Brian LaMacchia, Microsoft Research - Brian LaMacchia, Microsoft Research
implementations: implementations:
- name: clean - name: clean
version: https://github.com/Microsoft/PQCrypto-LWEKE/commit/437e228fca580a82435cab09f30ae14b03183119 version: https://github.com/Microsoft/PQCrypto-LWEKE/commit/d5bbd0417ba111b08a959c0042a1dcc65fb14a89

View File

@ -20,9 +20,9 @@ void PQCLEAN_FRODOKEM1344SHAKE_CLEAN_sample_n(uint16_t *s, size_t n) {
unsigned int j; unsigned int j;
for (i = 0; i < n; ++i) { for (i = 0; i < n; ++i) {
uint8_t sample = 0; uint16_t sample = 0;
uint16_t prnd = s[i] >> 1; // Drop the least significant bit uint16_t prnd = s[i] >> 1; // Drop the least significant bit
uint8_t sign = s[i] & 0x1; // Pick the least significant bit uint16_t sign = s[i] & 0x1; // Pick the least significant bit
// No need to compare with the last value. // No need to compare with the last value.
for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) { for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) {

View File

@ -21,4 +21,4 @@ auxiliary-submitters:
- Brian LaMacchia, Microsoft Research - Brian LaMacchia, Microsoft Research
implementations: implementations:
- name: clean - name: clean
version: https://github.com/Microsoft/PQCrypto-LWEKE/commit/437e228fca580a82435cab09f30ae14b03183119 version: https://github.com/Microsoft/PQCrypto-LWEKE/commit/d5bbd0417ba111b08a959c0042a1dcc65fb14a89

View File

@ -20,9 +20,9 @@ void PQCLEAN_FRODOKEM640AES_CLEAN_sample_n(uint16_t *s, size_t n) {
unsigned int j; unsigned int j;
for (i = 0; i < n; ++i) { for (i = 0; i < n; ++i) {
uint8_t sample = 0; uint16_t sample = 0;
uint16_t prnd = s[i] >> 1; // Drop the least significant bit uint16_t prnd = s[i] >> 1; // Drop the least significant bit
uint8_t sign = s[i] & 0x1; // Pick the least significant bit uint16_t sign = s[i] & 0x1; // Pick the least significant bit
// No need to compare with the last value. // No need to compare with the last value.
for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) { for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) {

View File

@ -21,4 +21,4 @@ auxiliary-submitters:
- Brian LaMacchia, Microsoft Research - Brian LaMacchia, Microsoft Research
implementations: implementations:
- name: clean - name: clean
version: https://github.com/Microsoft/PQCrypto-LWEKE/commit/437e228fca580a82435cab09f30ae14b03183119 version: https://github.com/Microsoft/PQCrypto-LWEKE/commit/d5bbd0417ba111b08a959c0042a1dcc65fb14a89

View File

@ -20,9 +20,9 @@ void PQCLEAN_FRODOKEM640SHAKE_CLEAN_sample_n(uint16_t *s, size_t n) {
unsigned int j; unsigned int j;
for (i = 0; i < n; ++i) { for (i = 0; i < n; ++i) {
uint8_t sample = 0; uint16_t sample = 0;
uint16_t prnd = s[i] >> 1; // Drop the least significant bit uint16_t prnd = s[i] >> 1; // Drop the least significant bit
uint8_t sign = s[i] & 0x1; // Pick the least significant bit uint16_t sign = s[i] & 0x1; // Pick the least significant bit
// No need to compare with the last value. // No need to compare with the last value.
for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) { for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) {

View File

@ -21,4 +21,4 @@ auxiliary-submitters:
- Brian LaMacchia, Microsoft Research - Brian LaMacchia, Microsoft Research
implementations: implementations:
- name: clean - name: clean
version: https://github.com/Microsoft/PQCrypto-LWEKE/commit/437e228fca580a82435cab09f30ae14b03183119 version: https://github.com/Microsoft/PQCrypto-LWEKE/commit/d5bbd0417ba111b08a959c0042a1dcc65fb14a89

View File

@ -20,9 +20,9 @@ void PQCLEAN_FRODOKEM976AES_CLEAN_sample_n(uint16_t *s, size_t n) {
unsigned int j; unsigned int j;
for (i = 0; i < n; ++i) { for (i = 0; i < n; ++i) {
uint8_t sample = 0; uint16_t sample = 0;
uint16_t prnd = s[i] >> 1; // Drop the least significant bit uint16_t prnd = s[i] >> 1; // Drop the least significant bit
uint8_t sign = s[i] & 0x1; // Pick the least significant bit uint16_t sign = s[i] & 0x1; // Pick the least significant bit
// No need to compare with the last value. // No need to compare with the last value.
for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) { for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) {

View File

@ -21,4 +21,4 @@ auxiliary-submitters:
- Brian LaMacchia, Microsoft Research - Brian LaMacchia, Microsoft Research
implementations: implementations:
- name: clean - name: clean
version: https://github.com/Microsoft/PQCrypto-LWEKE/commit/437e228fca580a82435cab09f30ae14b03183119 version: https://github.com/Microsoft/PQCrypto-LWEKE/commit/d5bbd0417ba111b08a959c0042a1dcc65fb14a89

View File

@ -20,9 +20,9 @@ void PQCLEAN_FRODOKEM976SHAKE_CLEAN_sample_n(uint16_t *s, size_t n) {
unsigned int j; unsigned int j;
for (i = 0; i < n; ++i) { for (i = 0; i < n; ++i) {
uint8_t sample = 0; uint16_t sample = 0;
uint16_t prnd = s[i] >> 1; // Drop the least significant bit uint16_t prnd = s[i] >> 1; // Drop the least significant bit
uint8_t sign = s[i] & 0x1; // Pick the least significant bit uint16_t sign = s[i] & 0x1; // Pick the least significant bit
// No need to compare with the last value. // No need to compare with the last value.
for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) { for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) {