[Announce] GnuPG 1.2.3 patch to remove ElGamal signing keys

Werner Koch wk at gnupg.org
Thu Nov 27 16:00:58 CET 2003


On Thu, 27 Nov 2003 15:05:37 +0100, Miguel Coca said:

> This patch has a bug. It won't keep the key from being used if it's
> the default one. I moved away my ~/.gnupg, created an ElGamal key, and
> it allows me to sign with it:

Here is a simple patch which should be used in addition.  It entirely
stifles the use of Elgamal for signing.


Index: cipher/pubkey.c
===================================================================
RCS file: /cvs/gnupg/gnupg/cipher/pubkey.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- cipher/pubkey.c     3 Aug 2002 10:50:38 -0000       1.32
+++ cipher/pubkey.c     27 Nov 2003 14:47:59 -0000      1.33
@@ -518,6 +518,9 @@
        log_mpidump("  data:", data );
     }
 
+    if (is_ELGAMAL (algo))
+      return G10ERR_UNU_SECKEY;
+
     do {
        for(i=0; pubkey_table[i].name; i++ )
            if( pubkey_table[i].algo == algo ) {






-- 
Werner Koch                                      <wk at gnupg.org>
The GnuPG Experts                                http://g10code.com
Free Software Foundation Europe                  http://fsfeurope.org




More information about the Gnupg-devel mailing list