How to GPG

JANUARY 13, 2021

Create a GPG Key

gpg --full-generate-key

List Keys

gpg --list-keys
gpg --list-secret-keys --keyid-format LONG

Encrypt a File

gpg --output file.gpg --encrypt --recipient file.txt

Decrypt a File

gpg --output file.txt --decrypt file.gpg

Exporting a Public Key


In binary format (inconvenient to be public on the web or sent via email).

gpg --output nono.gpg --export

In plain-text format.

gpg --armor --export

In plain-text format, saved to a file.

gpg --armor --output nonos-key.gpg --export --recipient
gpg --armor --export --recipient > nonos-key.gpg