1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-23 07:59:01 +00:00
pqcrypto/crypto_kem/sntrup857/clean/crypto_encode_857x1723round.c
John M. Schanck 431dbada45 Add sntrup{653,761,857} and ntrulpr{653,761,857}
Exported from SUPERCOP-20200826 using the scripts at:
https://github.com/jschanck/pqclean-package-ntruprime
2021-03-24 21:02:46 +00:00

18 lines
411 B
C

#include "crypto_encode_857x1723.h"
#include "crypto_encode_857x1723round.h"
#define int16 int16_t
#define p 857
void PQCLEAN_SNTRUP857_CLEAN_crypto_encode_857x1723round(unsigned char *out, const void *v) {
const int16 *a = v;
int16 x[p];
int i;
for (i = 0; i < p; ++i) {
x[i] = 3 * ((10923 * a[i] + 16384) >> 15);
}
PQCLEAN_SNTRUP857_CLEAN_crypto_encode_857x1723(out, x);
}