From 94e8ef48dc6974f5893244623866f9461743e73a Mon Sep 17 00:00:00 2001 From: "John M. Schanck" Date: Fri, 11 Sep 2020 12:47:03 -0400 Subject: [PATCH] remove unused function --- crypto_kem/hqc-128/avx2/bch.c | 30 ------------------------------ crypto_kem/hqc-128/avx2/bch.h | 3 --- crypto_kem/hqc-192/avx2/bch.c | 30 ------------------------------ crypto_kem/hqc-192/avx2/bch.h | 3 --- crypto_kem/hqc-256/avx2/bch.c | 30 ------------------------------ crypto_kem/hqc-256/avx2/bch.h | 3 --- 6 files changed, 99 deletions(-) diff --git a/crypto_kem/hqc-128/avx2/bch.c b/crypto_kem/hqc-128/avx2/bch.c index c8d0de8b..2aedd3eb 100644 --- a/crypto_kem/hqc-128/avx2/bch.c +++ b/crypto_kem/hqc-128/avx2/bch.c @@ -18,36 +18,6 @@ static void message_from_codeword(uint64_t *message, const uint64_t *codeword); static void compute_syndromes(__m256i *syndromes, const uint64_t *rcv); static void compute_roots(uint64_t *error, const uint16_t *sigma); -/** - * @brief Computes the values alpha^ij for decoding syndromes - * - * function to initialize a table which contains values alpha^ij for i in [0,N1[ and j in [1,2*PARAM_DELTA] - * these values are used in order to compute the syndromes of the received word v(x)=v_0+v_1x+...+v_{n1-1}x^{n1-1} - * value alpha^ij is stored in alpha_ij_table[2*PARAM_DELTA*i+j-1] - * The syndromes are equal to v(alpha^k) for k in [1,2*PARAM_DELTA] - * Size of the table is fixed to match 256 bit representation - * Useless values are filled with 0. - * - * @param[in] exp Exp look-up-table of GF - */ -void PQCLEAN_HQC128_AVX2_table_alphaij_generation(const uint16_t *exp) { - int32_t tmp_value; - int16_t *alpha_tmp; - - // pre-computation of alpha^ij for i in [0, N1[ and j in [1, 2*PARAM_DELTA] - // see comment of alpha_ij_table_init() function. - for (uint16_t i = 0; i < PARAM_N1; ++i) { - tmp_value = 0; - alpha_tmp = table_alpha_ij + i * (PARAM_DELTA << 1); - for (uint16_t j = 0; j < (PARAM_DELTA << 1); j++) { - tmp_value = PQCLEAN_HQC128_AVX2_gf_mod(tmp_value + i); - alpha_tmp[j] = gf_exp[tmp_value]; - } - } -} - - - /** * @brief Computes the error locator polynomial (ELP) sigma * diff --git a/crypto_kem/hqc-128/avx2/bch.h b/crypto_kem/hqc-128/avx2/bch.h index 894edb18..71bce756 100644 --- a/crypto_kem/hqc-128/avx2/bch.h +++ b/crypto_kem/hqc-128/avx2/bch.h @@ -15,7 +15,4 @@ void PQCLEAN_HQC128_AVX2_bch_code_decode(uint64_t *message, uint64_t *vector); -void PQCLEAN_HQC128_AVX2_table_alphaij_generation(const uint16_t *exp); - - #endif diff --git a/crypto_kem/hqc-192/avx2/bch.c b/crypto_kem/hqc-192/avx2/bch.c index 55ccb75a..567d29cf 100644 --- a/crypto_kem/hqc-192/avx2/bch.c +++ b/crypto_kem/hqc-192/avx2/bch.c @@ -18,36 +18,6 @@ static void message_from_codeword(uint64_t *message, const uint64_t *codeword); static void compute_syndromes(__m256i *syndromes, const uint64_t *rcv); static void compute_roots(uint64_t *error, const uint16_t *sigma); -/** - * @brief Computes the values alpha^ij for decoding syndromes - * - * function to initialize a table which contains values alpha^ij for i in [0,N1[ and j in [1,2*PARAM_DELTA] - * these values are used in order to compute the syndromes of the received word v(x)=v_0+v_1x+...+v_{n1-1}x^{n1-1} - * value alpha^ij is stored in alpha_ij_table[2*PARAM_DELTA*i+j-1] - * The syndromes are equal to v(alpha^k) for k in [1,2*PARAM_DELTA] - * Size of the table is fixed to match 256 bit representation - * Useless values are filled with 0. - * - * @param[in] exp Exp look-up-table of GF - */ -void PQCLEAN_HQC192_AVX2_table_alphaij_generation(const uint16_t *exp) { - int32_t tmp_value; - int16_t *alpha_tmp; - - // pre-computation of alpha^ij for i in [0, N1[ and j in [1, 2*PARAM_DELTA] - // see comment of alpha_ij_table_init() function. - for (uint16_t i = 0; i < PARAM_N1; ++i) { - tmp_value = 0; - alpha_tmp = table_alpha_ij + i * (PARAM_DELTA << 1); - for (uint16_t j = 0; j < (PARAM_DELTA << 1); j++) { - tmp_value = PQCLEAN_HQC192_AVX2_gf_mod(tmp_value + i); - alpha_tmp[j] = gf_exp[tmp_value]; - } - } -} - - - /** * @brief Computes the error locator polynomial (ELP) sigma * diff --git a/crypto_kem/hqc-192/avx2/bch.h b/crypto_kem/hqc-192/avx2/bch.h index fa21f293..a5123876 100644 --- a/crypto_kem/hqc-192/avx2/bch.h +++ b/crypto_kem/hqc-192/avx2/bch.h @@ -15,7 +15,4 @@ void PQCLEAN_HQC192_AVX2_bch_code_decode(uint64_t *message, uint64_t *vector); -void PQCLEAN_HQC192_AVX2_table_alphaij_generation(const uint16_t *exp); - - #endif diff --git a/crypto_kem/hqc-256/avx2/bch.c b/crypto_kem/hqc-256/avx2/bch.c index 6d41f9c3..73d84d67 100644 --- a/crypto_kem/hqc-256/avx2/bch.c +++ b/crypto_kem/hqc-256/avx2/bch.c @@ -18,36 +18,6 @@ static void message_from_codeword(uint64_t *message, const uint64_t *codeword); static void compute_syndromes(__m256i *syndromes, const uint64_t *rcv); static void compute_roots(uint64_t *error, const uint16_t *sigma); -/** - * @brief Computes the values alpha^ij for decoding syndromes - * - * function to initialize a table which contains values alpha^ij for i in [0,N1[ and j in [1,2*PARAM_DELTA] - * these values are used in order to compute the syndromes of the received word v(x)=v_0+v_1x+...+v_{n1-1}x^{n1-1} - * value alpha^ij is stored in alpha_ij_table[2*PARAM_DELTA*i+j-1] - * The syndromes are equal to v(alpha^k) for k in [1,2*PARAM_DELTA] - * Size of the table is fixed to match 256 bit representation - * Useless values are filled with 0. - * - * @param[in] exp Exp look-up-table of GF - */ -void PQCLEAN_HQC256_AVX2_table_alphaij_generation(const uint16_t *exp) { - int32_t tmp_value; - int16_t *alpha_tmp; - - // pre-computation of alpha^ij for i in [0, N1[ and j in [1, 2*PARAM_DELTA] - // see comment of alpha_ij_table_init() function. - for (uint16_t i = 0; i < PARAM_N1; ++i) { - tmp_value = 0; - alpha_tmp = table_alpha_ij + i * (PARAM_DELTA << 1); - for (uint16_t j = 0; j < (PARAM_DELTA << 1); j++) { - tmp_value = PQCLEAN_HQC256_AVX2_gf_mod(tmp_value + i); - alpha_tmp[j] = gf_exp[tmp_value]; - } - } -} - - - /** * @brief Computes the error locator polynomial (ELP) sigma * diff --git a/crypto_kem/hqc-256/avx2/bch.h b/crypto_kem/hqc-256/avx2/bch.h index e75f5279..03c00931 100644 --- a/crypto_kem/hqc-256/avx2/bch.h +++ b/crypto_kem/hqc-256/avx2/bch.h @@ -15,7 +15,4 @@ void PQCLEAN_HQC256_AVX2_bch_code_decode(uint64_t *message, uint64_t *vector); -void PQCLEAN_HQC256_AVX2_table_alphaij_generation(const uint16_t *exp); - - #endif