narrowing warnings
Este commit está contenido en:
padre
59a1bed7d8
commit
eb120a6b24
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
static void compute_fft_betas(uint16_t *betas);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size);
|
||||
static void radix(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void radix_big(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void fft_rec(uint16_t *w, uint16_t *f, size_t f_coeffs, uint8_t m, uint32_t m_f, const uint16_t *betas);
|
||||
@ -47,7 +47,7 @@ static void compute_fft_betas(uint16_t *betas) {
|
||||
* @param[in] set Array of set_size elements
|
||||
* @param[in] set_size Size of the array set
|
||||
*/
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size) {
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size) {
|
||||
uint16_t i, j;
|
||||
subset_sums[0] = 0;
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
static void compute_fft_betas(uint16_t *betas);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size);
|
||||
static void radix_t(uint16_t *f, const uint16_t *f0, const uint16_t *f1, uint32_t m_f);
|
||||
static void radix_t_big(uint16_t *f, const uint16_t *f0, const uint16_t *f1, uint32_t m_f);
|
||||
static void fft_t_rec(uint16_t *f, const uint16_t *w, size_t f_coeffs, uint8_t m, uint32_t m_f, const uint16_t *betas);
|
||||
@ -50,7 +50,7 @@ static void compute_fft_betas(uint16_t *betas) {
|
||||
* @param[in] set Array of set_size elements
|
||||
* @param[in] set_size Size of the array set
|
||||
*/
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size) {
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size) {
|
||||
uint16_t i, j;
|
||||
subset_sums[0] = 0;
|
||||
|
||||
|
@ -42,10 +42,11 @@ static inline void swap(uint16_t *tab, uint16_t elt1, uint16_t elt2) {
|
||||
* @param[out] o Pointer to the result
|
||||
*/
|
||||
static void reduce(uint64_t *o, const uint64_t *a) {
|
||||
size_t i;
|
||||
uint64_t r;
|
||||
uint64_t carry;
|
||||
|
||||
for (uint32_t i = 0; i < VEC_N_SIZE_64; i++) {
|
||||
for (i = 0; i < VEC_N_SIZE_64; i++) {
|
||||
r = a[i + VEC_N_SIZE_64 - 1] >> (PARAM_N & 63);
|
||||
carry = (uint64_t) (a[i + VEC_N_SIZE_64] << (64 - (PARAM_N & 63)));
|
||||
o[i] = a[i] ^ r ^ carry;
|
||||
@ -78,7 +79,7 @@ static void fast_convolution_mult(uint64_t *o, const uint32_t *a1, const uint64_
|
||||
uint16_t permutation_sparse_vect[PARAM_OMEGA_E];
|
||||
uint64_t *pt;
|
||||
uint16_t *res_16;
|
||||
uint16_t i, j;
|
||||
size_t i, j;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
permuted_table[i] = i;
|
||||
@ -113,7 +114,7 @@ static void fast_convolution_mult(uint64_t *o, const uint32_t *a1, const uint64_
|
||||
seedexpander(ctx, (uint8_t *) permutation_sparse_vect, weight * sizeof(uint16_t));
|
||||
|
||||
for (i = 0; i + 1 < weight; i++) {
|
||||
swap(permuted_sparse_vect + i, 0, permutation_sparse_vect[i] % (weight - i));
|
||||
swap(permuted_sparse_vect + i, 0, (uint16_t) (permutation_sparse_vect[i] % (weight - i)));
|
||||
}
|
||||
|
||||
for (i = 0; i < weight; i++) {
|
||||
|
@ -24,7 +24,7 @@ void PQCLEAN_HQC128_CLEAN_repetition_code_encode(uint64_t *em, const uint64_t *m
|
||||
uint32_t pos_r;
|
||||
uint64_t *p64 = em;
|
||||
const uint64_t mask[2][2] = {{0x0UL, 0x0UL}, {0x7FFFFFFFUL, 0x3FFFFFFFUL}};
|
||||
for (i = 0; i < VEC_N1_SIZE_64 - 1; i++) {
|
||||
for (i = 0; i < (uint16_t) (VEC_N1_SIZE_64 - 1); i++) {
|
||||
for (j = 0; j < 64; j++) {
|
||||
bit = (m[i] >> j) & 0x1;
|
||||
pos_r = PARAM_N2 * ((i << 6) + j);
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
static void compute_fft_betas(uint16_t *betas);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size);
|
||||
static void radix(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void radix_big(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void fft_rec(uint16_t *w, uint16_t *f, size_t f_coeffs, uint8_t m, uint32_t m_f, const uint16_t *betas);
|
||||
@ -47,8 +47,8 @@ static void compute_fft_betas(uint16_t *betas) {
|
||||
* @param[in] set Array of set_size elements
|
||||
* @param[in] set_size Size of the array set
|
||||
*/
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size) {
|
||||
size_t i, j;
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size) {
|
||||
uint16_t i, j;
|
||||
subset_sums[0] = 0;
|
||||
|
||||
for (i = 0; i < set_size; ++i) {
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
static void compute_fft_betas(uint16_t *betas);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size);
|
||||
static void radix_t(uint16_t *f, const uint16_t *f0, const uint16_t *f1, uint32_t m_f);
|
||||
static void radix_t_big(uint16_t *f, const uint16_t *f0, const uint16_t *f1, uint32_t m_f);
|
||||
static void fft_t_rec(uint16_t *f, const uint16_t *w, size_t f_coeffs, uint8_t m, uint32_t m_f, const uint16_t *betas);
|
||||
@ -50,7 +50,7 @@ static void compute_fft_betas(uint16_t *betas) {
|
||||
* @param[in] set Array of set_size elements
|
||||
* @param[in] set_size Size of the array set
|
||||
*/
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size) {
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size) {
|
||||
uint16_t i, j;
|
||||
subset_sums[0] = 0;
|
||||
|
||||
@ -628,7 +628,8 @@ void PQCLEAN_HQC192_CLEAN_fft_retrieve_bch_error_poly(uint64_t *error, const uin
|
||||
uint16_t gammas[PARAM_M - 1] = {0};
|
||||
uint16_t gammas_sums[1 << (PARAM_M - 1)] = {0};
|
||||
uint64_t bit;
|
||||
size_t i, k, index;
|
||||
uint16_t k;
|
||||
size_t i, index;
|
||||
|
||||
compute_fft_betas(gammas);
|
||||
compute_subset_sums(gammas_sums, gammas, PARAM_M - 1);
|
||||
|
@ -42,10 +42,11 @@ static inline void swap(uint16_t *tab, uint16_t elt1, uint16_t elt2) {
|
||||
* @param[out] o Pointer to the result
|
||||
*/
|
||||
static void reduce(uint64_t *o, const uint64_t *a) {
|
||||
size_t i;
|
||||
uint64_t r;
|
||||
uint64_t carry;
|
||||
|
||||
for (uint32_t i = 0; i < VEC_N_SIZE_64; i++) {
|
||||
for (i = 0; i < VEC_N_SIZE_64; i++) {
|
||||
r = a[i + VEC_N_SIZE_64 - 1] >> (PARAM_N & 63);
|
||||
carry = (uint64_t) (a[i + VEC_N_SIZE_64] << (64 - (PARAM_N & 63)));
|
||||
o[i] = a[i] ^ r ^ carry;
|
||||
@ -78,7 +79,7 @@ static void fast_convolution_mult(uint64_t *o, const uint32_t *a1, const uint64_
|
||||
uint16_t permutation_sparse_vect[PARAM_OMEGA_E];
|
||||
uint64_t *pt;
|
||||
uint16_t *res_16;
|
||||
uint16_t i, j;
|
||||
size_t i, j;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
permuted_table[i] = i;
|
||||
@ -113,7 +114,7 @@ static void fast_convolution_mult(uint64_t *o, const uint32_t *a1, const uint64_
|
||||
seedexpander(ctx, (uint8_t *) permutation_sparse_vect, weight * sizeof(uint16_t));
|
||||
|
||||
for (i = 0; i + 1 < weight; i++) {
|
||||
swap(permuted_sparse_vect + i, 0, permutation_sparse_vect[i] % (weight - i));
|
||||
swap(permuted_sparse_vect + i, 0, (uint16_t) (permutation_sparse_vect[i] % (weight - i)));
|
||||
}
|
||||
|
||||
for (i = 0; i < weight; i++) {
|
||||
|
@ -24,7 +24,7 @@ void PQCLEAN_HQC192_CLEAN_repetition_code_encode(uint64_t *em, const uint64_t *m
|
||||
uint32_t pos_r;
|
||||
uint64_t *p64 = em;
|
||||
const uint64_t mask[2][2] = {{0x0UL, 0x0UL}, {0x7FFFFFFFFFFFFFFUL, 0x3FFFFFFFFFFFFFFUL}};
|
||||
for (i = 0; i < VEC_N1_SIZE_64 - 1; i++) {
|
||||
for (i = 0; i < (uint16_t) (VEC_N1_SIZE_64 - 1); i++) {
|
||||
for (j = 0; j < 64; j++) {
|
||||
bit = (m[i] >> j) & 0x1;
|
||||
pos_r = PARAM_N2 * ((i << 6) + j);
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
static void compute_fft_betas(uint16_t *betas);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size);
|
||||
static void radix(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void radix_big(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void fft_rec(uint16_t *w, uint16_t *f, size_t f_coeffs, uint8_t m, uint32_t m_f, const uint16_t *betas);
|
||||
@ -47,8 +47,8 @@ static void compute_fft_betas(uint16_t *betas) {
|
||||
* @param[in] set Array of set_size elements
|
||||
* @param[in] set_size Size of the array set
|
||||
*/
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size) {
|
||||
size_t i, j;
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size) {
|
||||
uint16_t i, j;
|
||||
subset_sums[0] = 0;
|
||||
|
||||
for (i = 0; i < set_size; ++i) {
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
static void compute_fft_betas(uint16_t *betas);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size);
|
||||
static void radix_t(uint16_t *f, const uint16_t *f0, const uint16_t *f1, uint32_t m_f);
|
||||
static void radix_t_big(uint16_t *f, const uint16_t *f0, const uint16_t *f1, uint32_t m_f);
|
||||
static void fft_t_rec(uint16_t *f, const uint16_t *w, size_t f_coeffs, uint8_t m, uint32_t m_f, const uint16_t *betas);
|
||||
@ -50,7 +50,7 @@ static void compute_fft_betas(uint16_t *betas) {
|
||||
* @param[in] set Array of set_size elements
|
||||
* @param[in] set_size Size of the array set
|
||||
*/
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size) {
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size) {
|
||||
uint16_t i, j;
|
||||
subset_sums[0] = 0;
|
||||
|
||||
@ -628,7 +628,8 @@ void PQCLEAN_HQC256_CLEAN_fft_retrieve_bch_error_poly(uint64_t *error, const uin
|
||||
uint16_t gammas[PARAM_M - 1] = {0};
|
||||
uint16_t gammas_sums[1 << (PARAM_M - 1)] = {0};
|
||||
uint64_t bit;
|
||||
size_t i, k, index;
|
||||
uint16_t k;
|
||||
size_t i, index;
|
||||
|
||||
compute_fft_betas(gammas);
|
||||
compute_subset_sums(gammas_sums, gammas, PARAM_M - 1);
|
||||
|
@ -42,10 +42,11 @@ static inline void swap(uint16_t *tab, uint16_t elt1, uint16_t elt2) {
|
||||
* @param[out] o Pointer to the result
|
||||
*/
|
||||
static void reduce(uint64_t *o, const uint64_t *a) {
|
||||
size_t i;
|
||||
uint64_t r;
|
||||
uint64_t carry;
|
||||
|
||||
for (uint32_t i = 0; i < VEC_N_SIZE_64; i++) {
|
||||
for (i = 0; i < VEC_N_SIZE_64; i++) {
|
||||
r = a[i + VEC_N_SIZE_64 - 1] >> (PARAM_N & 63);
|
||||
carry = (uint64_t) (a[i + VEC_N_SIZE_64] << (64 - (PARAM_N & 63)));
|
||||
o[i] = a[i] ^ r ^ carry;
|
||||
@ -78,7 +79,7 @@ static void fast_convolution_mult(uint64_t *o, const uint32_t *a1, const uint64_
|
||||
uint16_t permutation_sparse_vect[PARAM_OMEGA_E];
|
||||
uint64_t *pt;
|
||||
uint16_t *res_16;
|
||||
uint16_t i, j;
|
||||
size_t i, j;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
permuted_table[i] = i;
|
||||
@ -113,7 +114,7 @@ static void fast_convolution_mult(uint64_t *o, const uint32_t *a1, const uint64_
|
||||
seedexpander(ctx, (uint8_t *) permutation_sparse_vect, weight * sizeof(uint16_t));
|
||||
|
||||
for (i = 0; i + 1 < weight; i++) {
|
||||
swap(permuted_sparse_vect + i, 0, permutation_sparse_vect[i] % (weight - i));
|
||||
swap(permuted_sparse_vect + i, 0, (uint16_t) (permutation_sparse_vect[i] % (weight - i)));
|
||||
}
|
||||
|
||||
for (i = 0; i < weight; i++) {
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
static void compute_fft_betas(uint16_t *betas);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size);
|
||||
static void radix(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void radix_big(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void fft_rec(uint16_t *w, uint16_t *f, size_t f_coeffs, uint8_t m, uint32_t m_f, const uint16_t *betas);
|
||||
@ -46,7 +46,7 @@ static void compute_fft_betas(uint16_t *betas) {
|
||||
* @param[in] set Array of set_size elements
|
||||
* @param[in] set_size Size of the array set
|
||||
*/
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size) {
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size) {
|
||||
uint16_t i, j;
|
||||
subset_sums[0] = 0;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
static void compute_fft_betas(uint16_t *betas);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size);
|
||||
static void radix(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void radix_big(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void fft_rec(uint16_t *w, uint16_t *f, size_t f_coeffs, uint8_t m, uint32_t m_f, const uint16_t *betas);
|
||||
@ -46,7 +46,7 @@ static void compute_fft_betas(uint16_t *betas) {
|
||||
* @param[in] set Array of set_size elements
|
||||
* @param[in] set_size Size of the array set
|
||||
*/
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size) {
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size) {
|
||||
uint16_t i, j;
|
||||
subset_sums[0] = 0;
|
||||
|
||||
|
@ -42,10 +42,11 @@ static inline void swap(uint16_t *tab, uint16_t elt1, uint16_t elt2) {
|
||||
* @param[out] o Pointer to the result
|
||||
*/
|
||||
static void reduce(uint64_t *o, const uint64_t *a) {
|
||||
size_t i;
|
||||
uint64_t r;
|
||||
uint64_t carry;
|
||||
|
||||
for (uint32_t i = 0; i < VEC_N_SIZE_64; i++) {
|
||||
for (i = 0; i < VEC_N_SIZE_64; i++) {
|
||||
r = a[i + VEC_N_SIZE_64 - 1] >> (PARAM_N & 63);
|
||||
carry = (uint64_t) (a[i + VEC_N_SIZE_64] << (64 - (PARAM_N & 63)));
|
||||
o[i] = a[i] ^ r ^ carry;
|
||||
@ -78,7 +79,7 @@ static void fast_convolution_mult(uint64_t *o, const uint32_t *a1, const uint64_
|
||||
uint16_t permutation_sparse_vect[PARAM_OMEGA_E];
|
||||
uint64_t *pt;
|
||||
uint16_t *res_16;
|
||||
uint16_t i, j;
|
||||
size_t i, j;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
permuted_table[i] = i;
|
||||
@ -113,7 +114,7 @@ static void fast_convolution_mult(uint64_t *o, const uint32_t *a1, const uint64_
|
||||
seedexpander(ctx, (uint8_t *) permutation_sparse_vect, weight * sizeof(uint16_t));
|
||||
|
||||
for (i = 0; i + 1 < weight; i++) {
|
||||
swap(permuted_sparse_vect + i, 0, permutation_sparse_vect[i] % (weight - i));
|
||||
swap(permuted_sparse_vect + i, 0, (uint16_t) (permutation_sparse_vect[i] % (weight - i)));
|
||||
}
|
||||
|
||||
for (i = 0; i < weight; i++) {
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
static void compute_fft_betas(uint16_t *betas);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size);
|
||||
static void radix(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void radix_big(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void fft_rec(uint16_t *w, uint16_t *f, size_t f_coeffs, uint8_t m, uint32_t m_f, const uint16_t *betas);
|
||||
@ -46,7 +46,7 @@ static void compute_fft_betas(uint16_t *betas) {
|
||||
* @param[in] set Array of set_size elements
|
||||
* @param[in] set_size Size of the array set
|
||||
*/
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size) {
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size) {
|
||||
uint16_t i, j;
|
||||
subset_sums[0] = 0;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
static void compute_fft_betas(uint16_t *betas);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size);
|
||||
static void radix(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void radix_big(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void fft_rec(uint16_t *w, uint16_t *f, size_t f_coeffs, uint8_t m, uint32_t m_f, const uint16_t *betas);
|
||||
@ -46,8 +46,8 @@ static void compute_fft_betas(uint16_t *betas) {
|
||||
* @param[in] set Array of set_size elements
|
||||
* @param[in] set_size Size of the array set
|
||||
*/
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size) {
|
||||
size_t i, j;
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size) {
|
||||
uint16_t i, j;
|
||||
subset_sums[0] = 0;
|
||||
|
||||
for (i = 0; i < set_size; ++i) {
|
||||
|
@ -42,10 +42,11 @@ static inline void swap(uint16_t *tab, uint16_t elt1, uint16_t elt2) {
|
||||
* @param[out] o Pointer to the result
|
||||
*/
|
||||
static void reduce(uint64_t *o, const uint64_t *a) {
|
||||
size_t i;
|
||||
uint64_t r;
|
||||
uint64_t carry;
|
||||
|
||||
for (uint32_t i = 0; i < VEC_N_SIZE_64; i++) {
|
||||
for (i = 0; i < VEC_N_SIZE_64; i++) {
|
||||
r = a[i + VEC_N_SIZE_64 - 1] >> (PARAM_N & 63);
|
||||
carry = (uint64_t) (a[i + VEC_N_SIZE_64] << (64 - (PARAM_N & 63)));
|
||||
o[i] = a[i] ^ r ^ carry;
|
||||
@ -78,7 +79,7 @@ static void fast_convolution_mult(uint64_t *o, const uint32_t *a1, const uint64_
|
||||
uint16_t permutation_sparse_vect[PARAM_OMEGA_E];
|
||||
uint64_t *pt;
|
||||
uint16_t *res_16;
|
||||
uint16_t i, j;
|
||||
size_t i, j;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
permuted_table[i] = i;
|
||||
@ -113,7 +114,7 @@ static void fast_convolution_mult(uint64_t *o, const uint32_t *a1, const uint64_
|
||||
seedexpander(ctx, (uint8_t *) permutation_sparse_vect, weight * sizeof(uint16_t));
|
||||
|
||||
for (i = 0; i + 1 < weight; i++) {
|
||||
swap(permuted_sparse_vect + i, 0, permutation_sparse_vect[i] % (weight - i));
|
||||
swap(permuted_sparse_vect + i, 0, (uint16_t) (permutation_sparse_vect[i] % (weight - i)));
|
||||
}
|
||||
|
||||
for (i = 0; i < weight; i++) {
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
static void compute_fft_betas(uint16_t *betas);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size);
|
||||
static void radix(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void radix_big(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void fft_rec(uint16_t *w, uint16_t *f, size_t f_coeffs, uint8_t m, uint32_t m_f, const uint16_t *betas);
|
||||
@ -46,7 +46,7 @@ static void compute_fft_betas(uint16_t *betas) {
|
||||
* @param[in] set Array of set_size elements
|
||||
* @param[in] set_size Size of the array set
|
||||
*/
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size) {
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size) {
|
||||
uint16_t i, j;
|
||||
subset_sums[0] = 0;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
static void compute_fft_betas(uint16_t *betas);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size);
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size);
|
||||
static void radix(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void radix_big(uint16_t *f0, uint16_t *f1, const uint16_t *f, uint32_t m_f);
|
||||
static void fft_rec(uint16_t *w, uint16_t *f, size_t f_coeffs, uint8_t m, uint32_t m_f, const uint16_t *betas);
|
||||
@ -46,8 +46,8 @@ static void compute_fft_betas(uint16_t *betas) {
|
||||
* @param[in] set Array of set_size elements
|
||||
* @param[in] set_size Size of the array set
|
||||
*/
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, size_t set_size) {
|
||||
size_t i, j;
|
||||
static void compute_subset_sums(uint16_t *subset_sums, const uint16_t *set, uint16_t set_size) {
|
||||
uint16_t i, j;
|
||||
subset_sums[0] = 0;
|
||||
|
||||
for (i = 0; i < set_size; ++i) {
|
||||
|
@ -42,10 +42,11 @@ static inline void swap(uint16_t *tab, uint16_t elt1, uint16_t elt2) {
|
||||
* @param[out] o Pointer to the result
|
||||
*/
|
||||
static void reduce(uint64_t *o, const uint64_t *a) {
|
||||
size_t i;
|
||||
uint64_t r;
|
||||
uint64_t carry;
|
||||
|
||||
for (uint32_t i = 0; i < VEC_N_SIZE_64; i++) {
|
||||
for (i = 0; i < VEC_N_SIZE_64; i++) {
|
||||
r = a[i + VEC_N_SIZE_64 - 1] >> (PARAM_N & 63);
|
||||
carry = (uint64_t) (a[i + VEC_N_SIZE_64] << (64 - (PARAM_N & 63)));
|
||||
o[i] = a[i] ^ r ^ carry;
|
||||
@ -78,7 +79,7 @@ static void fast_convolution_mult(uint64_t *o, const uint32_t *a1, const uint64_
|
||||
uint16_t permutation_sparse_vect[PARAM_OMEGA_E];
|
||||
uint64_t *pt;
|
||||
uint16_t *res_16;
|
||||
uint16_t i, j;
|
||||
size_t i, j;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
permuted_table[i] = i;
|
||||
@ -113,7 +114,7 @@ static void fast_convolution_mult(uint64_t *o, const uint32_t *a1, const uint64_
|
||||
seedexpander(ctx, (uint8_t *) permutation_sparse_vect, weight * sizeof(uint16_t));
|
||||
|
||||
for (i = 0; i + 1 < weight; i++) {
|
||||
swap(permuted_sparse_vect + i, 0, permutation_sparse_vect[i] % (weight - i));
|
||||
swap(permuted_sparse_vect + i, 0, (uint16_t) (permutation_sparse_vect[i] % (weight - i)));
|
||||
}
|
||||
|
||||
for (i = 0; i < weight; i++) {
|
||||
|
@ -28,6 +28,7 @@ consistency_checks:
|
||||
- repetition.h
|
||||
- vector.h
|
||||
- bch.c
|
||||
- fft.c
|
||||
- gf.c
|
||||
- hqc.c
|
||||
- kem.c
|
||||
@ -53,6 +54,7 @@ consistency_checks:
|
||||
- repetition.h
|
||||
- vector.h
|
||||
- bch.c
|
||||
- fft.c
|
||||
- gf.c
|
||||
- hqc.c
|
||||
- kem.c
|
||||
|
@ -21,6 +21,7 @@ consistency_checks:
|
||||
- vector.h
|
||||
- bch.c
|
||||
- code.c
|
||||
- fft.c
|
||||
- gf2x.c
|
||||
- gf.c
|
||||
- hqc.c
|
||||
@ -47,6 +48,7 @@ consistency_checks:
|
||||
- vector.h
|
||||
- bch.c
|
||||
- code.c
|
||||
- fft.c
|
||||
- gf2x.c
|
||||
- gf.c
|
||||
- hqc.c
|
||||
|
@ -23,6 +23,7 @@ consistency_checks:
|
||||
- reed_muller.h
|
||||
- reed_solomon.h
|
||||
- code.c
|
||||
- fft.c
|
||||
- source:
|
||||
scheme: hqc-rmrs-192
|
||||
implementation: avx2
|
||||
@ -55,6 +56,7 @@ consistency_checks:
|
||||
- reed_muller.h
|
||||
- reed_solomon.h
|
||||
- code.c
|
||||
- fft.c
|
||||
- source:
|
||||
scheme: hqc-rmrs-256
|
||||
implementation: avx2
|
||||
|
@ -26,6 +26,7 @@ consistency_checks:
|
||||
- reed_solomon.h
|
||||
- vector.h
|
||||
- code.c
|
||||
- fft.c
|
||||
- gf2x.c
|
||||
- gf.c
|
||||
- hqc.c
|
||||
@ -59,6 +60,7 @@ consistency_checks:
|
||||
- reed_solomon.h
|
||||
- vector.h
|
||||
- code.c
|
||||
- fft.c
|
||||
- gf2x.c
|
||||
- gf.c
|
||||
- hqc.c
|
||||
|
@ -11,6 +11,7 @@ consistency_checks:
|
||||
- reed_muller.h
|
||||
- reed_solomon.h
|
||||
- code.c
|
||||
- fft.c
|
||||
- source:
|
||||
scheme: hqc-rmrs-256
|
||||
implementation: clean
|
||||
@ -22,6 +23,7 @@ consistency_checks:
|
||||
- reed_muller.h
|
||||
- reed_solomon.h
|
||||
- code.c
|
||||
- fft.c
|
||||
- source:
|
||||
scheme: hqc-rmrs-256
|
||||
implementation: avx2
|
||||
|
@ -11,6 +11,7 @@ consistency_checks:
|
||||
- reed_muller.h
|
||||
- reed_solomon.h
|
||||
- code.c
|
||||
- fft.c
|
||||
- source:
|
||||
scheme: hqc-rmrs-256
|
||||
implementation: clean
|
||||
@ -44,3 +45,4 @@ consistency_checks:
|
||||
- reed_muller.h
|
||||
- reed_solomon.h
|
||||
- code.c
|
||||
- fft.c
|
||||
|
@ -11,3 +11,4 @@ consistency_checks:
|
||||
- reed_muller.h
|
||||
- reed_solomon.h
|
||||
- code.c
|
||||
- fft.c
|
||||
|
@ -11,3 +11,4 @@ consistency_checks:
|
||||
- reed_muller.h
|
||||
- reed_solomon.h
|
||||
- code.c
|
||||
- fft.c
|
||||
|
Cargando…
Referencia en una nueva incidencia
Block a user