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
PQC_SOURCES = poly.c \
mem.c \
encrypt.c \
decrypt.c \
keypair.c \
ascii_poly.c \
file.c \
ntru_string.c \
poly_ascii.c \
rnd.c
PQC_SOURCES = \
ntru_ascii_poly.c \
ntru_decrypt.c \
ntru_encrypt.c \
ntru_file.c \
ntru_keypair.c \
ntru_mem.c \
ntru_poly.c \
ntru_poly_ascii.c \
ntru_rnd.c \
ntru_string.c
PQC_OBJS = $(patsubst %.c, %.o, $(PQC_SOURCES))
PQC_HEADERS = err.h \
poly.h \
params.h \
encrypt.h \
decrypt.h \
keypair.h \
ascii_poly.h \
params.h \
file.h \
ntru_string.h \
poly_ascii.h \
rnd.h
PQC_HEADERS = \
ntru_ascii_poly.h \
ntru_decrypt.h \
ntru_encrypt.h \
ntru_err.h \
ntru_file.h \
ntru_keypair.h \
ntru_poly.h \
ntru_params.h \
ntru_poly_ascii.h \
ntru_rnd.h \
ntru_string.h
# libs
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
* base64 encoded ones, to polynomials.
* @brief ascii to polynomials
*/
#include "ascii_poly.h"
#include "common.h"
#include "mem.h"
#include "ntru_ascii_poly.h"
#include "ntru_common.h"
#include "ntru_mem.h"
#include "ntru_params.h"
#include "ntru_poly.h"
#include "ntru_string.h"
#include "params.h"
#include "poly.h"
#include <glib.h>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -20,16 +20,16 @@
*/
/**
* @file file.h
* Header for the external API of file.c.
* @brief header for file.c
* @file ntru_file.h
* Header for the external API of ntru_file.c.
* @brief header for ntru_file.c
*/
#ifndef NTRU_FILE_H
#define NTRU_FILE_H
#include "common.h"
#include "ntru_common.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
* key pair and possibly common operations on them.
* @brief key creation and operations
*/
#include "ascii_poly.h"
#include "file.h"
#include "keypair.h"
#include "ntru_ascii_poly.h"
#include "ntru_file.h"
#include "ntru_keypair.h"
#include "ntru_params.h"
#include "ntru_poly.h"
#include "ntru_poly_ascii.h"
#include "ntru_string.h"
#include "params.h"
#include "poly.h"
#include "poly_ascii.h"
#include <fmpz_poly.h>
#include <fmpz.h>

View File

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

View File

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

View File

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

View File

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

View File

@ -20,17 +20,17 @@
*/
/**
* @file poly.c
* @file ntru_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 "err.h"
#include "mem.h"
#include "params.h"
#include "poly.h"
#include "ntru_err.h"
#include "ntru_mem.h"
#include "ntru_params.h"
#include "ntru_poly.h"
#include <stdarg.h>
#include <stdbool.h>

View File

@ -20,16 +20,16 @@
*/
/**
* @file poly.h
* Header for the internal API of poly.c.
* @brief header for poly.c
* @file ntru_poly.h
* Header for the internal API of ntru_poly.c.
* @brief header for ntru_poly.c
*/
#ifndef NTRU_POLY_H
#define NTRU_POLY_H
#include "err.h"
#include "params.h"
#include "ntru_err.h"
#include "ntru_params.h"
#include <stdarg.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
* ascii strings, including base64 encoded.
* @brief polynomials to acii
*/
#include "poly_ascii.h"
#include "common.h"
#include "mem.h"
#include "ntru_poly_ascii.h"
#include "ntru_common.h"
#include "ntru_mem.h"
#include "ntru_params.h"
#include "ntru_poly.h"
#include "ntru_string.h"
#include "params.h"
#include "poly.h"
#include <glib.h>

View File

@ -20,18 +20,18 @@
*/
/**
* @file poly_ascii.h
* Header for the internal API of poly_ascii.c.
* @brief header for poly_ascii.c
* @file ntru_poly_ascii.h
* Header for the internal API of ntru_poly_ascii.c.
* @brief header for ntru_poly_ascii.c
*/
#ifndef 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 "params.h"
#include <fmpz_poly.h>
#include <fmpz.h>

View File

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

View File

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