1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-22 23:48:58 +00:00

remove duplication

This commit is contained in:
Henry Case 2021-05-25 22:18:22 +01:00
parent 1120727660
commit e9249a2bee

View File

@ -0,0 +1,22 @@
#ifndef KYBER_REDUCE_H
#define KYBER_REDUCE_H
#include <stdint.h>
// TODO: Remove those once not used
#define PQCLEAN_KYBER512_CLEAN_montgomery_reduce kyber_montgomery_reduce
#define PQCLEAN_KYBER768_CLEAN_montgomery_reduce kyber_montgomery_reduce
#define PQCLEAN_KYBER1024_CLEAN_montgomery_reduce kyber_montgomery_reduce
#define PQCLEAN_KYBER512_CLEAN_barrett_reduce kyber_barrett_reduce
#define PQCLEAN_KYBER768_CLEAN_barrett_reduce kyber_barrett_reduce
#define PQCLEAN_KYBER1024_CLEAN_barrett_reduce kyber_barrett_reduce
#define MONT 2285 // 2^16 mod q
#define QINV 62209 // q^-1 mod 2^16
int16_t kyber_montgomery_reduce(int32_t a);
int16_t kyber_barrett_reduce(int16_t a);
#endif