4

How to share one PGP key on multiple machines details how to export your gpg secret key into a file with gpg --export-secret-key -a > secretkey.asc. What the answer does not state is whether the keyfile created is encrypted with your pass-phrase or clear-text.

Is the key-file encrypted or not?

fouric
  • 4,588

1 Answers1

4

When you import a key created by the --export-secret-key option, you get both the public & private keys; however, just like before you'll need the passphrase in order to use the private key. This is shown in the fact that you do not need your passphrase to run gpg --export-secret-key -a, and therefore the secret key never gets decrypted.

Personally, I would make sure to encrypt such an exported key again (perhaps symmetrically, with a long unique passphrase) if I was transporting or storing it.

fouric
  • 4,588
rsaw
  • 431