If you have ever needed to send a file that only one specific person should be able to open, or to prove that a document came from you and reached the reader unchanged, you have run into the two problems PGP was built to solve. It has been around since 1991, and it is still what journalists, security engineers, lawyers, investigators, and privacy-minded people reach for when a message has to stay private. This guide covers what PGP is and how it works, without the jargon, then walks through setting it up on macOS, Windows, and Linux, with the exact tools and commands for each.
What PGP is
PGP (Pretty Good Privacy) is an encryption program that provides cryptographic privacy and authentication for data. In practice, people use it to sign, encrypt, and decrypt emails, files, folders, and even whole disk partitions.
Phil Zimmermann created PGP in 1991 and released it as free software, partly in response to growing surveillance and proposed limits on encryption. It spread quickly, and its design became the basis for an open standard called OpenPGP, which most modern tools now implement.
PGP does two distinct jobs. Keeping them separate makes everything else easier to follow:
- Confidentiality (encryption). It scrambles a message so only the intended recipient can read it. Intercepted along the way, it is useless without the recipient’s private key.
- Authenticity and integrity (digital signatures). It lets you prove a message came from you and was not altered in transit.
You can use either function alone or both at once. A signed but unencrypted message is readable by anyone, yet verifiably from you. An encrypted but unsigned message is private, but does not prove who sent it. Most secure workflows use both.
PGP vs. GPG vs. OpenPGP: clearing up the names
People use these three terms as if they mean the same thing. They do not, and the distinction is worth thirty seconds.
- PGP is the original program Phil Zimmermann wrote in 1991. It later became a commercial product, now owned by Broadcom (formerly Symantec).
- OpenPGP is the open, published standard that defines the message and key formats. Its current version is RFC 9580, released in July 2024, which modernized the cryptography and replaced the older RFC 4880. OpenPGP is a format, not a program: anything that follows it can work with anything else that does.
- GPG (GNU Privacy Guard, or GnuPG) is the free, open-source implementation almost everyone actually uses. It runs on every major operating system, is actively maintained, and is the tool this guide uses throughout.
So OpenPGP is the standard, GPG is the free tool that implements it, and PGP is the original program the whole thing is named after. When someone says "send me your PGP key," they almost always mean a key made with GPG.
One nuance for the technically curious: the OpenPGP world split in late 2023. GnuPG’s maintainer forked the standard into an alternative called LibrePGP, and recent GnuPG releases follow that path rather than RFC 9580. The two remain broadly interoperable for everyday use, and GPG is still the right choice for almost everyone, but it explains why you will see both names online.
How PGP works, in plain English
PGP’s security rests on public-key cryptography. Instead of one shared password, every user has a key pair: a public key and a private key that are mathematically linked.
- Your public key is meant to be shared freely. Anyone can have it. Picture an open padlock you hand out to people.
- Your private key stays secret and never leaves your control. It is the only thing that opens that padlock, and a passphrase protects it.
Encrypting a message
When someone sends you something private, they encrypt it with your public key. Once that happens, the only key on earth that can decrypt it is your private key. Because you never shared the private key, the message stays secure even if the sender’s computer, the network, and your mail server are all compromised.
Under the hood, PGP uses a hybrid approach for speed. Public-key math is slow on large data, so PGP generates a random one-time "session key," encrypts the actual message with fast symmetric encryption using that key, then encrypts only the small session key with your public key. Everything travels together. You never have to think about it, and it is why PGP handles large files quickly.
Signing a message
Signatures run in reverse. To sign, PGP takes a compact fingerprint (a hash) of your message and encrypts that fingerprint with your private key. Anyone holding your public key can then verify it. If the signature checks out, they know two things: the message came from you, and not one character has changed since you signed it.
Key fingerprints
Every public key has a unique fingerprint, a short string that stands in for the key’s identity and that a person can check by eye. Before trusting that a public key belongs to who you think it does, you verify its fingerprint over a separate, trusted channel: a phone call, an in-person meeting, a printed card. That step is what stops an attacker from slipping you a fake key, and skipping it is the most common way PGP gets used insecurely. It is also why, when we exchange keys with a client, we confirm the fingerprint on a phone call before anything sensitive moves.
Who uses PGP, and why
PGP is not just for spies and cryptographers. It solves an ordinary problem, proving identity and protecting content, and its users cut across professions.
- Journalists and their sources. Reporters use PGP to receive sensitive tips and protect whistleblowers. It played a documented role in the secure communications between Edward Snowden and the journalists he first contacted, and it underpins the secure submission systems major newsrooms run.
- Activists and dissidents. Where communication is monitored, PGP lets organizers coordinate without handing the content to whoever is watching.
- Software developers and engineers. Developers sign their releases and code commits so users can confirm that what they downloaded is authentic and untampered. Nearly every major Linux distribution leans on OpenPGP signatures to verify that packages are genuine.
- Businesses and compliance teams. Companies exchange contracts, financial records, and other confidential documents over PGP, and use it to help meet data-protection obligations.
- Lawyers, investigators, and other confidential professions. Anyone bound by a duty of confidentiality, legal counsel, private investigators, medical practitioners, can use PGP to keep privileged files and client communications away from interception. It is part of our own toolkit for exactly that reason.
- Privacy-conscious individuals. Plenty of people simply want their private correspondence to stay private, and PGP delivers that without asking them to trust an email provider.
In every case the need is the same: control who can read something, without trusting the systems it passes through.
Before you start: key concepts
Whatever operating system you use, a few things stay constant. Getting these right matters more than any single command.
- Choose a strong passphrase. A passphrase protects your private key. If someone gets the key file but not the passphrase, they still cannot use it. Make it long and unique.
- Back up your private key, carefully. Lose your private key and every message encrypted to you becomes permanently unreadable. Back it up to secure, offline storage, and never leave it anywhere others can reach.
- Never share your private key. Only the public key is meant to leave your device. If you ever send the private key by mistake, treat the pair as compromised and generate a new one.
- Prefer modern key types. When you generate a key, choose modern elliptic-curve cryptography (Curve 25519 / Ed25519) for strong security and small, fast keys, or RSA 3072/4096 if you need to stay compatible with older systems.
With that in hand, here are the platform walkthroughs.
How to set up and use PGP on macOS
macOS gives you two solid paths: a graphical app suite, or the command line. Most people should start with GPG Suite.
Option A: GPG Suite (recommended for most users)
GPG Suite is a free package from GPGTools that bundles what you need behind a Mac-native interface.
- Download and install. Get GPG Suite from gpgtools.org and run the installer. It sets up GPG Keychain (a visual key manager), the GPG engine itself, and integration into the macOS Services menu.
- Create your key pair. Open GPG Keychain, click New, enter your name and email, set a strong passphrase, and generate the key. The app handles the technical choices.
- Share your public key. Select your key and choose Export to save a
.ascfile to send to others, or Upload Public Key to publish it to a keyserver so contacts can find it. - Import others’ keys. When someone sends you their public key, double-click it or drag it into GPG Keychain. Verify the fingerprint before you trust it.
- Encrypt and decrypt. Right-click a file in Finder and use the Services menu to encrypt it to a recipient or decrypt one you received. The same menu handles text.
On email: GPG Suite includes GPG Mail, a plugin for Apple Mail. The core encryption tools are free, but the Apple Mail plugin asks for a modest one-time support payment after a trial. If you only need file encryption, you can skip it.
Option B: command line via Homebrew
If you are comfortable in Terminal, skip the GUI:
brew install gnupg
After that, every command in the cross-platform reference works the same on your Mac. This is usually the fastest route for developers already using Homebrew.
How to set up and use PGP on Windows
The standard tool on Windows is Gpg4win, a free suite maintained for close to two decades.
- Download and install. Get Gpg4win from gpg4win.org. During installation, keep Kleopatra selected: it is the graphical key manager you will spend most of your time in. The suite also includes GpgOL (an Outlook plugin) and GpgEX (right-click encryption in File Explorer).
- Create your key pair. Open Kleopatra, go to File then New Key Pair, choose a personal OpenPGP key, enter your name and email, set a strong passphrase, and finish.
- Export and share your public key. Right-click your key and choose Export to save a
.ascfile, or Publish on Server to make it findable. - Import others’ keys. Use File then Import (or double-click a received
.ascfile). Certify a key only after checking its fingerprint over a trusted channel. - Encrypt and decrypt files. In File Explorer, right-click a file and use the GpgEX menu to Sign and encrypt, then pick your recipient. To decrypt, right-click an encrypted file and choose Decrypt and verify. You can do all of this inside Kleopatra too, using its Sign/Encrypt and Decrypt/Verify buttons.
Gpg4win also ships the gpg command-line tool, so if you prefer the terminal, the reference commands work in PowerShell or Command Prompt.
How to set up and use PGP on Linux
Linux has the easiest starting point of the three: GnuPG is often already installed, and it is the reference implementation the rest of the ecosystem is built on.
Install GnuPG (if needed)
# Debian / Ubuntu
sudo apt install gnupg
# Fedora / RHEL
sudo dnf install gnupg2
# Arch
sudo pacman -S gnupg
Generate your key pair
Run the interactive generator and follow the prompts. Choose ECC (Curve 25519) when offered, or RSA 4096 for broad compatibility, then set a strong passphrase:
gpg --full-generate-key
Add a graphical manager (optional)
If you would rather not live in the terminal, install a front-end:
- Seahorse ("Passwords and Keys") on GNOME
- Kleopatra on KDE Plasma
Both let you create, import, export, and manage keys visually while GnuPG does the work underneath. Everything else, exporting, importing, encrypting, signing, uses the standard gpg commands below. Learn them once and they carry across all three systems.
Essential GPG commands (cross-platform reference)
These commands work identically on macOS, Windows, and Linux wherever the gpg tool is installed. Keep this section handy.
| Task | Command |
|---|---|
| Generate a new key pair | gpg --full-generate-key |
| List your public keys | gpg --list-keys |
| List your private keys | gpg --list-secret-keys |
| Show a key’s fingerprint | gpg --fingerprint you@example.com |
| Export your public key | gpg --armor --export you@example.com > publickey.asc |
| Back up your private key | gpg --armor --export-secret-keys you@example.com > privatekey.asc |
| Import someone’s public key | gpg --import theirkey.asc |
| Encrypt a file for a recipient | gpg --armor --encrypt --recipient them@example.com file.txt |
| Encrypt and sign a file | gpg --armor --sign --encrypt --recipient them@example.com file.txt |
| Decrypt a received file | gpg --decrypt file.txt.asc > file.txt |
| Create a detached signature | gpg --armor --detach-sign file.txt |
| Verify a signature | gpg --verify file.txt.asc file.txt |
| Publish your key to a keyserver | gpg --keyserver keys.openpgp.org --send-keys KEYID |
| Fetch a key from a keyserver | gpg --keyserver keys.openpgp.org --recv-keys KEYID |
| Generate a revocation certificate | gpg --output revoke.asc --gen-revoke you@example.com |
The --armor flag produces the familiar text-based .asc output (the "BEGIN PGP MESSAGE" block) that is safe to paste into email. Drop it if you want compact binary output instead.
PGP best practices
Using PGP correctly matters as much as using it at all. A few habits separate real security from a false sense of it.
- Verify fingerprints out of band. Never trust a public key just because it arrived by email. Confirm its fingerprint through a different channel: a phone call, a printed card, an in-person handoff. This is the step that stops impersonation.
- Set an expiration date on your keys. An expiring key limits the fallout if a key is ever lost or stolen, and it shows you are actively maintaining it. You can extend the date any time before it lapses.
- Create a revocation certificate now, and store it safely. If your private key is ever lost or compromised, a revocation certificate lets you signal publicly that the key should no longer be trusted. Generate it while you still have access, and keep it somewhere separate and secure.
- Protect and back up your private key. Keep the backup offline, an encrypted USB drive or a hardware security key, never in a shared or cloud-synced folder.
- Keep your software updated. Cryptographic tools get security fixes. Running a current version of GPG, GPG Suite, or Gpg4win keeps you clear of known issues.
- Use modern algorithms. Favor Ed25519 / Curve 25519 keys, or RSA 3072/4096, over older or weaker options.
Limitations and common mistakes
PGP is strong, but it is not magic, and being honest about its weak spots helps you use it well.
- It does not hide metadata. PGP encrypts the content of a message, not the fact that you and someone communicated, when, or an email’s subject line. If who-talks-to-whom has to stay secret, PGP alone will not do it.
- It has no forward secrecy. If your private key is ever compromised, every past message encrypted to it can be decrypted. Some modern messaging protocols avoid this; PGP’s long-lived keys do not.
- It is hard to use, and that is where most failures come from. PGP has a deserved reputation for being fiddly. Nearly all real-world breakage traces back to user error, trusting an unverified key, losing a private key, misconfiguring a mail client, rather than broken cryptography.
- Lose your key and the data is gone. There is no "forgot password" here. Lose your private key and passphrase with no backup, and the encrypted messages are unrecoverable. Back up before you depend on it.
None of this makes PGP a bad choice. It means PGP works best next to sensible habits and, where the stakes are high, other tools. For situations where the safest move is not to use a form or ordinary email at all, we keep PGP, Session and Signal channels open.
The short version
A public key you share, a private key you guard. Encrypt with the recipient’s public key so only they can read it; sign with your private key so anyone can prove it came from you. Verify fingerprints on a separate channel, back up the private key offline, and the rest is detail.
Frequently asked questions
Is PGP still secure in 2026?
Yes. With modern key types and current software, PGP’s encryption remains strong. The 2024 update to the OpenPGP standard (RFC 9580) modernized its algorithms. Most real-world weaknesses come from user mistakes, not the cryptography.
What is the difference between PGP and GPG?
PGP is the original 1991 program, now a commercial product. GPG (GnuPG) is the free, open-source implementation of the same OpenPGP standard, and it is what most people use today. They interoperate: a key made in GPG works with any OpenPGP-compliant tool.
Is PGP free to use?
The tools almost everyone uses, GnuPG, GPG Suite on macOS, and Gpg4win on Windows, are free and open source. A few optional add-ons, such as GPG Suite’s Apple Mail plugin, ask for a small support fee, but core encryption costs nothing.
Can I use PGP for email?
Yes. Apple Mail (through GPG Suite), Outlook (through Gpg4win’s GpgOL plugin), and Mozilla Thunderbird (which has OpenPGP support built in) can all send and receive encrypted email. You can also encrypt text by hand and paste it into any client.
What happens if I lose my private key?
Any message encrypted to that key becomes permanently unreadable, and you will need to generate a new key pair. That is why backing up your private key to secure, offline storage, and creating a revocation certificate, matters before you rely on PGP.
Do both people need PGP to exchange encrypted messages?
Yes. To send someone an encrypted message you need their public key, and they need their private key to decrypt it, so both sides have to be set up. Signatures are different: anyone with your public key can verify one.
PGP has lasted because it hands you direct, checkable control over who can read your information and proof of who sent it, without asking you to trust any company or network in between. The core idea clicks quickly, and setup on macOS, Windows, or Linux takes only a few minutes. Start small: generate a key pair, back it up, swap public keys with one trusted contact, and send a single encrypted message end to end. Do it once and the rest stops feeling technical. If that trusted contact is us, our public keys and fingerprints are on the secure contact page.

