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
Steffen Jaeckel
055c515161
fix pss-vect.txt
2014-08-28 13:30:25 +02:00
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