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

public API, encryption More...

#include "ntru.h"
#include <fmpz_poly.h>
#include <fmpz.h>
Include dependency graph for encrypt.h:

Go to the source code of this file.

Functions

stringntru_encrypt_string (const string *msg, const fmpz_poly_t pub_key, const fmpz_poly_t rnd, const ntru_params *params)

Detailed Description

public API, encryption

This file holds the public API of encryption of the pqc NTRU implementation and is meant to be installed on the client system.

Definition in file encrypt.h.


Function Documentation

string* ntru_encrypt_string ( const string msg,
const fmpz_poly_t  pub_key,
const fmpz_poly_t  rnd,
const ntru_params params 
)

Encrypt a message in the form of a null-terminated char array and return a string.

Parameters:
msgthe message
pub_keythe public key
rndthe random poly (should have relatively small coefficients, but not restricted to {-1, 0, 1})
paramsntru_params the ntru context
Returns:
the newly allocated encrypted string, NULL on failure

Encrypt a message in the form of a null-terminated char array and return a string.

Parameters:
msgthe message
pub_keythe public key
rndthe random poly (should have relatively small coefficients, but not restricted to {-1, 0, 1})
paramsntru_params the ntru context
Returns:
the newly allocated encrypted string

Definition at line 74 of file ntru_encrypt.c.

 All Data Structures Files Functions Variables Typedefs Defines