diff options
author | David Shaw <[email protected]> | 2006-04-20 21:11:56 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2006-04-20 21:11:56 +0000 |
commit | b625a6d1a9850905eb8c632c9024cafe0c9198f3 (patch) | |
tree | b5b4bda2b5c6eaaf2348050cd2037793309f6acc /cipher/dsa.c | |
parent | The plumbing necessary to create DSA keys with variable sized q. (diff) | |
download | gnupg-b625a6d1a9850905eb8c632c9024cafe0c9198f3.tar.gz gnupg-b625a6d1a9850905eb8c632c9024cafe0c9198f3.zip |
(generate): Tweak to allow keys larger than 1024 bits. Enforce that the q
size doesn't end between byte boundaries.
Diffstat (limited to '')
-rw-r--r-- | cipher/dsa.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cipher/dsa.c b/cipher/dsa.c index 447cea941..9745656f4 100644 --- a/cipher/dsa.c +++ b/cipher/dsa.c @@ -180,8 +180,9 @@ generate( DSA_secret_key *sk, unsigned nbits, unsigned qbits, MPI h, e; /* helper */ byte *rndbuf; - assert( nbits >= 512 && nbits <= 1024 ); + assert( nbits >= 512 ); assert( qbits >= 160 ); + assert( qbits %8 == 0 ); p = generate_elg_prime( 1, nbits, qbits, NULL, ret_factors ); /* get q out of factors */ |