Commit 7fa4ac23 authored by Niels Möller's avatar Niels Möller

Test dsa_generate_params with large q.

parent c165b7b2
......@@ -2,6 +2,9 @@
* testsuite/dsa-keygen-test.c (test_main): Explicitly use
dsa_compat_generate_keypair.
(test_main): Test dsa_generate_params and dsa_generate_keypair
with a large q; p_bits = 1024, q_bits = 768.
* testsuite/testutils.h: Undo dsa-compat.h name mangling.
* dsa-keygen.c (dsa_generate_keypair): New interface, generating
......
......@@ -49,6 +49,20 @@ test_main(void)
test_dsa_key(params, pub.y, key.x, 224);
test_dsa256(&pub, &key, NULL);
/* Test with large q */
if (!dsa_generate_params (params,
&lfib,
(nettle_random_func *) knuth_lfib_random,
NULL, verbose ? progress : NULL,
1024, 768))
FAIL();
dsa_generate_keypair (params, pub.y, key.x,
&lfib,
(nettle_random_func *) knuth_lfib_random);
test_dsa_key(params, pub.y, key.x, 768);
test_dsa256(&pub, &key, NULL);
dsa_public_key_clear(&pub);
dsa_private_key_clear(&key);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment