[svn] GnuPG - r4119 - trunk/cipher

svn author dshaw cvs at cvs.gnupg.org
Thu Apr 20 23:11:57 CEST 2006


Author: dshaw
Date: 2006-04-20 23:11:56 +0200 (Thu, 20 Apr 2006)
New Revision: 4119

Modified:
   trunk/cipher/ChangeLog
   trunk/cipher/dsa.c
Log:
(generate): Tweak to allow keys larger than 1024 bits.  Enforce that the q
size doesn't end between byte boundaries.


Modified: trunk/cipher/ChangeLog
===================================================================
--- trunk/cipher/ChangeLog	2006-04-20 18:40:37 UTC (rev 4118)
+++ trunk/cipher/ChangeLog	2006-04-20 21:11:56 UTC (rev 4119)
@@ -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  <dshaw at jabberwocky.com>
 

Modified: trunk/cipher/dsa.c
===================================================================
--- trunk/cipher/dsa.c	2006-04-20 18:40:37 UTC (rev 4118)
+++ trunk/cipher/dsa.c	2006-04-20 21:11:56 UTC (rev 4119)
@@ -180,8 +180,9 @@
     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 */




More information about the Gnupg-commits mailing list