Commit Graph

495 Commits

Author SHA1 Message Date
Steffen Jaeckel
1bf42ea99a update some of the static functions 2017-06-22 14:21:14 +02:00
Steffen Jaeckel
27b3ffc627 use compare_testvector() instead of XMEMCMP() in tests 2017-06-22 14:21:14 +02:00
Steffen Jaeckel
05e28d6cfa fix potential timing attacks in rsa, eax, ocb and ocb3 2017-06-22 14:21:14 +02:00
Karel Miko
243a1dc33e drop _dh_make_key_ex 2017-06-22 13:19:48 +02:00
Karel Miko
cba1569c82 fix tomcrypt_pk.h 2017-06-22 13:19:48 +02:00
Karel Miko
5eaff56d90 remove dh_export_radix.c dh_import_radix.c 2017-06-22 13:19:47 +02:00
Karel Miko
771d67e102 DH facelift part1 2017-06-22 13:19:47 +02:00
Steffen Jaeckel
26b57032e7 use correct amount of M-R tests in dsa_make_params() 2017-06-22 11:55:08 +02:00
Steffen Jaeckel
7453eddae9 improve ltc_math_descriptor a bit
* introduce LTC_MILLER_RABIN_REPS which is used as default value
  in the isprime() implementations
2017-06-22 11:55:08 +02:00
Karel Miko
b8f22157b3 PK_MAX_RETRIES 2017-06-21 13:38:39 +02:00
Karel Miko
0c115a162d whitespace 2017-06-21 13:26:52 +02:00
Karel Miko
fff832091f ecc_sign_hash max_iterations 2017-06-21 13:25:06 +02:00
Karel Miko
cdf04b6140 fix mp_montgomery_setup 2017-06-21 13:01:22 +02:00
Karel Miko
a937f23821 static functions name fix 2017-06-21 12:49:19 +02:00
Karel Miko
67200b641d ecc_sign+verify_hash_raw > ecc_sign+verify_hash_rfc7518 2017-06-21 12:11:35 +02:00
Steffen Jaeckel
6fc0a90a1e fix headers & footers in demos & tests 2017-06-20 15:16:11 +02:00
Steffen Jaeckel
4cd1355b8f more clean-up of headers/footers 2017-06-20 15:16:11 +02:00
Steffen Jaeckel
fe19dad623 replace SVN tags 2017-06-20 15:16:11 +02:00
Steffen Jaeckel
66527b3e5e include "tomcrypt.h", not <tomcrypt.h>
we want to include the local version of the header, not the system-version
2017-06-20 15:16:11 +02:00
Steffen Jaeckel
fb35d5be54 more clean-up of headers 2017-06-20 15:16:11 +02:00
Steffen Jaeckel
4dc211e19d clean-up headers 2017-06-20 15:16:11 +02:00
Steffen Jaeckel
f2076f0700 use zeromem() where appropriate 2017-06-15 01:07:44 +02:00
Steffen Jaeckel
258de3cecc use ltc_mp_digit instead of unsigned long 2017-06-15 01:07:44 +02:00
Steffen Jaeckel
98b500e873 update crypt_build_settings et al. 2017-06-15 01:07:44 +02:00
Steffen Jaeckel
0cf7c49045 sync ltc_math_descriptor from doc 2017-06-15 00:46:50 +02:00
Francois Perrad
0bc0d55245 refactor REGISTER_* 2017-06-12 20:07:23 +02:00
Francois Perrad
ec51f880b5 Right hand side of assignment needs parenthesis 2017-06-12 20:07:23 +02:00
Francois Perrad
f40bda7cb3 fix indentation 2017-06-12 20:07:23 +02:00
Steffen Jaeckel
fec05471ae the latest tfm version has fp_rand() available, so we can test this now 2017-06-12 18:45:24 +02:00
Steffen Jaeckel
48e4ec07be use LTC_ARGCHK() for all mutex operations 2017-06-12 17:19:43 +02:00
Karel Miko
4f12e41d29 fix trailing ; 2017-06-12 16:35:27 +02:00
Karel Miko
114b694735 trying to fix dh_shared_secret - #119 2017-06-11 23:20:46 +02:00
Karel Miko
bc4236d90f tuning dh_make_key 2017-06-11 21:12:14 +02:00
Karel Miko
361778d2ac another dh_make_key redesign 2017-06-11 19:43:08 +02:00
Karel Miko
71884788e3 fix warning: comparison between signed and unsigned integer 2017-06-11 10:12:18 +02:00
Karel Miko
532c511f52 improved dh_make_key 2017-06-10 23:02:30 +02:00
Steffen Jaeckel
c9f4628693 don't call rng_make_prng() from dh_make_key()
While testing with multiple threads I had spurious errors where some tests
can't read from the PRNG.
If I tracked it down correctly that's caused by `dh_make_key()`
calling `rng_make_prng()` which re-initializes the selected PRNG.

I like the idea of "refreshing" the PRNG with entropy from a hopefully
secure RNG before generating a new key, but I don't think it's the duty
of a key-generation function to ensure that, but merely the application
that implements key-generation.
2017-06-09 18:56:04 +02:00
Steffen Jaeckel
f31d8ff864 implement smaller private key sizes 2017-06-09 18:33:51 +02:00
Karel Miko
f46b32ba2e better DH primes 2017-06-09 14:14:07 +02:00
Karel Miko
2a883b44c7 do not expose dsa_make_params as a public API 2017-06-09 13:01:30 +02:00
Steffen Jaeckel
ef450fe14a fix error handling 2017-06-08 23:34:16 +02:00
Karel Miko
52a496e9e1 rsa_import_pkcs8 - passwd is now "const void *" 2017-06-08 23:34:16 +02:00
Karel Miko
d96f4bdcff rsa_import_pkcs8 2017-06-08 23:34:16 +02:00
Steffen Jaeckel
4bbce780c4 always provide compare_testvector() as a function 2017-06-08 22:20:45 +02:00
Steffen Jaeckel
4e971a8518 don't use print_hex() from library 2017-06-08 22:20:45 +02:00
Steffen Jaeckel
4ceb82bf54 add register_all_{ciphers,hashes,prngs}() 2017-06-08 22:20:45 +02:00
Steffen Jaeckel
7f91e5ae65 requiring 'name != NULL' in find_cipher_any() doesn't make sense 2017-06-08 22:20:45 +02:00
Steffen Jaeckel
8c1d55f4c0 fix error when compiling w/ LTC_CLEAN_STACK but w/o LTC_FAST 2017-06-08 22:20:45 +02:00
Steffen Jaeckel
b78c5551f7 move compare_testvector() implementation to the library 2017-06-08 22:20:45 +02:00
Steffen Jaeckel
0a23c6d32e also check for cipher descriptors 2017-06-08 22:20:44 +02:00