OK, so as I understand it, the key revocation mechanism is used to revoke a signing key in your web of trust: so you say to other GPG users that your previously-used identity has been compromised, and you wish to establish a new identity that is still you (still maintains the same level of trust); ignore the old key, that's "not me" anymore. Therefore, it is not possible to encrypt a message to the "old" me, nor is it possible to consider the "old" me trusted anymore for new messages.

However, it is possible for the "old" secret key to decrypt old messages. For example: read just under "Generating a revocation certificate".

Is there a method with GPG in which something similar can be done to revoke an encryption key? Say that you have a laptop which gets stolen with both ones' keys and some encrypted files (financial data, say) and you wish to remove the laptop's ability to decrypt those files. Clearly, if the laptop never connects to a keyserver, it would never get a revocation, but is there a method by which one can create a revocation of the encryption key such that, should that laptop contact a keyserver and get the revocation message, the files are no longer decryptable?

(and yes, my secret key is password protected by a long, hard-to-brute-force password, but still, I was curious if there were a more-sure way to kill the decryptability of a key).

  • 2
    Your question is not exactly clear. If you are asking what I think you are asking. You cannot remove the ability for a key to decrypt something it encrypted. Revocation is simply about a web of trust, if a certificate is revoked, then its no longer trusted. It doesn't become invalid and can still be used to decrypt messages it encrypted.
    – Ramhound
    Jun 16, 2014 at 18:27
  • Yeah, that's exactly what I was asking. So, then, if you have the secret key of a keypair and a file encrypted with the public key of the keypair on the same machine, then there's no way to prevent that machine from being able to decrypt that file without removing the secret key from gpg on that machine, e.g. through ssh.
    – Matt
    Jun 16, 2014 at 18:35
  • 2
    No, its not possible to prevent a certificate from decrypting content it already decrypted. If you revoke a certificate then you should decrypt the data and encrpt it again. This is what Bitlocker and Device Encryption in Windows would do in a situation you describe. Yes, I know Bitlocker isn't GPG/PGP encryption but device encryption allows you to backup your key. If that key is leaked then your only secure solution would be to decrypt all data and encrypt it with a new key.
    – Ramhound
    Jun 16, 2014 at 18:37
  • May I recommend changing the title to Is there any way to prevent a revoked encryption key from being used?
    – IQAndreas
    Sep 21, 2014 at 2:12

3 Answers 3


No it is not possible to stop a GPG key from decrypting content that was encrypted with it simply because it contains the key needed to decrypt the data. You cannot tell a file to not be decrypted.

The GPG web of trust enables you to tell others to not trust your key anymore. They won't encrypt new content with your key anymore (that's the idea). However, old content can still be decrypted.

If you want to keep your data secure, decrypt it with your old key and reencrypt it with a new key.

  • This makes sense. I would of course reencrypt data that I have access to, but if my laptop got nicked, I would be out of luck to either remove the GPG key from the machine or to reencrypt the files. Yet another good argument to use a solid password for private keys.
    – Matt
    Jun 16, 2014 at 23:10
  • 1
    @Matt or an argument for storing the key on a flash drive or similar :) Jul 24, 2017 at 12:03
  • 1
    Actually it would be even better to store the key on a smartcard or USB HSM device. If you lose the flash drive, the key can still be copied off the drive and brute forced. It's not possible to retrieve the key from a smartcard and most implementations lock the smartcard after 3 or 10 unlock attempts.
    – mtak
    Jul 24, 2017 at 12:25

Revocations in OpenPGP

A revocation is a message signed by your own key that is published to the key servers (or distributed otherwise) announcing that some other OpenPGP message is not valid any more, possibly enriched by a reason and date.

Revocations can be issued for eg. keys or certifications (signatures) of other keys. The revocation will prevent others (that have received the revocation) to further use/trust the key.

Revocations and Decryption

Consider the results of such a message in case somebody has both access to your secret key (possible including the used passphrase) and the message to be decrypted. If a revocation preventing the attacker from decrypting the message would exist, he just would not update the key or ignore the message (remember that OpenPGP is a public protocol, you can always create your own implementation or modify an existing one).

Preventing the decryption is not possible, if the attacker has the secret key for decrypting it.


Decryption of PGP messages is done using the so-called private key. It has its name, because it should be private. Therefore you can protect (actually "encrypt") it with a passphrase (that should also be very private to you). Technically if you have the (unencrypted) private key, nothing can prevent you from decrypting messages encrypted with the corresponding public key.

There also exists a "key revocation" mechanism, a special kind of signature on your public key that tells others (any yourself, too) not to use that public key to encrypt messages to you any more. However nothing prevents using the private key to decrypt messages after such revocation signature.

For the stolen laptop case, it's important to have a backup of your private key, or at the very least to have a backup of a revocation certificate made in advance (if the private key is unavailable any more). So you can at least tell the public not to use that public key any more by uploading that revocation certificate to a keyserver.

But as said: It's just a policy, not hard restriction. The RSA algorithm is just mathematics, and it will continue to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.