Skip to content
Alick Zhao edited this page Aug 30, 2012 · 1 revision

% GPG % Alick Zhao % 2012/08/30

GPG

Gen a new key pair

Create:

gpg2 --gen-key

Upload to a key server:

gpg2 --keyserver pgp.mit.edu --send-key KEYID

Generate revoke certificate:

gpg2 --output revocation-certificate.asc --gen-revoke KEYID

NOTE: keep the certificate in a safe place, because anyone who has it can revoke the key using it.

Edit keys

Refer to the blog post for information on how to change the expiration date of GPG keys.

Revoke a key

Import the safely kept revocation certificate:

gpg2 --import revocation-certificate.asc

Tell others your key has been revoked:

gpg2 --keyserver pgp.mit.edu --send-key KEYID

List existing keys

List public keys:

gpg2 -k

List secret keys:

gpg2 -K

Encrypt/Decrypt

Encrypt:

gpg2 -r RECEIVER_ID -e file

Decrypt:

gpg2 --output orig_file -d file.gpg

Key signing

The wiki page give some useful information about key signing.

As stated in the page, "If I sign your key, then I'm saying that I believe your key has accurate information describing your identity."

List of key servers

References

  1. Revocation notes
  2. GPH
Clone this wiki locally