Skip to content
Snippets Groups Projects
Commit 4d6c9cc2 authored by Niels Möller's avatar Niels Möller
Browse files

Add test for dsa key generation with large q.

parent 85b8bdde
No related branches found
No related tags found
No related merge requests found
2014-03-25 Niels Möller <nisse@lysator.liu.se>
* testsuite/dsa-keygen-test.c (test_main): Do dsa_param cast once,
and assign to variable.
and assign to variable. Test dsa_generate_params and
dsa_generate_keypair with a large q; p_bits = 1024, q_bits = 768.
* dsa.h: Deleted old interface (moved to dsa-compat.h).
(struct dsa_value): Deleted. Updated many files.
......
......@@ -50,6 +50,21 @@ 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);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment