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:
parent
6e1f66d047
commit
3494c96e53
@ -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
|
||||||
|
@ -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++) {
|
||||||
|
@ -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
|
||||||
|
@ -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++) {
|
||||||
|
@ -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
|
||||||
|
@ -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++) {
|
||||||
|
@ -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
|
||||||
|
@ -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++) {
|
||||||
|
@ -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
|
||||||
|
@ -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++) {
|
||||||
|
@ -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
|
||||||
|
@ -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++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user