2018-08-13 15:43:27 +00:00
|
|
|
#ifndef LIBNTRUP_NTRU_H
|
|
|
|
#define LIBNTRUP_NTRU_H
|
2018-08-14 21:28:14 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
2018-08-13 15:43:27 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "ntru_api.h"
|
|
|
|
|
2018-08-14 21:28:14 +00:00
|
|
|
void
|
|
|
|
ntru_init(int force_no_avx2);
|
2018-08-13 15:43:27 +00:00
|
|
|
|
2018-08-14 21:28:14 +00:00
|
|
|
int
|
|
|
|
crypto_kem_enc(unsigned char *cstr, unsigned char *k,
|
|
|
|
const unsigned char *pk);
|
2018-08-13 15:43:27 +00:00
|
|
|
|
2018-08-14 21:28:14 +00:00
|
|
|
int
|
|
|
|
crypto_kem_dec(unsigned char *k, const unsigned char *cstr,
|
|
|
|
const unsigned char *sk);
|
2018-08-13 15:43:27 +00:00
|
|
|
|
2018-08-14 21:28:14 +00:00
|
|
|
int
|
|
|
|
crypto_kem_keypair(unsigned char *pk, unsigned char *sk);
|
2018-08-13 15:43:27 +00:00
|
|
|
|
|
|
|
#define crypto_kem_SECRETKEYBYTES 1600
|
|
|
|
#define crypto_kem_PUBLICKEYBYTES 1218
|
|
|
|
#define crypto_kem_CIPHERTEXTBYTES 1047
|
2018-08-13 23:22:31 +00:00
|
|
|
|
|
|
|
#define NTRU_SECRETKEYBYTES CRYPTO_SECRETKEYBYTES
|
|
|
|
#define NTRU_PUBLICKEYBYTES CRYPTO_PUBLICKEYBYTES
|
|
|
|
#define NTRU_CIPHERTEXTBYTES CRYPTO_CIPHERTEXTBYTES
|
|
|
|
|
2018-08-13 15:43:27 +00:00
|
|
|
#define CRYPTO_BYTES 32
|
|
|
|
|
2018-08-14 21:28:14 +00:00
|
|
|
#ifdef __cplusplus
|
2018-08-13 15:43:27 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|