How can one tell what kind of a key one has set up?

Holger Sesterhenn Holger.Sesterhenn at
Thu Nov 27 19:15:01 CET 2003


David Benfell wrote:

> I set my keys up sufficiently long ago, that I don't remember what
> kind they are, let alone whether or not they are ElGamal.  How can one
> tell?
> I didn't see anything obvious in the man page.

'gpg --list-keys' gives you the type of key:

pub   768R/0C9857A5 1995-09-30 Werner Koch (mein alter key) 	
				<wk at>


The 'R'behinf the key length tells you this is an RSA key, the big letter
means you can sign and encrypt!

pub  1024D/621CC013 1998-07-07 Werner Koch <werner.koch at>
sub  1536g/ADF6A6E1 1999-02-20 [expires: 2002-11-01]
sub  1536G/B5A18FF4 1998-07-07 [expires: 2002-07-06]

The 'D' tells you this is a DSA key for signing. The 'g' this is an ELGamal
for encryption only, the 'G' this is ELGamal for signing and encrypting

Or you use 'gpg --with-colon --list-keys'

pub:e:1024:17:6C7EE1B8621CC013:1998-07-07:2002-11-01::-:Werner Koch
<werner.koch at>::sc:

1:  RSA signing and encrypting
17: DSA signing
16: ELGamal encrypting
20: EGGamal signing/encrypting (THE BAD ONE!!!)

Werner has posted this in his announcement this morning, too!


Best Regards,

Holger Sesterhenn

More information about the Gnupg-users mailing list