kyber512r3_indcpa_avx2.h 1.1 KB

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <stdint.h>
  3. #include "kyber512r3_params.h"
  4. #include "kyber512r3_polyvec_avx2.h"
  5. #if defined(S2N_KYBER512R3_AVX2_BMI2)
  6. #define gen_matrix_avx2 S2N_KYBER_512_R3_NAMESPACE(gen_matrix_avx2)
  7. void gen_matrix_avx2(polyvec *a, const uint8_t seed[S2N_KYBER_512_R3_SYMBYTES], int transposed);
  8. #define indcpa_keypair_avx2 S2N_KYBER_512_R3_NAMESPACE(indcpa_keypair_avx2)
  9. int indcpa_keypair_avx2(uint8_t pk[S2N_KYBER_512_R3_INDCPA_PUBLICKEYBYTES],
  10. uint8_t sk[S2N_KYBER_512_R3_INDCPA_SECRETKEYBYTES]);
  11. #define indcpa_enc_avx2 S2N_KYBER_512_R3_NAMESPACE(indcpa_enc_avx2)
  12. void indcpa_enc_avx2(uint8_t c[S2N_KYBER_512_R3_INDCPA_BYTES],
  13. const uint8_t m[S2N_KYBER_512_R3_INDCPA_MSGBYTES],
  14. const uint8_t pk[S2N_KYBER_512_R3_INDCPA_PUBLICKEYBYTES],
  15. const uint8_t coins[S2N_KYBER_512_R3_SYMBYTES]);
  16. #define indcpa_dec_avx2 S2N_KYBER_512_R3_NAMESPACE(indcpa_dec_avx2)
  17. void indcpa_dec_avx2(uint8_t m[S2N_KYBER_512_R3_INDCPA_MSGBYTES],
  18. const uint8_t c[S2N_KYBER_512_R3_INDCPA_BYTES],
  19. const uint8_t sk[S2N_KYBER_512_R3_INDCPA_SECRETKEYBYTES]);
  20. #endif