Importing/Merging (secret) subkey into existing secret key

Aaron Whitehouse lists at
Fri Jul 23 12:58:36 CEST 2010


How do I import a subkey into an existing secret key?

I use a DSA key with El-Gamal encryption keys that I regenerate every
year. At some point my keyrings got out of sync and I ended up carrying
on with an older key. There was a secret subkey in the middle there that
got lost and I only noticed when I came to decrypt a file with it. I
managed to find (after a lot of effort) a copy of the missing secret
subkey and temporarily replaced my secring.pgp file to decrypt the
encrypted document. Crisis averted.

I would now like to merge that secret subkey into my main keyring, in
case I ever need it again. I have (while I had my secring substituted)
done a:
gpg --export-secret-subkeys -a [subkey] > sec_subkey.asc
and gone back to my main secring.

Unfortunately, a gpg --import sec_subkey.asc doesn't import this subkey
into my main keyring. How can I do this?



More information about the Gnupg-users mailing list