Assuming your PGP private key is protected with a password, and it "escapes", but the password does not, how worried should you be?

Obviously in the real world, you would immediately revoke the key and generate a new one. But on a theoretical level, does having a private key, but not its associated password, get you any closer to decrypting messages encrypted with it?

  • 2
    Depends on the password. If it's an epic pass poem it might resist forever, if it's Password1 it'll be broken instantly. Commented Jun 24, 2013 at 13:49
  • 1
    Revoking isn't enough. Anybody who learns the key can decrypt all past messages sent to you. So you need to get a time-machine and revoke the key before the first use, or use a forward secret scheme instead of PBP. Commented Jun 24, 2013 at 13:51
  • @CodesInChaos - PBP... I see what you did there. Commented Jun 24, 2013 at 20:00

2 Answers 2


The point of a password is to prevent the key from immediately being compromised once it leaks. It should be considered partially compromised though as the security is reduced from the keysize down to the password complexity. If you have a high complexity password, it may still be an acceptable level of security for your needs, but generally it is advisable to work on replacing the key since security is reduced.

The urgency of the transition depends on your password though. If your password was "password" then you should immediately stop using it and transition, but if it was something reasonably complex, then you should be able to keep using it for a bit and distribute your new public key to your contacts using it. Don't use it for anything you need long term privacy on, but it should be fine for communicating out your new credentials with confidence that you still control the private key for the reasonable future.


It's not that hard to brute force the password once you have the key, unless the password is very long.

So having the enrypted key does get the attacker closer to getting the real key. However, make your password 20 characters long (and don't use dictionary words), and you ought to be fine as such long passwords will take a long time to bruteforce.

  • 1
    +1 also: whilst it could take a long time; it depends on how determined the attacker is and how much hardware resource they have available, password length is not a guarantee here imo.
    – Oneiroi
    Commented Jun 24, 2013 at 12:29
  • @Oneiroi of course, I never said it was. But increasing password length by even one character makes it an order of magnitude harder. At one point, it's beyond any individual (though various institutions with supercomputers and whatnot may be up to the task) Commented Jun 24, 2013 at 12:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .