Gpg

From ConShell
Jump to navigation Jump to search

Introduction

GNU Privacy Guard (GnuPG or GPG) is a free, open-source replacement for PGP

http://www.gnupg.org/

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.key
gpg --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

Things you can do without a key

Encrypt a file

With a password (symmetric key)

gpg -c filename

Decrypt same file

gpg --decrypt filename