kyber512r3_reduce.h 410 B

123456789101112131415
  1. #pragma once
  2. #include <stdint.h>
  3. #include "kyber512r3_params.h"
  4. #define S2N_KYBER_512_R3_QINV 62209 /* q^-1 mod 2^16 */
  5. #define montgomery_reduce S2N_KYBER_512_R3_NAMESPACE(montgomery_reduce)
  6. int16_t montgomery_reduce(int32_t a);
  7. #define barrett_reduce S2N_KYBER_512_R3_NAMESPACE(barrett_reduce)
  8. int16_t barrett_reduce(int16_t a);
  9. #define csubq S2N_KYBER_512_R3_NAMESPACE(csubq)
  10. int16_t csubq(int16_t x);