Useful GPG commands
From Useful GPG commands (iu.edu) Encryption/decryption commands To encrypt a plaintext file with the recipient's public key: gpg -e -r recipient_userid textfile To sign a plaintext file with your secret key: gpg -s textfile To sign a plaintext file with your secret key and have the output readable to people without running GPG first: gpg --clearsign textfile To sign a plaintext file with your secret key, and then encrypt it with the recipient's public key: gpg -se -r recipient_userid To decrypt an encrypted file, or to check the signature integrity of a signed file: gpg [-o outputfile] ciphertextfile Key management commands To generate your own unique public/secret key pair: gpg --gen-key To add a public or secret key file's contents to your public or secret key ring: gpg --import keyfile To extract (copy) a key from your public or secret key ring: gpg -ao keyfile --export userid or gpg -ao keyfile --export-secret-key To view the contents of your publ