🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #175189

Re: GnuPG keys for use by PGP?

#175189
From: Johan Wevers
Date: Mon, 20 Sep 2004 19:18
53 lines
2907 bytes
Thomas J. Boschloo <nospam@hccnet.nl.invalid> wrote:

>GnuPG cannot and probably will not create RSA version 3 keys until the
>IDEA patent expires in 2007.

But that is easily solved by the following patch. I didn't check if
it still works on 1.2.6. It allows one to create a v3 key in expert mode.


--- gnupg-1.0.7/g10/keygen.c	Wed Jan 30 18:24:58 2002
+++ gnupg-1.0.7/g10/keygen.c	Thu Mar 28 13:46:19 2002
@@ -673,7 +673,8 @@
     sk = m_alloc_clear( sizeof *sk );
     pk = m_alloc_clear( sizeof *pk );
     sk->timestamp = pk->timestamp = make_timestamp();
-    sk->version = pk->version = 4;
+    sk->version = pk->version = (opt.expert && opt.pgp2) ? 3 : 4;
+    if (opt.expert && opt.pgp2) pk->hdrbytes = 3;
     if( expireval ) {
 	sk->expiredate = pk->expiredate = sk->timestamp + expireval;
     }
@@ -768,9 +769,15 @@
     if( addmode )
 	tty_printf(    _("   (%d) ElGamal (encrypt only)\n"), 3 );
     tty_printf(    _("   (%d) ElGamal (sign and encrypt)\n"), 4 );
+  if (opt.expert && opt.pgp2) {
+    tty_printf(    _("   (%d) RSAv3 (sign and encrypt, PGP 2.6 compatible, not recommended)\n"), 5 );
+  } else {
     tty_printf(    _("   (%d) RSA (sign only)\n"), 5 );
     if (addmode)
         tty_printf(    _("   (%d) RSA (encrypt only)\n"), 6 );
+    if (opt.expert)
+        tty_printf(    _("   (%d) RSA (sign and encrypt, not recommended)\n"), 7 );
+  }
 
     for(;;) {
 	answer = cpr_get("keygen.algo",_("Your selection? "));
@@ -779,6 +786,11 @@
 	m_free(answer);
 	if( algo == 1 && !addmode ) {
 	    algo = 0;	/* create both keys */
+	    break;
+	}
+	else if( opt.expert && algo == 7 ) {
+	    algo = PUBKEY_ALGO_RSA;
+            *r_usage = PUBKEY_USAGE_SIG | PUBKEY_USAGE_ENC;
 	    break;
 	}
 	else if( algo == 6 && addmode ) {
-- 
ir. J.C.A. Wevers         //  Physics and science fiction site:
johanw@vulcan.xs4all.nl   //  http://www.xs4all.nl/~johanw/index.html
PGP/GPG public keys at http://www.xs4all.nl/~johanw/pgpkeys.html
Technical Details
Message-ID: <I4CtM4.qE@vulcan.xs4all.nl>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.security.pgp.20140722.mbox.gz!number1.nntp.dca.giganews.com!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!news.glorb.com!transit.nntp.hccnet.nl!border2.nntp.ams.giganews.com!nntp.giganews.com!transit.news.xs4all.nl!uucp.xs4all.nl!xs4all!vulcan!johanw
References: <95683b8a7a34dc6bcfba9a6839a04aa6@dizum.com> <414f06be$0$771$3a628fcd@reader20.nntp.hccnet.nl>

Show Full Headers
Complete Article Headers
Message-ID: <I4CtM4.qE@vulcan.xs4all.nl>
Subject: Re: GnuPG keys for use by PGP?
Date: Mon, 20 Sep 2004 19:18:04 GMT
From: johanw@vulcan.xs4all.nl (Johan Wevers)
References: <95683b8a7a34dc6bcfba9a6839a04aa6@dizum.com> <414f06be$0$771$3a628fcd@reader20.nntp.hccnet.nl>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.security.pgp.20140722.mbox.gz!number1.nntp.dca.giganews.com!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!news.glorb.com!transit.nntp.hccnet.nl!border2.nntp.ams.giganews.com!nntp.giganews.com!transit.news.xs4all.nl!uucp.xs4all.nl!xs4all!vulcan!johanw
Newsgroups: alt.security.pgp,alt.privacy.anon-server
Organization: Vulcan Academy of Sciences