ALL: improve readability

This commit is contained in:
2014-05-25 23:04:22 +02:00
parent 6aebea2cde
commit e4c5094af9
12 changed files with 315 additions and 268 deletions

View File

@@ -36,7 +36,24 @@
#include <fmpz.h>
void ntru_encrypt_poly(
/**
* encrypt the msg, using the math:
* e = (h r) + m (mod q)
*
* e = the encrypted poly
* h = the public key
* r = the random poly
* m = the message poly
* q = large mod
*
* @param msg pb_poly* the message to encrypt
* @param pub_key pb_poly* the public key
* @param rnd pb_poly* the random poly
* @param out pb_poly* the output poly [out]
* @param ctx ntru_context* the ntru context
*/
void
ntru_encrypt_poly(
fmpz_poly_t msg,
fmpz_poly_t pub_key,
fmpz_poly_t rnd,