Steffen Jaeckel
a0f2abc5b5
re-format
2017-07-04 10:25:38 +02:00
Steffen Jaeckel
a80abb1222
put dh_set_pg_dhparam() in own c file
2017-07-04 10:25:38 +02:00
Steffen Jaeckel
5640f8afc7
put dsa_set_pqg_dsaparam() in own c file
2017-07-04 10:25:38 +02:00
Steffen Jaeckel
3c2e0d6686
dsa_make_key_ex() is now dsa_generate_key()
2017-07-04 10:25:38 +02:00
Steffen Jaeckel
dbeaefd65b
remove LTC_{DH,DSA}_KEY_INITIALIZER
2017-07-04 10:25:38 +02:00
Steffen Jaeckel
d1ecd82a42
use rand_bn_range() where possible
2017-06-28 20:50:21 +02:00
Steffen Jaeckel
bdfecc5f3c
more doc updates
2017-06-28 16:45:29 +02:00
Steffen Jaeckel
d64880eeb1
add dsa_set_pqg_dsaparam()
2017-06-28 16:07:54 +02:00
Steffen Jaeckel
35e0c5fc71
clean-up a bit around DSA
...
* comments
* dsa_test()
* order of alloc/free of key parts
2017-06-28 16:07:32 +02:00
Steffen Jaeckel
cfff656e25
re-factor dsa_make_key() etc.
2017-06-28 14:40:30 +02:00
Steffen Jaeckel
24946d08b7
use mp_cleanup_multi()
2017-06-28 14:40:30 +02:00
Steffen Jaeckel
f2f113880b
also rename file
2017-06-27 22:10:07 +02:00
Steffen Jaeckel
c493a2a0a3
re-factor dh_export_radix() to dh_export_key()
2017-06-27 22:09:21 +02:00
Steffen Jaeckel
9d6689fc08
re-factor dh_make_key() and variants
2017-06-27 22:00:13 +02:00
Steffen Jaeckel
fbc54756c1
replace dh_import_radix() by dh_set_{pg,key}
2017-06-27 21:53:02 +02:00
Karel Miko
f60e2902ed
dh_make_key_ex dh_export_radix dh_import_radix
2017-06-27 20:11:52 +02:00
Steffen Jaeckel
6b798ca6a6
replace rsa_import_radix() by rsa_set_{key,factors,crt_params}()
2017-06-27 20:05:36 +02:00
Steffen Jaeckel
05e9f0ee79
Revert "use ltc_pk_part in rsa_import_radix()"
...
This reverts commit 023e4a2c23641d852cf47000948fa29a53249457.
2017-06-27 20:05:36 +02:00
Steffen Jaeckel
00a5212d99
use ltc_pk_part in rsa_import_radix()
2017-06-27 20:05:36 +02:00
Steffen Jaeckel
0a6af8d333
rsa_exptmod(): verify that p and q are valid before going the CRT path
2017-06-27 19:01:56 +02:00
Francois Perrad
446fec1bc4
refactor switch with default
2017-06-22 17:13:40 +02:00
Steffen Jaeckel
e9c90e7f63
no need to use XMEM_NEQ()
in PK crypto
2017-06-22 14:21:14 +02:00
Steffen Jaeckel
1bf42ea99a
update some of the static functions
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
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
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
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
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
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