Gpg
Introduction
GNU Privacy Guard (GnuPG or GPG) is a free, open-source replacement for PGP
See http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/gpg-cs.html for a nice cheatsheet
Create a GPG keypair
gpg --gen-key
Share a public-key with the world
Don't worry this is safe.
gpg --send-keys --keyserver pgp.mit.edu KEY
where KEY is the hex code
List keys on your "keyring"
gpg --list-keys
Or to show just private keys
gpg --list-secret-keys
Exchange/copy a private key
gpg --export-secret-key -a "Mark Foster" > private.keygpg --allow-secret-key-import --import private.key
Show a key's fingerprint
You might do this for a key-signing party or want to validate someone
gpg --fingerprint KEY
Sign a document or file
There are multiple was to do this. I find the detached signature the most useful
gpg -b filename
this creates filename.sig.
To verify the signature (this proves the original filename was not tampered with)
gpg --verify filename.sig
Things you can do without a key
Encrypt a file
With a password (symmetric key)
gpg -c filename
Decrypt same file
gpg --decrypt filename