post quantum cryptography
Highly optimized implementation of the NTRUEncrypt algorithm
|
public API, key handling More...
Go to the source code of this file.
Data Structures | |
struct | keypair |
Typedefs | |
typedef struct keypair | keypair |
Functions | |
bool | ntru_create_keypair (keypair *pair, const fmpz_poly_t f, const fmpz_poly_t g, const ntru_params *params) |
void | export_public_key (char const *const filename, const fmpz_poly_t pub, const ntru_params *params) void export_priv_key(char const *const filename |
void const fmpz_poly_t const ntru_params *params void | import_public_key (fmpz_poly_t pub, char const *const filename, const ntru_params *params) |
void | import_priv_key (fmpz_poly_t priv, fmpz_poly_t priv_inv, char const *const filename, const ntru_params *params) |
void | ntru_delete_keypair (keypair *pair) |
Variables | |
void const fmpz_poly_t | priv |
public API, key handling
This file holds the public API of generating, exporting and importing public and private keys of the pqc NTRU implementation and is meant to be installed on the client system.
Definition in file ntru_keypair.h.
Definition at line 42 of file ntru_keypair.h.
void export_public_key | ( | char const *const | filename, |
const fmpz_poly_t | pub, | ||
const ntru_params * | params | ||
) | const |
Export the public key to a file.
filename | the file to save the public key into |
pub | the public key |
params | the NTRU context Export the private key to a file. |
filename | the file to save the private key into |
priv | the private key |
params | the NTRU context |
void import_priv_key | ( | fmpz_poly_t | priv, |
fmpz_poly_t | priv_inv, | ||
char const *const | filename, | ||
const ntru_params * | params | ||
) |
Import the private key from a file and store him along with his inverse.
priv | where to save the private key, must be initialized [out] |
priv_inv | where to save the inverse of the private key, must be initialized [out] |
filename | the file to get the private key from |
params | the NTRU context |
void const fmpz_poly_t const ntru_params* params void import_public_key | ( | fmpz_poly_t | pub, |
char const *const | filename, | ||
const ntru_params * | params | ||
) |
Import the public key from a file.
pub | where to save the public key, must be initialized [out] |
filename | the file to get the public key from |
params | the NTRU context |
bool ntru_create_keypair | ( | keypair * | pair, |
const fmpz_poly_t | f, | ||
const fmpz_poly_t | g, | ||
const ntru_params * | params | ||
) |
Creates an NTRU key pair, consisting of public and private components.
pair | store private and public components here (the polynomials inside the struct will be automatically initialized) [out] |
f | a random polynomial |
g | a random polynomial |
params | the NTRU context |
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 |
void const fmpz_poly_t priv |
Definition at line 110 of file ntru_keypair.h.