mirror of
https://github.com/open-quantum-safe/liboqs.git
synced 2025-10-06 00:03:35 -04:00
Sync with latest FrodoKEM upstream to fix MS Visual Studio failure
This commit is contained in:
parent
cfc4191926
commit
103791b942
@ -16,12 +16,13 @@ void PQCLEAN_FRODOKEM1344AES_CLEAN_sample_n(uint16_t *s, size_t n) {
|
||||
// Fills vector s with n samples from the noise distribution which requires 16 bits to sample.
|
||||
// The distribution is specified by its CDF.
|
||||
// Input: pseudo-random values (2*n bytes) passed in s. The input is overwritten by the output.
|
||||
unsigned int i, j;
|
||||
size_t i;
|
||||
unsigned int j;
|
||||
|
||||
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
|
||||
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.
|
||||
for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) {
|
||||
|
@ -16,12 +16,13 @@ void PQCLEAN_FRODOKEM1344SHAKE_CLEAN_sample_n(uint16_t *s, size_t n) {
|
||||
// Fills vector s with n samples from the noise distribution which requires 16 bits to sample.
|
||||
// The distribution is specified by its CDF.
|
||||
// Input: pseudo-random values (2*n bytes) passed in s. The input is overwritten by the output.
|
||||
unsigned int i, j;
|
||||
size_t i;
|
||||
unsigned int j;
|
||||
|
||||
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
|
||||
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.
|
||||
for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) {
|
||||
|
@ -16,12 +16,13 @@ void PQCLEAN_FRODOKEM640AES_CLEAN_sample_n(uint16_t *s, size_t n) {
|
||||
// Fills vector s with n samples from the noise distribution which requires 16 bits to sample.
|
||||
// The distribution is specified by its CDF.
|
||||
// Input: pseudo-random values (2*n bytes) passed in s. The input is overwritten by the output.
|
||||
unsigned int i, j;
|
||||
size_t i;
|
||||
unsigned int j;
|
||||
|
||||
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
|
||||
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.
|
||||
for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) {
|
||||
|
@ -16,12 +16,13 @@ void PQCLEAN_FRODOKEM640SHAKE_CLEAN_sample_n(uint16_t *s, size_t n) {
|
||||
// Fills vector s with n samples from the noise distribution which requires 16 bits to sample.
|
||||
// The distribution is specified by its CDF.
|
||||
// Input: pseudo-random values (2*n bytes) passed in s. The input is overwritten by the output.
|
||||
unsigned int i, j;
|
||||
size_t i;
|
||||
unsigned int j;
|
||||
|
||||
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
|
||||
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.
|
||||
for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) {
|
||||
|
@ -16,12 +16,13 @@ void PQCLEAN_FRODOKEM976AES_CLEAN_sample_n(uint16_t *s, size_t n) {
|
||||
// Fills vector s with n samples from the noise distribution which requires 16 bits to sample.
|
||||
// The distribution is specified by its CDF.
|
||||
// Input: pseudo-random values (2*n bytes) passed in s. The input is overwritten by the output.
|
||||
unsigned int i, j;
|
||||
size_t i;
|
||||
unsigned int j;
|
||||
|
||||
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
|
||||
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.
|
||||
for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) {
|
||||
|
@ -16,12 +16,13 @@ void PQCLEAN_FRODOKEM976SHAKE_CLEAN_sample_n(uint16_t *s, size_t n) {
|
||||
// Fills vector s with n samples from the noise distribution which requires 16 bits to sample.
|
||||
// The distribution is specified by its CDF.
|
||||
// Input: pseudo-random values (2*n bytes) passed in s. The input is overwritten by the output.
|
||||
unsigned int i, j;
|
||||
size_t i;
|
||||
unsigned int j;
|
||||
|
||||
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
|
||||
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.
|
||||
for (j = 0; j < (unsigned int)(CDF_TABLE_LEN - 1); j++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user