2020-07-31 07:17:42 +01:00
|
|
|
#ifndef PQCLEAN_KYBER768_CLEAN_REDUCE_H
|
|
|
|
#define PQCLEAN_KYBER768_CLEAN_REDUCE_H
|
2019-01-15 15:03:38 +00:00
|
|
|
|
2020-07-31 07:17:42 +01:00
|
|
|
#include "params.h"
|
2019-01-15 15:03:38 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2020-07-31 07:17:42 +01:00
|
|
|
#define MONT 2285 // 2^16 mod q
|
|
|
|
#define QINV 62209 // q^-1 mod 2^16
|
|
|
|
|
2019-01-15 15:03:38 +00:00
|
|
|
|
2019-05-06 13:50:27 +01:00
|
|
|
int16_t PQCLEAN_KYBER768_CLEAN_montgomery_reduce(int32_t a);
|
2019-01-15 15:03:38 +00:00
|
|
|
|
2020-07-31 07:17:42 +01:00
|
|
|
|
2019-05-06 13:50:27 +01:00
|
|
|
int16_t PQCLEAN_KYBER768_CLEAN_barrett_reduce(int16_t a);
|
|
|
|
|
2020-07-31 07:17:42 +01:00
|
|
|
|
2019-05-06 13:50:27 +01:00
|
|
|
int16_t PQCLEAN_KYBER768_CLEAN_csubq(int16_t a);
|
2019-01-15 15:03:38 +00:00
|
|
|
|
|
|
|
#endif
|