diff --git a/src/context.h b/src/context.h index e0e0883..d534431 100644 --- a/src/context.h +++ b/src/context.h @@ -19,6 +19,12 @@ * MA 02110-1301 USA */ +/** + * @file context.h + * This file defines the ntru_context + * and related data types. + * @brief NTRU context types + */ #ifndef NTRU_CONTEXT_H #define NTRU_CONTEXT_H diff --git a/src/decrypt.c b/src/decrypt.c index f162f00..2123caf 100644 --- a/src/decrypt.c +++ b/src/decrypt.c @@ -19,6 +19,13 @@ * MA 02110-1301 USA */ +/** + * @file decrypt.c + * This file handles the NTRU decryption + * algorithm. + * @brief NTRU decryption + */ + #include "decrypt.h" #include diff --git a/src/decrypt.h b/src/decrypt.h index d610ecd..e4447f6 100644 --- a/src/decrypt.h +++ b/src/decrypt.h @@ -19,6 +19,12 @@ * MA 02110-1301 USA */ +/** + * @file decrypt.h + * Header for the external API of decrypt.c. + * @brief header for decrypt.c + */ + #ifndef NTRU_DECRYPT_H #define NTRU_DECRYPT_H diff --git a/src/encrypt.c b/src/encrypt.c index d529b07..9a366d3 100644 --- a/src/encrypt.c +++ b/src/encrypt.c @@ -19,6 +19,13 @@ * MA 02110-1301 USA */ +/** + * @file encrypt.c + * This file handles the NTRU encryption + * algorithm. + * @brief NTRU encryption + */ + #include "encrypt.h" #include diff --git a/src/encrypt.h b/src/encrypt.h index 18dcaa4..886c3b8 100644 --- a/src/encrypt.h +++ b/src/encrypt.h @@ -19,6 +19,12 @@ * MA 02110-1301 USA */ +/** + * @file encrypt.h + * Header for the internal API of encrypt.c. + * @brief header for encrypt.c + */ + #ifndef PQC_ENCRYPT_H #define PQC_ENCRYPT_H diff --git a/src/err.h b/src/err.h index 747c6c5..531b3c5 100644 --- a/src/err.h +++ b/src/err.h @@ -19,6 +19,12 @@ * MA 02110-1301 USA */ +/** + * @file err.h + * This file provides error macros + * and functions for the NTRU cryptosystem. + * @brief error handling + */ #ifndef NTRU_ERR_H #define NTRU_ERR_H diff --git a/src/keypair.c b/src/keypair.c index 5b72911..8f3dd4d 100644 --- a/src/keypair.c +++ b/src/keypair.c @@ -19,6 +19,13 @@ * MA 02110-1301 USA */ +/** + * @file keypair.c + * This file handles the creation of the + * key pair and possibly common operations on them. + * @brief key creation and operations + */ + #include "context.h" #include "keypair.h" #include "poly.h" @@ -29,6 +36,16 @@ #include +/** + * Creates an NTRU key pair, + * consisting of public and private + * components. + * + * @param f a random polynomial + * @param g a random polynomial + * @param pair store private and public components here [out] + * @param ctx the NTRU context + */ bool ntru_create_keypair( fmpz_poly_t f, fmpz_poly_t g, diff --git a/src/keypair.h b/src/keypair.h index 79d2eb3..680ef12 100644 --- a/src/keypair.h +++ b/src/keypair.h @@ -19,6 +19,12 @@ * MA 02110-1301 USA */ +/** + * @file keypair.h + * Header for internal API of keypair.c. + * @brief header for keypair.c + */ + #ifndef NTRU_KEYPAIR_H #define NTRU_KEYPAIR_H diff --git a/src/mem.c b/src/mem.c index 7a63f58..49429cc 100644 --- a/src/mem.c +++ b/src/mem.c @@ -19,6 +19,13 @@ * MA 02110-1301 USA */ +/** + * @file mem.c + * This file provides functions for + * memory management. + * @brief memory management + */ + #include "mem.h" #include diff --git a/src/mem.h b/src/mem.h index eabe1e9..8c0ca3c 100644 --- a/src/mem.h +++ b/src/mem.h @@ -19,6 +19,12 @@ * MA 02110-1301 USA */ +/** + * @file mem.h + * Header for the internal API of mem.c. + * @brief header for mem.c + */ + #ifndef NTRU_MEM_H #define NTRU_MEM_H diff --git a/src/poly.c b/src/poly.c index a7912d5..e78706d 100644 --- a/src/poly.c +++ b/src/poly.c @@ -19,6 +19,14 @@ * MA 02110-1301 USA */ +/** + * @file poly.c + * This files purpose is to handle polynomials + * in general, allowing modification, arithmetic + * and common algorithms like inverting them. + * @brief operations on polynomials + */ + #include "context.h" #include "err.h" #include "mem.h" diff --git a/src/poly.h b/src/poly.h index 839898a..0707a95 100644 --- a/src/poly.h +++ b/src/poly.h @@ -19,6 +19,11 @@ * MA 02110-1301 USA */ +/** + * @file poly.h + * Header for the internal API of poly.c. + * @brief header for poly.c + */ #ifndef NTRU_POLY_H #define NTRU_POLY_H