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 if (!dsa_generate_keypair(&pub, &key,
25 &lfib, (nettle_random_func *) knuth_lfib_random,
26 NULL, verbose ? progress : NULL,
30 test_dsa_key(&pub, &key, 160);
31 test_dsa160(&pub, &key, NULL);
33 if (!dsa_generate_keypair(&pub, &key,
34 &lfib, (nettle_random_func *) knuth_lfib_random,
35 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);