Curiosity with RSA sign/encrypt keys

David Shaw dshaw@jabberwocky.com
Mon Jul 9 13:25:01 2001


Hi,

I was doing some experimenting with the "new" (v4) RSA key format
(which cannot be generated by gnupg, but if you generate them via pgp,
gnupg will use them), and I ran into an interesting situation:

When looking at the actual packets in the key, the main public key is
algorithm 1 (i.e. "RSA Encrypt or Sign" as per RFC 2440).  The subkey
is also algorithm 1.  However, if I sign with this key, gnupg will
only use the main key, and if I encrypt with this key, gnupg will only
use the subkey.  The "!" syntax still does not allow me to encrypt to
the main key.  I tried removing the subkey altogether, leaving only
the main key and gnupg still would not allow it to be used for
encryption ("unusuable public key").

There are other algorithms (2 for RSA encrypt-only, and 3 for RSA
sign-only) that would make sense with this restriction, but algorithm
1 is specifically specified as an encryption and signing key.

I know that in real world use, there are a zillion reasons to use
primary and subkeys to divide signing and encryption and not use the
same key for both.  I'm just trying to understand gnupg's behavior
here.

Any ideas what is happening here?

David

-- 
   David Shaw  |  dshaw@jabberwocky.com  |  WWW http://www.jabberwocky.com/
+---------------------------------------------------------------------------+
   "There are two major products that come out of Berkeley: LSD and UNIX.
      We don't believe this to be a coincidence." - Jeremy S. Anderson