Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion demos/timing.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt.h>
#include "tomcrypt_private.h"

#if defined(_WIN32)
#define PRI64 "I64d"
Expand Down
2 changes: 1 addition & 1 deletion demos/tv_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt.h>
#include "tomcrypt_private.h"

void hash_gen(void)
{
Expand Down
3 changes: 1 addition & 2 deletions doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -2037,8 +2037,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED = LTC_SOURCE \
LTM_DESC \
PREDEFINED = LTM_DESC \
GMP_DESC \
TFM_DESC

Expand Down
4 changes: 2 additions & 2 deletions helper.pl
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,15 @@ sub process_makefiles {
my @c = ();
find({ no_chdir => 1, wanted => sub { push @c, $_ if -f $_ && $_ =~ /\.c$/ && $_ !~ /tab.c$/ } }, 'src');
my @h = ();
find({ no_chdir => 1, wanted => sub { push @h, $_ if -f $_ && $_ =~ /\.h$/ && $_ !~ /dh_static.h$/ } }, 'src');
find({ no_chdir => 1, wanted => sub { push @h, $_ if -f $_ && $_ =~ /\.h$/ && $_ !~ /dh_static.h$/ && $_ !~ /tomcrypt_private.h$/ } }, 'src');
my @all = ();
find({ no_chdir => 1, wanted => sub { push @all, $_ if -f $_ && $_ =~ /\.(c|h)$/ } }, 'src');
my @t = qw();
find({ no_chdir => 1, wanted => sub { push @t, $_ if $_ =~ /(common|no_prng|_tests?|test).c$/ } }, 'tests');

my @o = sort ('src/ciphers/aes/aes_enc.o', map { my $x = $_; $x =~ s/\.c$/.o/; $x } @c);
my $var_o = prepare_variable("OBJECTS", @o);
my $var_h = prepare_variable("HEADERS", (sort @h));
my $var_h = prepare_variable("HEADERS_PUB", (sort @h));
(my $var_obj = $var_o) =~ s/\.o\b/.obj/sg;

my $var_to = prepare_variable("TOBJECTS", sort map { my $x = $_; $x =~ s/\.c$/.o/; $x } @t);
Expand Down
4 changes: 4 additions & 0 deletions libtomcrypt_VS2008.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,10 @@
RelativePath="src\headers\tomcrypt_pkcs.h"
>
</File>
<File
RelativePath="src\headers\tomcrypt_private.h"
>
</File>
<File
RelativePath="src\headers\tomcrypt_prng.h"
>
Expand Down
4 changes: 3 additions & 1 deletion makefile.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,14 @@ tests/pkcs_1_oaep_test.o tests/pkcs_1_pss_test.o tests/pkcs_1_test.o tests/prng_
tests/rotate_test.o tests/rsa_test.o tests/store_test.o tests/test.o

#The following headers will be installed by "make install"
HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
HEADERS_PUB=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \
src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_math.h \
src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \
src/headers/tomcrypt_prng.h

HEADERS=$(HEADERS_PUB) src/headers/tomcrypt_private.h

#The default rule for make builds the libtomcrypt.a library (static)
default: $(LIBMAIN_S)

Expand Down
4 changes: 3 additions & 1 deletion makefile.msvc
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,14 @@ tests/pkcs_1_oaep_test.obj tests/pkcs_1_pss_test.obj tests/pkcs_1_test.obj tests
tests/rotate_test.obj tests/rsa_test.obj tests/store_test.obj tests/test.obj

#The following headers will be installed by "make install"
HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
HEADERS_PUB=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \
src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_math.h \
src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \
src/headers/tomcrypt_prng.h

HEADERS=$(HEADERS_PUB) src/headers/tomcrypt_private.h

#The default rule for make builds the tomcrypt.lib library (static)
default: $(LIBMAIN_S)

Expand Down
8 changes: 5 additions & 3 deletions makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,14 @@ tests/pkcs_1_oaep_test.o tests/pkcs_1_pss_test.o tests/pkcs_1_test.o tests/prng_
tests/rotate_test.o tests/rsa_test.o tests/store_test.o tests/test.o

#The following headers will be installed by "make install"
HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
HEADERS_PUB=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \
src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_math.h \
src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \
src/headers/tomcrypt_prng.h

HEADERS=$(HEADERS_PUB) src/headers/tomcrypt_private.h

#The default rule for make builds the libtomcrypt.a library (static)
default: $(LIBMAIN_S)

Expand Down Expand Up @@ -295,10 +297,10 @@ clean:
-@rm -f test.exe constants.exe sizes.exe tv_gen.exe hashsum.exe ltcrypt.exe small.exe timing.exe

#Install the library + headers
install: $(LIBMAIN_S) $(HEADERS)
install: $(LIBMAIN_S)
@mkdir -p $(DESTDIR)$(INCPATH) $(DESTDIR)$(LIBPATH)/pkgconfig
@cp $(LIBMAIN_S) $(DESTDIR)$(LIBPATH)/
@cp $(HEADERS) $(DESTDIR)$(INCPATH)/
@cp $(HEADERS_PUB) $(DESTDIR)$(INCPATH)/
@sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > $(DESTDIR)$(LIBPATH)/pkgconfig/libtomcrypt.pc

#Install useful tools
Expand Down
8 changes: 5 additions & 3 deletions makefile_include.mk
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,14 @@ tests/pkcs_1_oaep_test.o tests/pkcs_1_pss_test.o tests/pkcs_1_test.o tests/prng_
tests/rotate_test.o tests/rsa_test.o tests/store_test.o tests/test.o

# The following headers will be installed by "make install"
HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
HEADERS_PUB=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \
src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_math.h \
src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \
src/headers/tomcrypt_prng.h

HEADERS=$(HEADERS_PUB) src/headers/tomcrypt_private.h

#These are the rules to make certain object files.
src/ciphers/aes/aes.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
src/ciphers/twofish/twofish.o: src/ciphers/twofish/twofish.c src/ciphers/twofish/twofish_tab.c
Expand Down Expand Up @@ -436,7 +438,7 @@ INSTALL_OPTS ?= -m 644
install -p -d $(DESTDIR)$(INCPATH)
install -p -d $(DESTDIR)$(LIBPATH)
$(INSTALL_CMD) -p $(INSTALL_OPTS) $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
install -p -m 644 $(HEADERS) $(DESTDIR)$(INCPATH)
install -p -m 644 $(HEADERS_PUB) $(DESTDIR)$(INCPATH)

$(DESTDIR)$(BINPATH):
install -p -d $(DESTDIR)$(BINPATH)
Expand All @@ -454,7 +456,7 @@ install_test: $(call print-help,install_test,Installs the self-test binary) test
install_hooks: $(call print-help,install_hooks,Installs the git hooks)
for s in `ls hooks/`; do ln -s ../../hooks/$$s .git/hooks/$$s; done

HEADER_FILES=$(notdir $(HEADERS))
HEADER_FILES=$(notdir $(HEADERS_PUB))
.common_uninstall:
$(UNINSTALL_CMD) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
rm $(HEADER_FILES:%=$(DESTDIR)$(INCPATH)/%)
Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/aes/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
Implementation of AES
*/

#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_RIJNDAEL

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/anubis.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Authors: Paulo S.L.M. Barreto and Vincent Rijmen.
*/

#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_ANUBIS

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/blowfish.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@file blowfish.c
Implementation of the Blowfish block cipher, Tom St Denis
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_BLOWFISH

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/camellia.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Implementation by Tom St Denis of Elliptic Semiconductor
*/

#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_CAMELLIA

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/cast5.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@file cast5.c
Implementation of LTC_CAST5 (RFC 2144) by Tom St Denis
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_CAST5

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/des.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

/**
@file des.c
Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/idea.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
and Japan (JP 3225440) (expired May 16, 2011).
*/

#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_IDEA

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/kasumi.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Derived from the 3GPP standard source code
*/

#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_KASUMI

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/khazad.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

/**
@file khazad.c
Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/kseed.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Tom St Denis
*/

#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_KSEED

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/multi2.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@file multi2.c
Multi-2 implementation (not public domain, hence the default disable)
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_MULTI2

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/noekeon.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@file noekeon.c
Implementation of the Noekeon block cipher by Tom St Denis
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_NOEKEON

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/rc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Thanks to CodeView, SoftIce, and D86 for helping bring this code to *
* the public. *
\**********************************************************************/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

/**
@file rc2.c
Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/rc5.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
LTC_RC5 code by Tom St Denis
*/

#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_RC5

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/rc6.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@file rc6.c
LTC_RC6 code by Tom St Denis
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_RC6

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/safer/safer.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
*******************************************************************************/

#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_SAFER

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/safer/saferp.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@file saferp.c
LTC_SAFER+ Implementation by Tom St Denis
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_SAFERP

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/serpent.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
https://en.wikipedia.org/wiki/Serpent_(cipher)
*/

#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_SERPENT

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/skipjack.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@file skipjack.c
Skipjack Implementation by Tom St Denis
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_SKIPJACK

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/twofish/twofish.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@file twofish.c
Implementation of Twofish by Tom St Denis
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_TWOFISH

Expand Down
2 changes: 1 addition & 1 deletion src/ciphers/xtea.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@file xtea.c
Implementation of LTC_XTEA, Tom St Denis
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_XTEA

Expand Down
2 changes: 1 addition & 1 deletion src/encauth/ccm/ccm_add_aad.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_CCM_MODE

Expand Down
2 changes: 1 addition & 1 deletion src/encauth/ccm/ccm_add_nonce.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_CCM_MODE

Expand Down
2 changes: 1 addition & 1 deletion src/encauth/ccm/ccm_done.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_CCM_MODE

Expand Down
2 changes: 1 addition & 1 deletion src/encauth/ccm/ccm_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_CCM_MODE

Expand Down
2 changes: 1 addition & 1 deletion src/encauth/ccm/ccm_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

/**
@file ccm_memory.c
Expand Down
2 changes: 1 addition & 1 deletion src/encauth/ccm/ccm_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*/
#include "tomcrypt.h"
#include "tomcrypt_private.h"

#ifdef LTC_CCM_MODE

Expand Down
Loading