OpenPGP (Pretty Good Privacy) defines a standard of how asymmetric cryptography algorithms can be used to encrypt and sign files.

Public/Private key diagram

GnuPG (GNU Privacy Guard) is the most common tool used on Linux for PGP.

Basic concepts

  1. A private-public key pair is generated.
  2. You distribute your public key.
  3. Others use your public key to encrypt information before sending it to you.
  4. You decrypt their message using your private key.

A message encrypted with a public key can only be decrypted by the corresponding private key. A message encrypted with the private key can only be decrypted with the corresponding public key. (Without quantum computing,) The universe would collapse from heat death before any computer could crack 2048-bit RSA encryption using brute force.

The private key must be kept a secret. Anyone possessing your private key can impersonate you.

Asymmetric cryptography guarantees non-repudiation and confidentiality.

http://learn.angstromctf.com/crypto/modern/rsa/

Usage

https://github.com/twlinux/club/wiki/GnuPG


Relevant xkcd (1553)

But seriously, don’t be that guy.