1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-26 17:31:38 +00:00
pqcrypto/crypto_sign/dilithium2/clean/reduce.h

18 lines
434 B
C
Raw Normal View History

2019-12-06 15:16:41 +00:00
#ifndef PQCLEAN_DILITHIUM2_CLEAN_REDUCE_H
#define PQCLEAN_DILITHIUM2_CLEAN_REDUCE_H
#include "params.h"
#include <stdint.h>
#define MONT (-4186625) // 2^32 % Q
#define QINV 58728449 // q^(-1) mod 2^32
int32_t PQCLEAN_DILITHIUM2_CLEAN_montgomery_reduce(int64_t a);
int32_t PQCLEAN_DILITHIUM2_CLEAN_reduce32(int32_t a);
int32_t PQCLEAN_DILITHIUM2_CLEAN_caddq(int32_t a);
int32_t PQCLEAN_DILITHIUM2_CLEAN_freeze(int32_t a);
#endif