Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer
This answer does not convince me. The fact that I do not need a passphrase to export again might just mean that the key is now stored unencrypted. – Konstantin Schubert Aug 9 '13 at 10:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.