3 #include "knuth-lfib.h"
6 progress(void *ctx UNUSED
, int c
)
14 struct dsa_public_key pub
;
15 struct dsa_private_key key
;
17 struct knuth_lfib_ctx lfib
;
19 dsa_private_key_init(&key
);
20 dsa_public_key_init(&pub
);
22 knuth_lfib_init(&lfib
, 13);
24 ASSERT (dsa_generate_keypair(&pub
, &key
,
26 (nettle_random_func
*) knuth_lfib_random
,
27 NULL
, verbose
? progress
: NULL
,
30 test_dsa_key(&pub
, &key
, 160);
31 test_dsa160(&pub
, &key
, NULL
);
33 ASSERT (dsa_generate_keypair(&pub
, &key
,
35 (nettle_random_func
*) knuth_lfib_random
,
36 NULL
, verbose
? progress
: NULL
,
39 test_dsa_key(&pub
, &key
, 256);
40 test_dsa256(&pub
, &key
, NULL
);
42 dsa_public_key_clear(&pub
);
43 dsa_private_key_clear(&key
);