0% found this document useful (0 votes)
114 views2 pages

GPG Cheat Sheet: Create A Key

GnuPG (Gnu Privacy Guard) is free software that provides cryptographic functions like PGP, allowing users to encrypt data and communications. It generates public/private key pairs with commands like gpg --gen-key, exports keys with gpg --export, and imports keys with gpg --import. Users can then encrypt or sign files and messages, decrypt encrypted files, and list or delete their keys.

Uploaded by

splamoreaux
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views2 pages

GPG Cheat Sheet: Create A Key

GnuPG (Gnu Privacy Guard) is free software that provides cryptographic functions like PGP, allowing users to encrypt data and communications. It generates public/private key pairs with commands like gpg --gen-key, exports keys with gpg --export, and imports keys with gpg --import. Users can then encrypt or sign files and messages, decrypt encrypted files, and list or delete their keys.

Uploaded by

splamoreaux
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

gpg cheat sheet

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

Import keys and give trust


gpg --import public.key
gpg --import private.key
gpg --edit "User Name"
>trust
(select the 'trust ultimately' option)
>q

List and delete


gpg --delete-secret-key "User Name"
gpg --delete-key "User Name" #corresponding private first
gpg --list-keys
gpg --list-secret-keys

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.

You might also like