Are exported private keys in GPG still encrypted?

Matuku picture Matuku · Apr 2, 2012 · Viewed 13.3k times · Source

Are the exported private keys gotten by executing gpg --export-secret-keys still encrypted and protected by their passphrase? This seems to be the case but I can't find anywhere that explicitly confirms this.

If the exported keys are still encrypted then is there anyway to get the pure, unencrypted private key (like you can for the public segment)?

Answer

mshroyer picture mshroyer · Jul 22, 2014

Exported secret keys are encrypted by default, however --export-options export-reset-subkey-passwd will produce an unprotected export:

When using the --export-secret-subkeys command, this option resets the passphrases for all exported subkeys to empty. This is useful when the exported subkey is to be used on an unattended machine where a passphrase doesn't necessarily make sense. Defaults to no.