0

Should I really keep my private gpg key secret if it's protected by a passphrase? What if an adversary stole it? And if it didn't have a passphrase, would it be game over for me?

Update:

What to do if my private key is stolen?

Since it's easy to crack a passphrase, does it make any difference if it has or not a passphrase if and only if private key is stolen?

3

Looks like there's three questions here:

1) You should keep your private GPG key secret despite its passphrase. Your passphrase is a lot easier to crack than the private GPG key, so even having the passphrase-encrypted private key makes it potentially easier for an adversary.
What the passphrase does is apply a layer of symmetric encryption to the keyfile, so the local computer needs that passphrase to open it.

2) If an adversary stole your passphrase-encrypted keyfile, they can try to brute force the passphrase (which is far simpler than brute forcing a 2048 or 4096-bit RSA key, even with a super-complex password); or attempt a password re-use attack (check known dumps for your previous passwords). A strong, unique passphrase could make these attacks unfeasible.

3) If you didn't have a passphrase and that private key file was copied from you, that key would be fully compromised and someone could decrypt your previous GPG-encrypted communications (provided they had access to the encrypted copy), et cetera depending what the key was used for. With a strong and unique passphrase, you have a second line of defense that could potentially stop such a compromise in its tracks.

In conclusion, it's always a best practice to secure your private keys with a strong, unique passphrase. Any passphrase makes it a lot harder to compromise the private key, and one that is strong and unique might be implausible for an adversary to ever crack.

  • so what's the conclusion from 2)? since a passphrase easily crackable, is it almost the same as not having it if my private is stolen? even if I had a passphrase and my private key is stolen, does it mean that it's game over? – Meji Oct 23 '16 at 17:49
  • also, I've updated my question. – Meji Oct 23 '16 at 17:49
  • @Meji I've updated my answer to make this more clear. If you have a passphrase, it is much harder to steal your private key. If your passphrase is strong and unique, it may be near impossible to brute force and thus having the passphrase-protected file compromised would not result in a compromise of your private key. – Herringbone Cat Oct 23 '16 at 17:53
  • Thanks. My understanding is that I can easily change my current passphrase and that won't affected the file I've already encrypted files and the copies of my private key I've already made, correct? – Meji Oct 23 '16 at 18:04
  • Thanks. My understanding is that I can easily change my current passphrase and that won't affected the files I've already encrypted and the copies of my private key I've already made, correct? – Meji Oct 23 '16 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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