Quick ‘n Dirty GPG Key Implementation
by David Sudjiman ~ July 18th, 2005. Filed under: Linux.I feel like I need to put this tutorial here as I tend to forget things easily. Here’s the quick ‘n dirty GPG key implementation. If you need more explanations, please read Gnu Privacy Guard tutorial, part 1 or www.gnupg.org
Creating GPG key.
- Create GPG key.
- Export GPG key to a file.
- Create a revocation certificate key and export to a file.
- Get a list of keyserver in a file to populate your key
- Clean up the list file and start to populate
$gpg --gen-key
$gpg --armor --export <UID | Email Address> > <filename.gpg>
$gpg --gen-revoke <UID | Email Address> > <filename_revoke.gpg>
$host -l pgp.net | grep wwwkeys
$for file in $(cat wwwkeys_servers_list.txt); do gpg --keyserver $file --send-keys <UID>; done
Just say that you upgrade your computer and you need to revoke your old GPG key. Make sure you still have filename.gpg and filename_revoke.g.
pg
- Import your previous key
- Import your revocation key to revoke
- Submit your revoked key to wwwkeys servers to revoke your public key on servers
- Finished revoke your key, do the clean up
$gpg --import filename.gpg
$gpg --import filename_revoke.gpg
$for file in $(cat wwwkeys_servers_list.txt); do gpg --keyserver $file --send-keys <UID>; done
$gpg --delete-secret-keys <UID | Email Address>
$gpg –delete-keys <UID | Email Address>
Note: for pgp.net domain, you don’t have to submit your key to all of the server as they sync each other.