Moving GPG keys
2011-07-27 15:31So you've got a new computer and you realise that you GPG keys are on the old one.
gpg --armor --export > keys.asc gpg --armor --export-secret-keys >> keys.asc gpg --armor --export-ownertrust > trust.asc
Then some sleight of hand to move the two .asc key files to the new computer. [1]
gpg --import keys.asc gpg --import-ownertrust trust.asc
---
[1] And yeah, read that with irony. Moving keys around is one of the "hard"
problems of everyday cryptography, and the hassle to do it right can be
large (and thus expensive, for example a "hand-to-hand courier" where the key
material never leaves someone's immediate possession).