post quantum cryptography
Highly optimized implementation of the NTRUEncrypt algorithm
Functions
/home/travis/build/hasufell/pqc/src/ntru_decrypt.h File Reference

header for ntru_decrypt.c More...

#include "ntru_params.h"
#include "ntru_poly.h"
#include "ntru_string.h"
#include <fmpz_poly.h>
#include <fmpz.h>
Include dependency graph for ntru_decrypt.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_tern, const ntru_params *params)
stringntru_decrypt_string (const string *encr_msg, const fmpz_poly_t priv_key, const fmpz_poly_t priv_key_inv, const ntru_params *params)

Detailed Description

header for ntru_decrypt.c

Header for the external API of ntru_decrypt.c.

Definition in file ntru_decrypt.h.


Function Documentation

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

Parameters:
encr_msgencrypted polynom with maximum length of N from the given context
priv_keythe polynom containing the private key to decrypt the message
priv_key_invthe inverse polynome to the private key
out_ternthe resulting ternary polynom [out]
paramsthe 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.

Parameters:
encr_msgthe encrypted message in the form of a string
priv_keythe polynom containing the private key to decrypt the message
priv_key_invthe inverse polynome to the private key
paramsthe ntru_params
Returns:
the decrypted string

Definition at line 92 of file ntru_decrypt.c.

 All Data Structures Files Functions Variables Typedefs Defines