Why You Need Your Private Key to Decrypt a PGP Message

An outlined public key beside a solid private key unlocking a padlock, illustrating why decryption needs the private key

You need your private key to decrypt a PGP message because the ciphertext is locked to the matching public key. The public key can only seal a message; it cannot open one. Your passphrase then unlocks the private key so the tool can use it. This article explains the split, why the wrong key fails, and how to import and store the right material without confusing a passphrase for the key itself.

What is the difference between a public key and a private key?

A PGP key pair is two related keys that do different jobs. The public key is safe to share. Other people use it to encrypt messages or files to you, and to check signatures you create. You can publish it on a profile, send it by email, or list it on a key server. The private key stays with you. It decrypts messages that were encrypted to your public key, and it creates signatures.

The two keys are mathematically linked, but you cannot derive the private key from the public key in any practical way. That is the whole point of public-key cryptography, which we outline in What Is PGP and How Does It Work?.

In ASCII armor, a public key block starts with -----BEGIN PGP PUBLIC KEY BLOCK-----. A private (secret) key block starts with -----BEGIN PGP PRIVATE KEY BLOCK-----. If you paste the public block into a decrypt form, the tool has nothing it can use to unlock ciphertext. If you are unsure which block you have, inspect the public part in the PGP key viewer, or read How to Read a PGP Key.

Most private keys are also protected with a passphrase. That passphrase is not a substitute for the key: you need both the private key file and the passphrase that unlocks it.

Why can't I decrypt a PGP message with a public key?

Encryption is designed so that anyone who has your public key can write a message only you can read. If the public key could also decrypt, anyone who received your public key could read your mail. So OpenPGP seals the session key to the recipient's public key. Only the matching private key can recover that session key and open the message.

This surprises people who are used to a single shared password. In that older model, the same secret both locks and unlocks the data. PGP is not that model. The sender does not need your private key, and you should never send your private key to the sender so they can "help" you decrypt.

The sender's public key also cannot decrypt a message they encrypted to you. Their public key is useful later if the message was signed and you want to verify the signature. Decryption and signature verification are different steps. To open the message, go to the PGP decrypt page, paste your private key, enter the passphrase, and paste the -----BEGIN PGP MESSAGE----- block.

The same rule applies when you encrypt a message yourself. If you encrypt only to someone else's public key, you will not be able to decrypt the result with your key. That behavior is explained in the encrypt and decrypt tutorial.

What happens if I use the wrong private key?

The tool will fail, usually with a message about a missing key or an inability to decrypt. OpenPGP ciphertext lists which key IDs (or fingerprints) it was encrypted to. If your private key is not one of those keys, decryption cannot succeed, even if the passphrase is correct for the key you pasted.

The most common reasons are:

1. The sender encrypted to an older public key you no longer use, or to a key from a different email address.

2. You pasted a public key, a different person's key, or only a subkey that does not include the decryption key.

3. You have several key pairs and imported the signing-only key instead of the one that holds the encryption subkey.

4. The sender copied the wrong public key from a chat history or an old website.

Ask the sender which fingerprint they encrypted to, then compare it with the keys you hold. The key viewer and the fingerprint guide will help you compare values character by character. If they used a key you do not have, they must encrypt again to your current public key. There is no way for this site, or for you, to invent the missing private key.

How do I import the right private key?

On the PGP decrypt page (or the Decrypt tab on the homepage), paste the entire private key block, including the BEGIN and END lines, or use IMPORT PRIVATE KEY to load a .asc or .key file. Then enter the passphrase and the ciphertext.

Before you paste, confirm the block is a PRIVATE KEY BLOCK, not a public key and not a message. Confirm you are on a machine and a browser you trust. After decryption, clear the form and avoid leaving the key in a shared clipboard.

If your key lives in GnuPG, export the secret key as ASCII armor with your usual desktop tool, then import that file here. You do not need to export a secret key if you can decrypt on the desktop already; export only when you intentionally want to use the browser tool. For files rather than text, import the same private key into the file decryption tool.

If you do not have a key pair yet, generate a PGP key first and share only the public key. Backup the private key and the passphrase before you rely on the pair for real messages. A key you cannot restore is a key you will lose mail to.

Is a passphrase the same as a private key?

No. The private key is the cryptographic secret. The passphrase is a password that encrypts that key at rest, so a stolen key file is not immediately usable. When you decrypt a message, the tool needs the key file and the passphrase that opens it.

A correct passphrase on the wrong key will not decrypt the message. A wrong passphrase on the right key will also fail. There is no recovery if you forget the passphrase: the site never sees it and cannot reset it.

Do not invent a "backup passphrase" by sending it to the other person. If you want someone else to read a message, they must encrypt to a public key they hold, or you must use a channel you both already trust. If a file was encrypted symmetrically, the shared password is the secret, and no private key is involved. That is a different mode, described in the file decryption guide.

How should I store a private key and passphrase?

Store the private key as if it were cash and credentials in one file. Keep an encrypted backup in a place you control. Do not email the private key to yourself in plaintext, post it in a ticket, or drop it into a shared drive that others can list.

The passphrase should be long, unique, and not reused from email or a website login. A password manager is a reasonable place to store that passphrase if the manager itself is locked and backed up. If you want a password manager that can store a long unique passphrase, Proton Pass Affiliate link has a free plan.

Hardware tokens and desktop keyrings are stronger still for keys you use often, because the private key can stay off the clipboard. Whatever store you pick, test a backup before you need it: decrypt a sample message from the backup copy, then put the backup away.

If a private key leaks, inform people who encrypt to that public key, stop using the key, and generate a new pair. Revocation helps others avoid the old key, but it cannot unread messages an attacker already decrypted. These failures are also listed in Common PGP Mistakes.

Frequently Asked Questions

Can I decrypt a PGP message with a public key?

No. A public key is used to encrypt a message to you, or to verify a signature. Decryption requires the matching private key and, in most cases, the passphrase that protects that key.

Why does decryption say the key is missing?

The ciphertext was not encrypted to the private key you imported. The sender may have used a different or older public key. Compare fingerprints with the sender, then import the private key that belongs to the public key they actually used.

What if I lost my private key or passphrase?

You cannot decrypt messages that were encrypted to that key. There is no reset. If you still have another key, or a backup of the same key, use that. Otherwise the sender must encrypt again to a new public key you generate.

Should I send my private key to the person who emailed me?

No. Never send a private key to the sender, to a support desk, or to a website that asks for it in order to "help" you read a message. Share only your public key. If they encrypted to the wrong key, they should encrypt again to the public key you actually use.

Decrypt with your private key

Open the PGP decrypt page, import the private key that matches the public key the sender used, and paste the message block.

Open PGP Decrypt Generate a key