post quantum cryptography
Highly optimized implementation of the NTRUEncrypt algorithm
|
header for ntru_keypair.c More...
Go to the source code of this file.
Data Structures | |
struct | keypair |
Typedefs | |
typedef struct keypair | keypair |
Functions | |
bool | ntru_create_keypair (fmpz_poly_t f, fmpz_poly_t g, keypair *pair, ntru_params *params) |
void | export_public_key (char const *const filename, fmpz_poly_t pub, ntru_params *params) |
void | export_priv_key (char const *const filename, fmpz_poly_t priv, ntru_params *params) |
void | import_public_key (char const *const filename, fmpz_poly_t pub, ntru_params *params) |
void | import_priv_key (char const *const filename, fmpz_poly_t priv, fmpz_poly_t priv_inv, ntru_params *params) |
void | ntru_delete_keypair (keypair *pair) |
header for ntru_keypair.c
Header for internal API of ntru_keypair.c.
Definition in file ntru_keypair.h.
Definition at line 39 of file ntru_keypair.h.
void export_priv_key | ( | char const *const | filename, |
fmpz_poly_t | priv, | ||
ntru_params * | params | ||
) |
Export the private key to a file.
filename | the file to save the private key into |
priv | the private key |
params | the NTRU context |
Definition at line 111 of file ntru_keypair.c.
void export_public_key | ( | char const *const | filename, |
fmpz_poly_t | pub, | ||
ntru_params * | params | ||
) |
Export the public key to a file.
filename | the file to save the public key into |
pub | the public key |
params | the NTRU context |
Definition at line 96 of file ntru_keypair.c.
void import_priv_key | ( | char const *const | filename, |
fmpz_poly_t | priv, | ||
fmpz_poly_t | priv_inv, | ||
ntru_params * | params | ||
) |
Import the private key from a file and store him along with his inverse.
filename | the file to get the private key from |
priv | where to save the private key [out] |
priv_inv | where to save the inverse of the private key [out] |
params | the NTRU context |
Definition at line 157 of file ntru_keypair.c.
void import_public_key | ( | char const *const | filename, |
fmpz_poly_t | pub, | ||
ntru_params * | params | ||
) |
Import the public key from a file.
filename | the file to get the public key from |
pub | where to save the public key [out] |
params | the NTRU context |
Definition at line 132 of file ntru_keypair.c.
bool ntru_create_keypair | ( | fmpz_poly_t | f, |
fmpz_poly_t | g, | ||
keypair * | pair, | ||
ntru_params * | params | ||
) |
Creates an NTRU key pair, consisting of public and private components.
f | a random polynomial |
g | a random polynomial |
pair | store private and public components here [out] |
params | the NTRU context |
Definition at line 47 of file ntru_keypair.c.
void ntru_delete_keypair | ( | keypair * | pair | ) |
Used to free the inner structure of a keypair. This will not call free() on the pair itself.
pair | the pair to free the inner structure of |
Definition at line 197 of file ntru_keypair.c.