aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cipher/ChangeLog2
-rw-r--r--cipher/dsa.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index 3448f7568..869ae6585 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -2,6 +2,8 @@
* dsa.c (dsa2_generate): New function to generate a DSA key with a
variable sized q.
+ (generate): Tweak to allow keys larger than 1024 bits. Enforce
+ that the q size doesn't end between byte boundaries.
2006-04-19 David Shaw <[email protected]>
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 */