Commit Graph

382 Commits

Author SHA1 Message Date
Steffen Jaeckel
7842e338bf fix API of dynamic language helpers
it is easier to handle 'int' than 'long' in the foreign language
2014-09-29 23:30:02 +02:00
Steffen Jaeckel
b3b93675f5 Merge branch 'feature/sha2t' into develop 2014-09-29 19:57:43 +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
06321b8602 update makefiles 2014-09-29 19:57:21 +02:00
Steffen Jaeckel
c58e2cae75 add special build rules for sha512/224 and sha512/256 2014-09-29 19:57:21 +02:00
Steffen Jaeckel
23fb224e19 add sha512/224 and sha512/256 2014-09-29 19:57:21 +02:00
Steffen Jaeckel
5ce0c7f70e Merge branch 'pascal-brand-st/xts' into develop
This closes #52
2014-09-29 19:47:44 +02:00
Steffen Jaeckel
3d905ca178 add testcase for multiple XTS encryption/decryption 2014-09-29 19:47:18 +02:00
Pascal Brand
adc54d08d0 Enable multiple XTS encryption or decryption
multiple xts_encrypt() cannot be performed because the
tweak is not updated. That means that
  xts_encrypt(buffer1, tweak)
  xts_encrypt(buffer2, tweak)
is not the same as
  xts_encrypt(concat(buffer1, buffer2), tweak)

Current patch enables such functionalities by
updating the tweak as output of the encryption.
Note that the tweak is no more constant.

The very same modification is performed
on xts_decrypt()

Signed-off-by: Pascal Brand <pascal.brand@st.com>
2014-09-28 22:55:02 +02:00
Steffen Jaeckel
824c7bf16a Merge branch 'pascal-brand-st/rsa' into develop
This closes #53
2014-09-28 22:53:22 +02:00
Steffen Jaeckel
94363b601c add testcase to verify that this patch is working 2014-09-28 22:52:32 +02:00
Pascal Brand
a6e89d58d4 RSA in CRT optimization parameters are empty 2014-09-28 22:48:21 +02:00
Pascal Brand
2bb3f0246f RSA in case CRT optimization parameters are not populated
rsa_exptmod(), ran on the private key, makes use of CRT optimization
parameters. In some use-cases, the given key does not include the
optimization parameters.

This patch allows rsa_exptmod() to run without the CRT parameters,
using directly mp_exptmod().

Signed-off-by: Pascal Brand <pascal.brand@st.com>
2014-09-28 22:45:46 +02:00
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