13
2
I've noticed that if I import my ASCII-armored PGP private key into an otherwise empty GnuPG keyring (by deleting ~/.gnupg
beforehand), the keyring contains both the public and private keys. Also, the ASCII-armored private key block is around twice the size of my public key counterpart, which leads me to believe that the private key block contains both the private and public keys, whereas the public key block only contains the latter.
Since I've created my key, until now, I've backed up my keys with one file containing my exported private key block, and another with my exported public key block. Is my public key block backup redundant, and am I therefore safe just keeping the private key file?
I use this command to create the private key file:
gpg --export-secret-keys -a > private
and this command to create the public key file:
gpg --export -a > public
1For someone to answer your question you would need to add the commands you use to export your keys. The answer is probably in that. But what would you gain by not exporting the public key? I'd say leave it in your backup routine, it doesn't cost anything and for every purpose where you need only the public key you already have it available. – Bram – 2012-06-09T11:33:53.673
Thanks Bram; I've edited the question for extra clarity. And yes, saving ~3 KB has no real benefit, I'm merely curious. – Delan Azabani – 2012-06-09T11:37:10.723