Thursday, July 17, 2008

GPG Cheat sheet

Below are some of the more frequent GPG commands I use:

#Generate Key
gpg --gen-key

#Upload key
gpg --send-keys --keyserver keyserver.ubuntu.com DEADBEEF

#Download key
gpg --keyserver keyserver.ubuntu.com --recv-keys DEADBEEF

#Export Public Key
gpg -ao something-public.key --export DEADBEEF

#Export Private Key
gpg -a --export-secret-keys DEADBEEF | gpg -aco some-private.key.gpg

#Import Public Key
gpg --import something-public.key

#Import Private Key
gpg --decrypt some-private.key.gpg |gpg --import

#Sign Key
gpg --sign-key ABABABAB
gpg --default-key DEADBEEF --sign-key ABABABAB

#Sign a file
gpg --default-key DEADBEEF --sign --detach-sign DumbSlides.odp

#Verify signature file
gpg DumbSlides.sig

#Sign a clear text
gpg --clearsign textfile.txt
gpg --default-key DEADBEEF --clearsign textfile.txt

#Create ASCII Armoured key file
gpg --export -a DEADBEEF > mykey.asc

GPG Rul35!

No comments: