Professional Documents
Culture Documents
GPG Cheat Sheet: Create A Key
GPG Cheat Sheet: Create A Key
The GNU Privacy Guard (GnuPG or GPG) is a free software alternative for the PGP suite of
cryptographic software, released under the GNU General Public License. It is an essential tool
to encrypt data or communications.
Create a key
gpg --gen-key
Export keys
gpg --export -a "User Name" > public.key
gpg --export-secret-key -a "User Name" > private.key
Encrypt
gpg -e [-u "Sender"] [-r "Receiver"] somefile
• creates somefile.gpg, does not delete somefile
• Use yourself as receiver for private data
Decrypt
gpg -d mydata.tar.gpg
Sign
gpg -s
if you don’t specify a from/to person, it will ask. If you don’t specify a file, it will wait for input.
Type or paste your input and pressing[ctrl] D will tell the program that you are done with the
input and move on.