question about determining the key length

Seby seby2kt14 at
Wed Nov 15 09:25:26 CET 2017

Hello Cathy,

On Nov 15, 2017 00:40, "Smith, Cathy" <Cathy.Smith at> wrote:


Is there a way to determine the key length and the type of key (RSA or
other) used when generating  the keyring?  I have a RHEL 5 box using gpg
1.4.5 where I need to determine how a key ring was generated.    Even on an
Ubuntu box using gpg2, the –list-secret-keys option does not print out that

Thank you.


Cathy L. Smith
IT Engineer

Pacific Northwest National Laboratory
Operated by Battelle for the
U.S. Department of Energy

Phone: 509.375.2687
Fax:       509.375.4399
Email: *cathy.smith at <cathy.smith at>*

gpg -K or gpg --list-keys or gpg --list-secret-keys should all print the
information you are interested in.

In my example the primary key is rsa3072 and encryption subkey is rsa4096.
You can see this info before creation date if the key.

Note that gnupg older 1.x does not support ecc, only rsa/rsa and rsa/dsa.

~# gpg --list-secret-keys

sec   rsa3072 2017-11-15 [SC]
uid           [ultimate] Test Test
ssb   rsa4096 2017-11-15 [E]

This is gnupg 2.2. How does it look at your side?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Gnupg-users mailing list