Merge pull request #120 from jmbataller/gpg-cheat

Cheatsheet for gpg
This commit is contained in:
Denis Isidoro 2019-10-14 13:36:48 -03:00 committed by GitHub
commit 6036e3c86b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

39
cheats/gpg.cheat Normal file
View file

@ -0,0 +1,39 @@
% gpg
# gpg version
gpg --version
# gpg generate key
gpg --gen-key
# list keys
gpg --list-keys
# distribute public key to key server
gpg --keyserver <key_server> --send-keys <public_key>
# export public key
gpg --output <filename_gpg> --export <key_name>
# import public key
gpg --import <filename_gpg>
# encrypt document
gpg --output <output_filename_gpg> --encrypt --recipient <public_key> <input_filename>
# decrypt document
gpg --output <filename> --decrypt <filename_gpg>
# make a signature
gpg --output <filename_sig> --sign <filename>
# verify signature
gpg --output <filename> <filename> --decrypt <filename_sig>
# clearsign documents
gpg --clearsign <filename>
# detach signature
gpg --output <filename_sig> --detach-sig <filename>