GPG question:where on the system are my key-pairs?

Nalin Dahyabhai nalin at redhat.com
Tue Oct 28 20:55:02 UTC 2003


On Tue, Oct 28, 2003 at 03:14:15PM -0500, Elton Woo wrote:
> I am following a tutorial to create my PGP keys, and it appears that
> I have succeeded in at least *some* of the steps. However, I can't find
> the my keys, as I would like to back them up to diskette.
> ]$ rpm -qa | grep gpg returns the following:
> two lines of gpg-pubkey-{two different sets of hexadecimal numbers
> per line].
> 
> Since I cannot erase them I guess I will have to use them, but where
> are they?  ... so at least I can back them up.

The keys you created¹ are stored on your public and secret key rings,
~/.gnupg/pubring.gpg and ~/.gnupg/secring.gpg by default.  (As an aside,
if you haven't already created a revocation certificate² for your key, I
highly recommend you do so now to avoid problems if you should forget
the passphrase at some point in the future.)

The keys which "rpm -qa" lists are keys which have been previously
imported into the RPM database using "rpm --import", and are not related
(though you may want to use "gpg --export --armor" to export your public
key to a text file, and then import that key into your RPM database).

Cheers,

Nalin

¹ I assume these are keys created by running "gpg --gen-key".
² Using "gpg --gen-revoke".  Print it out and lock it away until the day
  comes when you find you need it.  The GNU Privacy Handbook³ explains
  this in detail.
³ http://www.gnupg.org/(en)/documentation/guides.html





More information about the fedora-test-list mailing list