aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/aws/s2n/pq-crypto/kyber_90s_r2/reduce.h
blob: f9a9b76213b9cc99398d5d61b5fda700e3368b6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef REDUCE_H
#define REDUCE_H

#include <stdint.h>

#define MONT 2285 // 2^16 % Q
#define QINV 62209 // q^(-1) mod 2^16

int16_t PQCLEAN_KYBER51290S_CLEAN_montgomery_reduce(int32_t a);

int16_t PQCLEAN_KYBER51290S_CLEAN_barrett_reduce(int16_t a);

int16_t PQCLEAN_KYBER51290S_CLEAN_csubq(int16_t a);

#endif