2019-12-06 15:16:41 +00:00
|
|
|
#ifndef PQCLEAN_DILITHIUM3_CLEAN_REDUCE_H
|
|
|
|
#define PQCLEAN_DILITHIUM3_CLEAN_REDUCE_H
|
2021-02-01 05:32:40 +00:00
|
|
|
#include "params.h"
|
2019-06-11 10:18:05 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2021-02-01 05:32:40 +00:00
|
|
|
#define MONT (-4186625) // 2^32 % Q
|
|
|
|
#define QINV 58728449 // q^(-1) mod 2^32
|
2019-06-11 10:18:05 +01:00
|
|
|
|
2021-02-01 05:32:40 +00:00
|
|
|
int32_t PQCLEAN_DILITHIUM3_CLEAN_montgomery_reduce(int64_t a);
|
2019-06-11 10:18:05 +01:00
|
|
|
|
2021-02-01 05:32:40 +00:00
|
|
|
int32_t PQCLEAN_DILITHIUM3_CLEAN_reduce32(int32_t a);
|
2019-06-11 10:18:05 +01:00
|
|
|
|
2021-02-01 05:32:40 +00:00
|
|
|
int32_t PQCLEAN_DILITHIUM3_CLEAN_caddq(int32_t a);
|
2019-06-11 10:18:05 +01:00
|
|
|
|
2021-02-01 05:32:40 +00:00
|
|
|
int32_t PQCLEAN_DILITHIUM3_CLEAN_freeze(int32_t a);
|
2019-06-11 10:18:05 +01:00
|
|
|
|
|
|
|
#endif
|