Commit Graph

136 Commits

Author SHA1 Message Date
Steffen Jaeckel
bc16c149fc fix base64[url] strict/relaxed decode 2017-02-28 01:27:01 +01:00
Steffen Jaeckel
1c0edfdead add/fix tests
add explicit strict&loose base64-decode tests
2017-02-28 01:26:58 +01:00
Matt Kelly
e187f4cbf4 Fix all warnings from -Wcast-align 2017-02-26 10:12:16 -05:00
Karel Miko
953080bcea more trailing spaces + tabs outside of "src" dir 2017-02-24 20:50:37 +01:00
Steffen Jaeckel
ef023f3329 fix rsa/dsa test duplicate symbols 2017-02-21 17:32:30 +01:00
Karel Miko
bbbbf5f1d5 adding rsa_import_radix tests 2017-02-21 16:55:10 +01:00
Karel Miko
ac6f69e8fe adding dsa_import_radix tests 2017-02-21 16:54:11 +01:00
Steffen Jaeckel
600004fecc print ascii in print_hex() 2017-02-21 11:42:24 +01:00
Steffen Jaeckel
60bb5440fb add compare_testvector() 2017-02-21 11:42:24 +01:00
Steffen Jaeckel
08aabc7f8c improve print_hex() prototype 2017-02-17 11:53:14 +01:00
Steffen Jaeckel
912eff4949 make testprof/makefile silent 2016-01-23 19:11:30 +01:00
Steffen Jaeckel
6ec93afa3c clean-up test-build and extend tomcrypt_custom.h
added LTC_MINIMAL to be able do a build without nearly any
functionality :)
make sure timing resistant RSA & ECC are enabled if not said otherwise
2015-09-01 17:36:43 +02:00
Steffen Jaeckel
ee03c97cde add crc32 2015-08-23 22:59:14 +02:00
Steffen Jaeckel
1987a2f975 add adler32 checksum algorithm 2015-08-23 22:59:14 +02:00
Pascal Brand
7313d1e6b0 Update ECC timing tests
Signed-off-by: Pascal Brand <pascal.brand@st.com>
2015-08-21 22:09:25 +02:00
Steffen Jaeckel
46c038f7d4 adapt rsa_test() to modified pkcs#1 decoding routines 2014-11-13 22:30:07 +01:00
Steffen Jaeckel
e6b1c7101e der test: also run der_length_utf8_string() 2014-10-10 00:56:23 +02:00
Steffen Jaeckel
f75b5ec8f4 der tests: improve/implement handling of context-specific data
no more "EOL" in the output as the flexi decoder handles now
context-specific data
2014-10-06 18:59:40 +02:00
Steffen Jaeckel
6da3b856d6 der test: print list-element details on EOL
EOL indicates an unitialized list-element
2014-10-06 18:57:42 +02:00
Steffen Jaeckel
2e426e2d57 der test: add example of decoding a X.509 v3 cert with the flexi decoder
you can define "LTC_DER_TESTS_PRINT_FLEXI" at compile time to print
the decoded cert whenn running the test executable...
well not all of it, since some parts of the cert are marked as
"context-specific" so we would need to do some further digging
...these are the parts that are output as "EOL"...
2014-09-30 17:57:53 +02:00
Steffen Jaeckel
c1e81ad469 minor changes
print MP_DIGIT_BIT when running test
der_test: improve error output of 'short integer' test
2014-09-30 13:26:18 +02:00
Steffen Jaeckel
eea24fe2c0 bring back possibility to import/export old DSA key format 2014-09-29 23:44:47 +02:00
Steffen Jaeckel
f58c87866e add possibility to export RSA public key in SubjectPublicKeyInfo format 2014-09-29 23:44:47 +02:00
Steffen Jaeckel
b1f29539be Revert "removed testing of "stripped" rsa key"
This reverts commit 496453f289.
2014-09-29 23:44:47 +02:00
Steffen Jaeckel
1924e6fd47 add sha512/224 and sha512/256 to tests and crypt_build_settings 2014-09-29 19:57:21 +02:00
Steffen Jaeckel
94363b601c add testcase to verify that this patch is working 2014-09-28 22:52:32 +02:00
Steffen Jaeckel
e5fb4d5ebe use DO() macro when calling API functions in tests 2014-08-28 14:02:57 +02:00
Steffen Jaeckel
4071475558 fix compiler warnings 2014-08-28 13:53:51 +02:00
Steffen Jaeckel
efc6844f9c tests: add function print_hex() 2014-08-28 13:30:26 +02:00
Steffen Jaeckel
64f887e8f3 predictable rand() values please 2014-08-28 13:30:26 +02:00
Steffen Jaeckel
f86d36c676 rsa_test: improve a bit 2014-08-28 13:30:26 +02:00
Steffen Jaeckel
536a199203 rsa_test: fix valgrind warnings 2014-08-28 13:30:26 +02:00
Steffen Jaeckel
2b3c603c6c udpate bleichenbacher signature attack
also test for too short padding strings
2014-08-28 13:30:26 +02:00
Steffen Jaeckel
e227000578 tests: remove surplus ';' in DO()/DOX() macros 2014-08-28 13:30:26 +02:00
Steffen Jaeckel
c6dfef95eb testprof/rsa_test: add testcase for bleichenbacher signature attack 2014-08-28 13:30:26 +02:00
Steffen Jaeckel
92274aafb5 add testprof/pkcs_1_eme_test 2014-08-28 13:30:26 +02:00
Steffen Jaeckel
7302a7cfcb add testprof/pkcs_1_emsa_test 2014-08-28 13:30:25 +02:00
Steffen Jaeckel
c99a147d4a add testprof/pkcs_1_oaep_test 2014-08-28 13:30:25 +02:00
Steffen Jaeckel
b0c7cbfaae improve testprof/pkcs_1_pss_test 2014-08-28 13:30:25 +02:00
Steffen Jaeckel
60b9c5a6f1 make pkcs1 test more generic 2014-08-28 13:30:25 +02:00
Steffen Jaeckel
faa9c6a607 add missing unregister of no_prng 2014-08-28 13:30:25 +02:00
Steffen Jaeckel
fe1b6eced7 add testprof/pkcs_1_pss_test 2014-08-28 13:30:25 +02:00
Steffen Jaeckel
b570175b47 add testprof/no_prng
a PRNG that is no PRNG as its output is predefined and can be set
by calling add_entropy()
2014-08-28 13:30:25 +02:00
Steffen Jaeckel
394806cab1 tests: use correct format string parameter for 64bit values on windows 2014-08-28 13:27:52 +02:00
Steffen Jaeckel
3cda802deb fixed ecc_test.c
luckily gcc 4.6 of travis CI complained!

shame on you gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
2014-07-17 12:10:05 +02:00
Steffen Jaeckel
155a54ba40 add LTC prefix to most macros 2014-07-17 10:50:36 +02:00
Steffen Jaeckel
4089cc963c update shared makefiles
split up install target in "install" and "install_test" as in
standard makefile

use libtool to compile and link

clean up and bring in sync with standard makefile targets
2014-07-14 15:35:04 +02:00
Steffen Jaeckel
9e2e7fdfd4 tests: bring back mult and sqr timing 2014-07-12 17:31:03 +02:00
Steffen Jaeckel
1f96647d70 update icc makefiles to current compiler versions
As the current icc can act as a gcc drop-in, I took over all compile flags
from the standard makefile.

The "-x?" options have been deprecated, so they're updated.

The "-xP" has been removed, since it makes no sense in my eyes to define
the optimization for a specific architecture in the makefile.
2014-07-12 17:25:12 +02:00
Steffen Jaeckel
098bc9f06d tests: use the gcc rdtsc() implementation also for intel cc 2014-07-12 16:46:36 +02:00
Steffen Jaeckel
8c488289f0 improve some error and informational output 2014-07-12 16:44:28 +02:00
Steffen Jaeckel
79bc7ef2e5 testprof: add missing object files to makefiles 2014-07-12 16:19:08 +02:00
Steffen Jaeckel
6ac2d6141d update clean target of makefile and testprof/makefile 2014-07-12 16:18:29 +02:00
Steffen Jaeckel
a59e5548ec tests: unregister ciphers etc. at exit, call error_to_string() 2014-05-07 17:36:09 +02:00
Steffen Jaeckel
4929e4e989 fix warnings in tests 2014-05-01 18:01:13 +02:00
karel-m
232f412709 makefiles for MS Windows gcc compiler 2014-04-29 18:25:15 +02:00
Steffen Jaeckel
621a75ab28 base64: add and most important - execute tests 2014-03-04 21:50:16 +01:00
Steffen Jaeckel
65fd19c1fb dh: fix renamed macro 2014-02-25 10:09:35 +01:00
Steffen Jaeckel
2adca46735 pkcs#5: add tests for 'algo 2' 2014-02-16 18:41:33 +01:00
Steffen Jaeckel
8e7777b554 trim trailing spaces/clean up 2014-02-16 18:41:28 +01:00
Steffen Jaeckel
1748cc616b der_tests: trim trailing spaces 2013-04-18 11:22:25 +02:00
karel-m
abab7089a3 OCBv3 according http://tools.ietf.org/html/draft-krovetz-ocb-03 2013-03-15 13:30:29 +02:00
Steffen Jaeckel
e81ac102bd add misc_test() 2013-03-15 11:16:17 +01:00
Patrick Pelletier
cecbbb88fc When a test fails, print the algorithm that it failed on.
As near as I can tell, LibTomCrypt doesn't provide any way to tell
which cipher failed when it reports a cipher test failure.  For
example, I was getting:

Algorithm failed test vectors. (5)
cipher_hash_test.c:14:cipher_descriptor[x].test()

But there's no way to tell what value x has, and even if there was, it
would take a bit of digging to determine which algorithm that
corresponds to.  So, I added a variant of the DO() macro, DOX(), which
takes an additional string argument which is displayed on failure.  So
now I get:

Algorithm failed test vectors. (5) - camellia
cipher_hash_test.c:14:cipher_descriptor[x].test()
2012-11-18 15:20:10 +01:00
Steffen Jaeckel
bd7933cc2b add check for defines of math provider 2012-10-08 10:20:21 +02:00
Steffen Jaeckel
496453f289 removed testing of "stripped" rsa key 2011-03-21 21:17:31 +01:00
Steffen Jaeckel
6fecec107d rejoined diffie hellman code from ltc 1.05, thanks to Alexander Kurpiers 2011-01-18 20:06:03 +01:00
Steffen Jaeckel
3522c754aa changed LTC_LTC_PKCS_1_* enum members to LTC_PKCS_1_* 2010-06-16 20:01:31 +02:00
Steffen Jaeckel
2f1fc7c50d import of libtomcrypt
out of
  lt_tree.tar.bz2
checksums of lt_tree.tar.bz2
MD5: 3c36e1ca95518f4d00a76dc9b7049952
SHA1: 4f31d1aa8cd1b9d7452b777cd52f8280dc7ebcbc
2010-06-16 19:58:20 +02:00
Tom St Denis
bbc52b9e1b added libtomcrypt-1.17 2010-06-16 12:39:13 +02:00
Tom St Denis
e24b01d392 added libtomcrypt-1.16 2010-06-16 12:39:09 +02:00
Tom St Denis
2de2976d25 added libtomcrypt-1.15 2010-06-16 12:39:06 +02:00
Tom St Denis
479cc9c261 added libtomcrypt-1.14 2010-06-16 12:39:03 +02:00
Tom St Denis
1eed98f629 added libtomcrypt-1.13 2010-06-16 12:39:00 +02:00
Tom St Denis
2945dea3e2 added libtomcrypt-1.12 2010-06-16 12:38:57 +02:00
Tom St Denis
64d7ebe166 added libtomcrypt-1.11 2010-06-16 12:38:54 +02:00
Tom St Denis
99b6d03203 added libtomcrypt-1.10 2010-06-16 12:38:51 +02:00
Tom St Denis
a3ce807bae added libtomcrypt-1.09 2010-06-16 12:38:49 +02:00
Tom St Denis
1eeff0bfb4 added libtomcrypt-1.08 2010-06-16 12:38:47 +02:00
Tom St Denis
4a1a5796de added libtomcrypt-1.07 2010-06-16 12:38:44 +02:00
Tom St Denis
72412f6dac added libtomcrypt-1.06 2010-06-16 12:38:41 +02:00
Tom St Denis
9264e34ffb added libtomcrypt-1.05 2010-06-16 12:38:39 +02:00
Tom St Denis
9da48eb84b added libtomcrypt-1.04 2010-06-16 12:38:36 +02:00
Tom St Denis
3964a6523a added libtomcrypt-1.03 2010-06-16 12:38:34 +02:00
Tom St Denis
65c1317eee added libtomcrypt-1.02 2010-06-16 12:38:32 +02:00
Tom St Denis
6ac9952498 added libtomcrypt-1.01 2010-06-16 12:38:29 +02:00