Fix int/size_t comparison in frodo

This commit is contained in:
Thom Wiggers 2019-04-16 12:45:34 +02:00
parent f17d739181
commit eb5f7f1e57
No known key found for this signature in database
GPG Key ID: 001BB0A7CE26E363
6 changed files with 12 additions and 6 deletions

View File

@ -16,7 +16,8 @@ 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. // Fills vector s with n samples from the noise distribution which requires 16 bits to sample.
// The distribution is specified by its CDF. // The distribution is specified by its CDF.
// Input: pseudo-random values (2*n bytes) passed in s. The input is overwritten by the output. // 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) { for (i = 0; i < n; ++i) {
uint8_t sample = 0; uint8_t sample = 0;

View File

@ -16,7 +16,8 @@ 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. // Fills vector s with n samples from the noise distribution which requires 16 bits to sample.
// The distribution is specified by its CDF. // The distribution is specified by its CDF.
// Input: pseudo-random values (2*n bytes) passed in s. The input is overwritten by the output. // 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) { for (i = 0; i < n; ++i) {
uint8_t sample = 0; uint8_t sample = 0;

View File

@ -16,7 +16,8 @@ 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. // Fills vector s with n samples from the noise distribution which requires 16 bits to sample.
// The distribution is specified by its CDF. // The distribution is specified by its CDF.
// Input: pseudo-random values (2*n bytes) passed in s. The input is overwritten by the output. // 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) { for (i = 0; i < n; ++i) {
uint8_t sample = 0; uint8_t sample = 0;

View File

@ -16,7 +16,8 @@ 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. // Fills vector s with n samples from the noise distribution which requires 16 bits to sample.
// The distribution is specified by its CDF. // The distribution is specified by its CDF.
// Input: pseudo-random values (2*n bytes) passed in s. The input is overwritten by the output. // 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) { for (i = 0; i < n; ++i) {
uint8_t sample = 0; uint8_t sample = 0;

View File

@ -16,7 +16,8 @@ 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. // Fills vector s with n samples from the noise distribution which requires 16 bits to sample.
// The distribution is specified by its CDF. // The distribution is specified by its CDF.
// Input: pseudo-random values (2*n bytes) passed in s. The input is overwritten by the output. // 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) { for (i = 0; i < n; ++i) {
uint8_t sample = 0; uint8_t sample = 0;

View File

@ -16,7 +16,8 @@ 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. // Fills vector s with n samples from the noise distribution which requires 16 bits to sample.
// The distribution is specified by its CDF. // The distribution is specified by its CDF.
// Input: pseudo-random values (2*n bytes) passed in s. The input is overwritten by the output. // 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) { for (i = 0; i < n; ++i) {
uint8_t sample = 0; uint8_t sample = 0;