zsmith.co

GNU Privacy Guard (GPG) Quick Reference

Revision 2
© 2014-2018 by Zack Smith. All rights reserved.

Handy GPG commands

To encrypt a file with a password gpg -c file
To decrypt a file using a password gpg -d file
To import someone's public key gpg --import public.key
To print your public key as ASCII gpg --armor --export
To encrypt a file you are sending to someone gpg -e -u Sender Name -r Receiver Name filename
To encrypt a file using your private key gpg -e file
To decrypt a file using your private key gpg -d file
To create a new public and private key pair associated with an email address gpg --gen-key

Don't have GPG? Use OpenSSL.

To encrypt:

openssl des3 -salt -out file.des3 -in file.zip

To decrypt:

openssl des3 -salt -d -in file.des3 -out file2.zip