kyber512r3_rejsample_avx2.h 643 B

1234567891011121314
  1. #pragma once
  2. #include <stdint.h>
  3. #include "kyber512r3_params.h"
  4. #include "kyber512r3_fips202.h"
  5. #if defined(S2N_KYBER512R3_AVX2_BMI2)
  6. #define S2N_KYBER_512_R3_XOF_BLOCKBYTES S2N_KYBER_512_R3_SHAKE128_RATE
  7. #define S2N_KYBER_512_R3_REJ_UNIFORM_AVX_NBLOCKS ((12*S2N_KYBER_512_R3_N/8*(1 << 12)/S2N_KYBER_512_R3_Q + S2N_KYBER_512_R3_XOF_BLOCKBYTES)/S2N_KYBER_512_R3_XOF_BLOCKBYTES)
  8. #define S2N_KYBER_512_R3_REJ_UNIFORM_AVX_BUFLEN (S2N_KYBER_512_R3_REJ_UNIFORM_AVX_NBLOCKS*S2N_KYBER_512_R3_XOF_BLOCKBYTES)
  9. #define rej_uniform_avx2 S2N_KYBER_512_R3_NAMESPACE(rej_uniform_avx2)
  10. unsigned int rej_uniform_avx2(int16_t *r, const uint8_t *buf);
  11. #endif