Tag Archives: PGP

PGP and revoked key

Been playing around with PGP again and stupidly imported my revocation key!

Thankfully, I had not uploaded that revocation to the key server, so using this tip I managed to “undo” the revocation.
http://superuser.com/questions/608336/un-revoke-pgp-key

And to preserve this knowledge from link rot I’ll paste it here:

—–
It turns out that it is possible (and relatively simple) to delete and re-import the key, provided that it is on a keyserver (and provided that the revocation has not been sent to the keyserver, of course).

This is what I found to work (THEKEYID is the short ID of the key):

Delete the public key as follows (the –expert option allows the public key to be deleted whilst the private key is kept) :
gpg –expert –delete-key THEKEYID

Confirm by pressing:
y

Fetch the public key again from a keyserver:
gpg –keyserver subkeys.pgp.net –recv-keys THEKEYID

Done!

Presumably this could also be done from a local (pre-revocation) backup of the public key, using gpg –import public.key instead of the third command.

Simply deleting the entire key (public and private) from the GPG Keychain Access GUI, and then restoring from a backup, did not work – I don’t know why.
—–

Alternately, you can just as easily use a previously sent copy of your public key (in case you have the file/mail) you can just import it after the deletion from file.

gpg –import

Just useful to have! 🙂