Commit Graph

318 Commits

Author SHA1 Message Date
Steffen Jaeckel
6dfe0013e1 rt.py: initial version 2014-08-28 13:30:24 +02:00
Steffen Jaeckel
b2317279b8 add original RSA testvector files 2014-08-28 13:30:24 +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
14272976d0 add release flag to makefile.shared 2014-08-27 18:20:47 +02:00
Steffen Jaeckel
47b8ccc07c fix hash ID's of ripemd 256 & 320 2014-08-26 17:42:10 +02:00
Steffen Jaeckel
473b0319ad re-enable "unused-parameters" warning 2014-08-24 18:25:24 +02:00
Steffen Jaeckel
01c34dc236 trim trailing spaces 2014-08-24 18:25:24 +02:00
Steffen Jaeckel
1fb649d394 chc: don't execute tests if LTC_TEST is not defined 2014-08-07 01:36:03 +02:00
Steffen Jaeckel
f8449f55d9 trim trailing spaces 2014-08-07 01:36:03 +02:00
Jonathan Herzog
ff736a61bb Hash functions now check for input-length overflow.
Because many of the hash-functions implemented by LTC use the length
of the input when padding the input out to a block-length, LTC keeps
track of the input length in a 64-bit integer. However, it did not
previously test for overflow of this value. Since many of the
hash-functions implemented by LTC are defined for inputs of length
2^128 bits or more, this means that LTC was incorrectly implementing
these hash functions for extremely long inputs. Also, this might have
been a minor security problem: A clever attacker might have been able
to take a message with a known hash and find another message (longer
by 2^64 bits) that would be hashed to the same value by LTC.

Fortunately, LTC uses a pre-processor macro to make the actual code
for hashing, and so this problem could be fixed by adding an
overflow-check to that macro.
2014-08-06 19:06:00 +02:00
Steffen Jaeckel
757ac982a5 if selected, always make targets 'test' and 'testprof/$(LIBTEST)' 2014-08-06 15:16:37 +02:00
Steffen Jaeckel
09a0de69a0 update makefile.mingw 2014-08-06 15:16:30 +02:00
Steffen Jaeckel
98e05b10a0 trim trailing spaces in mingw makefiles 2014-08-06 15:11:45 +02:00
Steffen Jaeckel
a8598b0faf fix unregister_prng() where always the first prng would have been removed 2014-08-05 17:47:50 +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
48bd6702aa uncomment argchk in camellia_setup() 2014-07-17 11:32:52 +02:00
Steffen Jaeckel
155a54ba40 add LTC prefix to most macros 2014-07-17 10:50:36 +02:00
Steffen Jaeckel
3c76dcdd29 fix compiler warning when enabling LTC_GCM_TABLES_SSE2 2014-07-17 10:50:35 +02:00
Steffen Jaeckel
1a61b42775 update output; remove unused define 2014-07-16 15:11:14 +02:00
Steffen Jaeckel
97256daeed remove surplus ';' 2014-07-15 20:26:40 +02:00
Steffen Jaeckel
f8c536a349 add CC tag when linking 2014-07-15 20:25:32 +02:00
Steffen Jaeckel
9af6d311ec Merge branch 'buggywhip/dynHlp2' into develop
This closes #41
2014-07-15 15:51:43 +02:00
Steffen Jaeckel
7189998ba1 update gitignore 2014-07-15 15:45:39 +02:00
Steffen Jaeckel
5fa34ad171 update makefiles 2014-07-15 15:45:33 +02:00
Steffen Jaeckel
542ba9995c update math inititializers
make math initializer functions dependant on the xxx_DESC macro instead
of the USE_xxx macro, which is only relevant when building tests etc.
2014-07-15 15:38:18 +02:00
Steffen Jaeckel
746fd583c9 update demos according to changed naming 2014-07-15 15:28:29 +02:00
Steffen Jaeckel
fc7eeac218 update/rework constants and sizes 2014-07-15 15:27:31 +02:00
Steffen Jaeckel
fd7b3cd875 use snprintf() instead of sprintf() 2014-07-15 14:09:50 +02:00
Steffen Jaeckel
e628fb9203 clean up/trim trailing spaces 2014-07-15 13:58:48 +02:00
Larry Bugbee
a6b6884982 minor editorial changes 2014-07-14 15:47:20 +02:00
Larry Bugbee
46b6e36ea6 to know if LTC compiled big/little endian, 32/64-bit word 2014-07-14 15:47:20 +02:00
Larry Bugbee
f07234fd93 removed redundant include 2014-07-14 15:47:20 +02:00
Larry Bugbee
ef1fe79ca5 added missing signatures 2014-07-14 15:47:20 +02:00
Larry Bugbee
a543e0caa6 changed to keep it simple 2014-07-14 15:47:20 +02:00
Larry Bugbee
3f9144c9a7 added signatures to header file 2014-07-14 15:47:20 +02:00
Larry Bugbee
d99b970a8b added a Python demo 2014-07-14 15:47:20 +02:00
Larry Bugbee
1b29ce896f include compiler defines and other minor refinements 2014-07-14 15:47:20 +02:00
Steffen Jaeckel
fd140d4535 clean up makefile 2014-07-14 15:42:32 +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
a0d0a17acf update gitignore 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
3c6a80525f current icc defines the same macros and functionset as gcc
as a result the special detection of icc has been removed
2014-07-12 17:28:54 +02:00
Steffen Jaeckel
6dfb080810 spit errors if 32- AND 64-bit wordsize is defined 2014-07-12 17:26:30 +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
98893c077b fix possible free of not yet allocated key parameters
There would have been a call to mp_clear_multi() of all the key parameters
that are not yet allocated, in the case where the calculations of p, q,
tmp1 or tmp2 created an error.

This also includes a proposed improvement from the OLPC project to free
elements in the reverse order as they were allocated.
2014-07-11 16:44:43 +02:00
Steffen Jaeckel
30278d1121 fix possible missing free of rnd and rndi
There could have been a 'goto error', which misses the free of rnd and
rndi even if they were initialized.
This could happen in cases where a private key operation was done and
afterwards one of the operations like reading back or conversion, would
have failed (which is likely not to happen)

This also includes a proposed improvement from the OLPC project to free
elements in the reverse order as they were allocated.
2014-06-15 11:51:38 +02:00