GPG

description: Safe data with encryption.

lang: ENG

List keys

  gpg --list-keys
  gpg --list-secret-keys

Import a key

  gpg --import <name>.key
  gpg --keyserver <server> --search-keys <mail>

Export a key

  gpg --armor --export [key_id]

Check footprint

  gpg --fingerprint <mail>

Sign with a key

  gpg --sign-key <mail>

Refresh a key server

  gpg --keyserver pgp.mit.edu --refresh-keys

Share your public key

  gpg --output <path/name>.key --armor --export <mail>
  gpg --send-keys --keyserver <server> <fingerprint>

Generate a revocation certificat

  gpg --output <path/name>.crt --gen-revoke <mail>
  chmod 600 <path/certificat>

Revoke your key

  gpg --import <certificat>
  gpg --keyserver pgp.mit.edu --search-keys key-ID
  gpg --keyserver pgp.mit.edu --send-keys key-ID

Encrypt a file

  gpg --encrypt --sign --armor -r <mail> <file>

Decrypt a file

  gpg --decrypt <file> > <output>

Encrypt a file with symmetric encryption

  gpg -c --cipher-algo <algo> -o <file>