ALL: prefix all files with ntru_

This commit is contained in:
hasufell 2014-06-05 15:49:40 +02:00
parent 58bf823e36
commit f7131410bf
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
22 changed files with 110 additions and 109 deletions

View File

@ -2,31 +2,32 @@ include ../common.mk
# sources, headers, objects # sources, headers, objects
PQC_SOURCES = poly.c \ PQC_SOURCES = \
mem.c \ ntru_ascii_poly.c \
encrypt.c \ ntru_decrypt.c \
decrypt.c \ ntru_encrypt.c \
keypair.c \ ntru_file.c \
ascii_poly.c \ ntru_keypair.c \
file.c \ ntru_mem.c \
ntru_string.c \ ntru_poly.c \
poly_ascii.c \ ntru_poly_ascii.c \
rnd.c ntru_rnd.c \
ntru_string.c
PQC_OBJS = $(patsubst %.c, %.o, $(PQC_SOURCES)) PQC_OBJS = $(patsubst %.c, %.o, $(PQC_SOURCES))
PQC_HEADERS = err.h \ PQC_HEADERS = \
poly.h \ ntru_ascii_poly.h \
params.h \ ntru_decrypt.h \
encrypt.h \ ntru_encrypt.h \
decrypt.h \ ntru_err.h \
keypair.h \ ntru_file.h \
ascii_poly.h \ ntru_keypair.h \
params.h \ ntru_poly.h \
file.h \ ntru_params.h \
ntru_string.h \ ntru_poly_ascii.h \
poly_ascii.h \ ntru_rnd.h \
rnd.h ntru_string.h
# libs # libs
LIBS += -L. -lgmp -lmpfr -lflint $(shell $(PKG_CONFIG) --libs glib-2.0) -lm LIBS += -L. -lgmp -lmpfr -lflint $(shell $(PKG_CONFIG) --libs glib-2.0) -lm

View File

@ -20,18 +20,18 @@
*/ */
/** /**
* @file ascii_poly.c * @file ntru_ascii_poly.c
* This file allows to convert ascii strings, including * This file allows to convert ascii strings, including
* base64 encoded ones, to polynomials. * base64 encoded ones, to polynomials.
* @brief ascii to polynomials * @brief ascii to polynomials
*/ */
#include "ascii_poly.h" #include "ntru_ascii_poly.h"
#include "common.h" #include "ntru_common.h"
#include "mem.h" #include "ntru_mem.h"
#include "ntru_params.h"
#include "ntru_poly.h"
#include "ntru_string.h" #include "ntru_string.h"
#include "params.h"
#include "poly.h"
#include <glib.h> #include <glib.h>

View File

@ -20,18 +20,18 @@
*/ */
/** /**
* @file ascii_poly.h * @file ntru_ascii_poly.h
* Header for the internal API of ascii_poly.c. * Header for the internal API of ntru_ascii_poly.c.
* @brief header for ascii_poly.c * @brief header for ntru_ascii_poly.c
*/ */
#ifndef NTRU_ASCII_POLY_H_ #ifndef NTRU_ASCII_POLY_H_
#define NTRU_ASCII_POLY_H_ #define NTRU_ASCII_POLY_H_
#include "common.h" #include "ntru_common.h"
#include "ntru_string.h" #include "ntru_string.h"
#include "params.h" #include "ntru_params.h"
#include <fmpz_poly.h> #include <fmpz_poly.h>
#include <fmpz.h> #include <fmpz.h>

View File

@ -20,7 +20,7 @@
*/ */
/** /**
* @file common.h * @file ntru_common.h
* This file holds common macros and functions * This file holds common macros and functions
* shared throughout the whole codebase without * shared throughout the whole codebase without
* any particular purpose. * any particular purpose.

View File

@ -20,17 +20,17 @@
*/ */
/** /**
* @file decrypt.c * @file ntru_decrypt.c
* This file handles the NTRU decryption * This file handles the NTRU decryption
* algorithm. * algorithm.
* @brief NTRU decryption * @brief NTRU decryption
*/ */
#include "ascii_poly.h" #include "ntru_ascii_poly.h"
#include "decrypt.h" #include "ntru_decrypt.h"
#include "ntru_params.h"
#include "ntru_poly_ascii.h"
#include "ntru_string.h" #include "ntru_string.h"
#include "params.h"
#include "poly_ascii.h"
#include <stdbool.h> #include <stdbool.h>
#include <string.h> #include <string.h>

View File

@ -20,17 +20,17 @@
*/ */
/** /**
* @file decrypt.h * @file ntru_decrypt.h
* Header for the external API of decrypt.c. * Header for the external API of ntru_decrypt.c.
* @brief header for decrypt.c * @brief header for ntru_decrypt.c
*/ */
#ifndef NTRU_DECRYPT_H #ifndef NTRU_DECRYPT_H
#define NTRU_DECRYPT_H #define NTRU_DECRYPT_H
#include "ntru_params.h"
#include "ntru_poly.h"
#include "ntru_string.h" #include "ntru_string.h"
#include "params.h"
#include "poly.h"
#include <stdbool.h> #include <stdbool.h>

View File

@ -20,18 +20,18 @@
*/ */
/** /**
* @file encrypt.c * @file ntru_encrypt.c
* This file handles the NTRU encryption * This file handles the NTRU encryption
* algorithm. * algorithm.
* @brief NTRU encryption * @brief NTRU encryption
*/ */
#include "ascii_poly.h" #include "ntru_ascii_poly.h"
#include "encrypt.h" #include "ntru_encrypt.h"
#include "mem.h" #include "ntru_mem.h"
#include "ntru_params.h"
#include "ntru_poly_ascii.h"
#include "ntru_string.h" #include "ntru_string.h"
#include "params.h"
#include "poly_ascii.h"
#include <string.h> #include <string.h>

View File

@ -20,8 +20,8 @@
*/ */
/** /**
* @file encrypt.h * @file ntru_encrypt.h
* Header for the internal API of encrypt.c. * Header for the internal API of ntru_encrypt.c.
* @brief header for encrypt.c * @brief header for encrypt.c
*/ */
@ -29,9 +29,9 @@
#define PQC_ENCRYPT_H #define PQC_ENCRYPT_H
#include "ntru_params.h"
#include "ntru_poly.h"
#include "ntru_string.h" #include "ntru_string.h"
#include "params.h"
#include "poly.h"
#include <stdbool.h> #include <stdbool.h>

View File

@ -20,7 +20,7 @@
*/ */
/** /**
* @file err.h * @file ntru_err.h
* This file provides error macros * This file provides error macros
* and functions for the NTRU cryptosystem. * and functions for the NTRU cryptosystem.
* @brief error handling * @brief error handling

View File

@ -20,15 +20,15 @@
*/ */
/** /**
* @file file.c * @file ntru_file.c
* Allows operations on files, such as reading * Allows operations on files, such as reading
* and writing. * and writing.
* @brief file operations * @brief file operations
*/ */
#include "common.h" #include "ntru_common.h"
#include "err.h" #include "ntru_err.h"
#include "mem.h" #include "ntru_mem.h"
#include "ntru_string.h" #include "ntru_string.h"
#include <fcntl.h> #include <fcntl.h>

View File

@ -20,16 +20,16 @@
*/ */
/** /**
* @file file.h * @file ntru_file.h
* Header for the external API of file.c. * Header for the external API of ntru_file.c.
* @brief header for file.c * @brief header for ntru_file.c
*/ */
#ifndef NTRU_FILE_H #ifndef NTRU_FILE_H
#define NTRU_FILE_H #define NTRU_FILE_H
#include "common.h" #include "ntru_common.h"
#include "ntru_string.h" #include "ntru_string.h"

View File

@ -20,19 +20,19 @@
*/ */
/** /**
* @file keypair.c * @file ntru_keypair.c
* This file handles the creation of the * This file handles the creation of the
* key pair and possibly common operations on them. * key pair and possibly common operations on them.
* @brief key creation and operations * @brief key creation and operations
*/ */
#include "ascii_poly.h" #include "ntru_ascii_poly.h"
#include "file.h" #include "ntru_file.h"
#include "keypair.h" #include "ntru_keypair.h"
#include "ntru_params.h"
#include "ntru_poly.h"
#include "ntru_poly_ascii.h"
#include "ntru_string.h" #include "ntru_string.h"
#include "params.h"
#include "poly.h"
#include "poly_ascii.h"
#include <fmpz_poly.h> #include <fmpz_poly.h>
#include <fmpz.h> #include <fmpz.h>

View File

@ -20,16 +20,16 @@
*/ */
/** /**
* @file keypair.h * @file ntru_keypair.h
* Header for internal API of keypair.c. * Header for internal API of ntru_keypair.c.
* @brief header for keypair.c * @brief header for ntru_keypair.c
*/ */
#ifndef NTRU_KEYPAIR_H #ifndef NTRU_KEYPAIR_H
#define NTRU_KEYPAIR_H #define NTRU_KEYPAIR_H
#include "params.h" #include "ntru_params.h"
#include <fmpz_poly.h> #include <fmpz_poly.h>
#include <fmpz.h> #include <fmpz.h>

View File

@ -20,13 +20,13 @@
*/ */
/** /**
* @file mem.c * @file ntru_mem.c
* This file provides functions for * This file provides functions for
* memory management. * memory management.
* @brief memory management * @brief memory management
*/ */
#include "mem.h" #include "ntru_mem.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -20,9 +20,9 @@
*/ */
/** /**
* @file mem.h * @file ntru_mem.h
* Header for the internal API of mem.c. * Header for the internal API of ntru_mem.c.
* @brief header for mem.c * @brief header for ntru_mem.c
*/ */
#ifndef NTRU_MEM_H #ifndef NTRU_MEM_H

View File

@ -20,7 +20,7 @@
*/ */
/** /**
* @file params.h * @file ntru_params.h
* This file defines the ntru_params * This file defines the ntru_params
* and related data types. * and related data types.
* @brief NTRU parameters * @brief NTRU parameters

View File

@ -20,17 +20,17 @@
*/ */
/** /**
* @file poly.c * @file ntru_poly.c
* This files purpose is to handle polynomials * This files purpose is to handle polynomials
* in general, allowing modification, arithmetic * in general, allowing modification, arithmetic
* and common algorithms like inverting them. * and common algorithms like inverting them.
* @brief operations on polynomials * @brief operations on polynomials
*/ */
#include "err.h" #include "ntru_err.h"
#include "mem.h" #include "ntru_mem.h"
#include "params.h" #include "ntru_params.h"
#include "poly.h" #include "ntru_poly.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -20,16 +20,16 @@
*/ */
/** /**
* @file poly.h * @file ntru_poly.h
* Header for the internal API of poly.c. * Header for the internal API of ntru_poly.c.
* @brief header for poly.c * @brief header for ntru_poly.c
*/ */
#ifndef NTRU_POLY_H #ifndef NTRU_POLY_H
#define NTRU_POLY_H #define NTRU_POLY_H
#include "err.h" #include "ntru_err.h"
#include "params.h" #include "ntru_params.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -20,18 +20,18 @@
*/ */
/** /**
* @file poly_ascii.c * @file ntru_poly_ascii.c
* This file allows to convert polynomials to * This file allows to convert polynomials to
* ascii strings, including base64 encoded. * ascii strings, including base64 encoded.
* @brief polynomials to acii * @brief polynomials to acii
*/ */
#include "poly_ascii.h" #include "ntru_poly_ascii.h"
#include "common.h" #include "ntru_common.h"
#include "mem.h" #include "ntru_mem.h"
#include "ntru_params.h"
#include "ntru_poly.h"
#include "ntru_string.h" #include "ntru_string.h"
#include "params.h"
#include "poly.h"
#include <glib.h> #include <glib.h>

View File

@ -20,18 +20,18 @@
*/ */
/** /**
* @file poly_ascii.h * @file ntru_poly_ascii.h
* Header for the internal API of poly_ascii.c. * Header for the internal API of ntru_poly_ascii.c.
* @brief header for poly_ascii.c * @brief header for ntru_poly_ascii.c
*/ */
#ifndef NTRU_POLY_ASCII_H_ #ifndef NTRU_POLY_ASCII_H_
#define NTRU_POLY_ASCII_H_ #define NTRU_POLY_ASCII_H_
#include "common.h" #include "ntru_common.h"
#include "ntru_params.h"
#include "ntru_string.h" #include "ntru_string.h"
#include "params.h"
#include <fmpz_poly.h> #include <fmpz_poly.h>
#include <fmpz.h> #include <fmpz.h>

View File

@ -20,15 +20,15 @@
*/ */
/** /**
* @file rnd.c * @file ntru_rnd.c
* This file allows generation of random polynomials. * This file allows generation of random polynomials.
* @brief random polynomials * @brief random polynomials
*/ */
#include "err.h"
#include "math.h" #include "math.h"
#include "params.h" #include "ntru_err.h"
#include "poly.h" #include "ntru_params.h"
#include "ntru_poly.h"
#include <fmpz_poly.h> #include <fmpz_poly.h>
#include <fcntl.h> #include <fcntl.h>

View File

@ -20,15 +20,15 @@
*/ */
/** /**
* @file rnd.h * @file ntru_rnd.h
* Header for the internal API of rnd.c. * Header for the internal API of ntru_rnd.c.
* @brief header for rnd.c * @brief header for ntru_rnd.c
*/ */
#ifndef NTRU_RND_H #ifndef NTRU_RND_H
#define NTRU_RND_H #define NTRU_RND_H
#include "params.h" #include "ntru_params.h"
#include <stdlib.h> #include <stdlib.h>