-
Notifications
You must be signed in to change notification settings - Fork 8
GnuPG (gpg) cheatsheet
Viktor Ageyev edited this page Mar 31, 2019
·
10 revisions
GnuPG is a free and open sourced implementations of OpenPGP standard.
If you have a UNIX system (macOS or Linux) you probably already have gpg (or gpg2) command available in command line (console).
For Windows see: or/and Practical Introduction to GNU Privacy Guard in Windows by Brendan Kidwell
gpg --version
gpg --gen-key
by default keys are stored in folder (directory): ${HOME}/.gnupg/
gpg --list-public-keys
gpg --list-secret-keys
gpg -ao publickey.asc --export user@host.com
options:
user@host.com : your email address (replace with actual email used in your key certificate)
--armor or -a : Create ASCII armored output. The default is to create the binary
--output or -o + file name (here: 'publickey.asc') : Write output to file. To write to stdout use - as the filename.
gpg --import publickey.asc
gpg --clear-sign somefile.txt
gpg will create a new file (like 'somefile.txt.asc') where signed text will be placed.
gpg --verify somefile.txt.asc