1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-24 00:11:27 +00:00
pqcrypto/crypto_kem/kyber1024-90s/clean/reduce.h
Thom Wiggers c0f56ccdc2 Update Kyber from upstream
Makes Kyber-AVX run on MacOS (#251)
2021-03-24 21:02:49 +00:00

20 lines
392 B
C

#ifndef PQCLEAN_KYBER102490S_CLEAN_REDUCE_H
#define PQCLEAN_KYBER102490S_CLEAN_REDUCE_H
#include "params.h"
#include <stdint.h>
#define MONT 2285 // 2^16 mod q
#define QINV 62209 // q^-1 mod 2^16
int16_t PQCLEAN_KYBER102490S_CLEAN_montgomery_reduce(int32_t a);
int16_t PQCLEAN_KYBER102490S_CLEAN_barrett_reduce(int16_t a);
int16_t PQCLEAN_KYBER102490S_CLEAN_csubq(int16_t a);
#endif