PGP and GPG keys

last edited Sat, 10 Feb 2024 15:04:05 GMT
backlinks: null


The use and understanding of Pretty Good Privacy as an encryption standard is misunderstood, even among professionals and whistleblowers. Phil Zimmerman developed PGP encryption software in 1991. It functions as a public encryption system where two individuals need each others' respective public key to communicate. Open PGP refers to this standard, gpg -not the non-free software.

You sign with your private key aand encrypt with the recepients public key. The recepient will decrypt with their private key.

GNUpg direct link to this section

GPG is a open source implementation of Open PGP. Cipher CAST5 is used by default.

Create a Keypair direct link to this section

gpg --gen-key

Encrypting Files direct link to this section

gpg --encrypt --recipient receiversname filename.txt

A file with the .asc will be generated. The filename can also be specified after the output.

gpg --armour --output myoutfile --symmetric my_file

Decrypting direct link to this section

This will only display the message in the command line and not to disk:

gpg --decrypt filename.txt.gpg

Exporting Public Keys direct link to this section

gpg --export --armor youremail@example.com > publickey.asc

View Keyring direct link to this section

gpg --list-keys

For secret keys:

gpg --list-secret-keys

Import Public Key direct link to this section

This applies to public keys that may be sharded or downloaded through keyservers.

gpg --import <filename>

Import a Secret Key direct link to this section

Use at your own risk

gpg --export --armor youremail@example.com > publickey.asc

Open Manual direct link to this section

gpg --help

PGP direct link to this section

Original software is developed by Symantec.

Create a keypair direct link to this section

pgp -kg

References direct link to this section