Commit Graph

519 Commits

Author SHA1 Message Date
Steffen Jaeckel
cb2322f8de Merge branch 'fix/x32' into develop
This closes #51
2014-09-28 22:43:58 +02:00
Steffen Jaeckel
afaef3993c fix compiler warning when compiling with GMP_DESC 2014-09-10 16:16:46 +02:00
Steffen Jaeckel
f597f29ece math: change get_digit() return value
unsigned long is 32bit wide when compiling with the compiler flag "-mx32"
but the digit size of the math libraries is still 64 bit which lead to
the buggy ecc code.

Therefore define a new type ltc_mp_digit with the correct width and use
that as return value of get_digit()

Has been tested with all three math providers
2014-09-10 16:15:35 +02:00
Steffen Jaeckel
1793072c67 fix CC parameter given to make in testprof folder 2014-09-10 16:08:49 +02:00
Steffen Jaeckel
67b9cd8a95 trim trailing spaces 2014-09-02 02:17:43 +02:00
Steffen Jaeckel
e8d4598616 Merge branch 'fix/mingw64' into develop 2014-09-01 19:29:44 +02:00
Steffen Jaeckel
fff4fd15c4 build.sh: improve diff parameters 2014-08-31 18:47:21 +02:00
Steffen Jaeckel
ee4c00b753 some more ASN.1 fixes
these should have been in #49
2014-08-31 18:26:14 +02:00
Steffen Jaeckel
c342cb5a21 Merge branch 'fix/asn1' into develop
This closes #49

[skip ci]
2014-08-31 18:02:52 +02:00
Steffen Jaeckel
e5fb4d5ebe use DO() macro when calling API functions in tests 2014-08-28 14:02:57 +02:00
Steffen Jaeckel
7a5ea10e60 add missing ASN1 types in der_encode_set() 2014-08-28 14:02:57 +02:00
Steffen Jaeckel
ddede01d16 trim trailing spaces 2014-08-28 14:02:57 +02:00
Steffen Jaeckel
b06270645e add missing check of the OID 2014-08-28 14:02:57 +02:00
Steffen Jaeckel
6bba3a2a70 change the ASN1 type to be a typedef
replace all 'default' cases in the switch statements
2014-08-28 14:02:57 +02:00
Steffen Jaeckel
00c111b1c8 add missing types to decode routines 2014-08-28 14:02:57 +02:00
Steffen Jaeckel
800182338e unwind conditional expressions
I prefer readability
2014-08-28 14:02:57 +02:00
Christopher Brown
3cdb64eca6 bypass constructed type identification for sets / sequences 2014-08-28 14:02:56 +02:00
Christopher Brown
678b6d9641 fix constructed type identifier check 2014-08-28 14:02:56 +02:00
Steffen Jaeckel
171eae5378 asn1: use LTC_SET_ASN1 macro to access ltc_asn1_list elements 2014-08-28 14:02:56 +02:00
Steffen Jaeckel
4071475558 fix compiler warnings 2014-08-28 13:53:51 +02:00
Steffen Jaeckel
78e367895a Merge branch 'feature/testRsaPkcs1' into develop
This closes #48
2014-08-28 13:35:13 +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
8ce125f8a8 mp_rand() assumes the number of digits and not the bitsize as parameter 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
d51715db72 pkcs#1 v1.5 decode: fix missing check of PS length in EMSA mode 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
5eb9743410 rsa_verify_hash: fix possible bleichenbacher signature attack 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
dc0c6ed9d9 regen rsa-testvectors 2014-08-28 13:30:26 +02:00
Steffen Jaeckel
7c10ec9dd2 add makefile for rsa-testvectors 2014-08-28 13:30:26 +02:00
Steffen Jaeckel
2c69088be8 execute only one testcase per default 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
c24e2a1e6b fix pkcs1v15crypt-vectors.txt 2014-08-28 13:30:25 +02:00
Steffen Jaeckel
b51824748a rt.py: extend for PKCS#1 v1.5 EME 2014-08-28 13:30:25 +02:00
Steffen Jaeckel
7302a7cfcb add testprof/pkcs_1_emsa_test 2014-08-28 13:30:25 +02:00
Steffen Jaeckel
25fcd4c70f rt.py: add possibility to parse PKCS#1 v1.5 EMSA testvectors 2014-08-28 13:30:25 +02:00
Steffen Jaeckel
95f9d527f6 rt.py: start making even more generic, fixed naming of p and q 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
ed0982b7e7 add oaep testvectors 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
Jonathan Herzog
3324da2601 Fixed small padding error in the PKCS#1 PSS code.
The existing LTC code for padding meassages for PSS signatures
contained a small error. In particular, the PSS-passing algorithms is
supposed to be given (bitlength of key - 1) as an argument. The LTC
code passes (bitlength of key), and subtracts 1 in the middle of the
PSS-padding. This subtraction unfortunately comes too late: a
calculation using that argument has already been made. Fortunately,
this bug only appeared if the bit-length of the key was 1 mod 8, and
so is unlikely to show up in practice. Still, this patch fixes the
problem.

Conflicts:
	src/pk/pkcs1/pkcs_1_pss_decode.c
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
4a819b2f1b add generated file pss-vect.c 2014-08-28 13:30:25 +02:00
Steffen Jaeckel
269516533c rt.py: add name of testcase in struct 2014-08-28 13:30:25 +02:00