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

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>
Include dependency graph for ntru_decrypt.c:

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)
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

NTRU decryption.

This file handles the NTRU decryption algorithm.

Definition in file ntru_decrypt.c.


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