post quantum cryptography
Highly optimized implementation of the NTRUEncrypt algorithm
|
NTRU decryption. More...
#include "ntru_ascii_poly.h"
#include "ntru_decrypt.h"
#include "ntru_params.h"
#include "ntru_poly.h"
#include "ntru_poly_ascii.h"
#include "ntru_string.h"
#include <stdbool.h>
#include <string.h>
#include <fmpz_poly.h>
#include <fmpz.h>
Go to the source code of this file.
Functions | |
void | ntru_decrypt_poly (const fmpz_poly_t encr_msg, const fmpz_poly_t priv_key, const fmpz_poly_t priv_key_inv, fmpz_poly_t out_bin, const ntru_params *params) |
string * | ntru_decrypt_string (const string *encr_msg, const fmpz_poly_t priv_key, const fmpz_poly_t priv_key_inv, const ntru_params *params) |
NTRU decryption.
This file handles the NTRU decryption algorithm.
Definition in file ntru_decrypt.c.
void ntru_decrypt_poly | ( | const fmpz_poly_t | encr_msg, |
const fmpz_poly_t | priv_key, | ||
const fmpz_poly_t | priv_key_inv, | ||
fmpz_poly_t | out_tern, | ||
const ntru_params * | params | ||
) |
Decryption of the given Polynom with the private key, its inverse and the fitting ntru_params
encr_msg | encrypted polynom with maximum length of N from the given context |
priv_key | the polynom containing the private key to decrypt the message |
priv_key_inv | the inverse polynome to the private key |
out_tern | the resulting ternary polynom [out] |
params | the ntru_params |
Definition at line 46 of file ntru_decrypt.c.
string* ntru_decrypt_string | ( | const string * | encr_msg, |
const fmpz_poly_t | priv_key, | ||
const fmpz_poly_t | priv_key_inv, | ||
const ntru_params * | params | ||
) |
Decryption of a given encrypted string.
encr_msg | the encrypted message in the form of a string |
priv_key | the polynom containing the private key to decrypt the message |
priv_key_inv | the inverse polynome to the private key |
params | the ntru_params |
Definition at line 92 of file ntru_decrypt.c.