knowledge/technology/cryptography/GPG.md
2024-02-06 08:12:49 +01:00

999 B

aliases website obj
PGP
GnuPG
OpenPGP
https://www.gnupg.org/ application

GPG

gpg is the OpenPGP part of the GNU Privacy Guard (GnuPG). It is a tool to provide digital encryption and signing services using the OpenPGP standard. gpg features complete key management and all the bells and whistles you would expect from a full OpenPGP implementation.

Commands

Sign:

gpg --sign
gpg -s
gpg --clear-sign # Sign with clear text

Encrypt:

gpg --encrypt
gpg -e

Symmetric Encryption:

gpg --symmetric
gpg -c

Decrypt:

gpg --decrypt
gpg -d

Verify:

gpg --verify

Keys

List keys:

gpg --list-keys
gpg -k # List public keys
gpg -K # List private keys

Generate key:

gpg --generate-key

Import & export keys:

gpg --export
gpg --import

Key selection:

 -r, --recipient KEY # Encrypt for key
 -u, --local-user KEY # Use this key