Creating Your PGP Key Pair
Last updated: May 2026
Your key pair consists of a public key (shared with others) and a private key (kept secret). This guide covers generating a key pair using GnuPG.
Generating the Key
gpg --full-generate-key
Follow the prompts:
- Choose RSA and RSA (default).
- Key size: 4096 bits.
- Expiration: 1-2 years (renewable).
- Provide your name and email (can be a pseudonym).
- Set a strong passphrase (very important!).
Exporting Your Public Key
gpg --export --armor your-email@example.com > public-key.asc
Share this public key with others so they can encrypt messages to you.
Remember: Your private key must never leave your secure system. Back it up encrypted.