4

I am a novice user of OpenPGP. I use GPGTools for OS X. I have several connected questions, but difficult to find direct answers on the Internet.

  1. When I create a key-pair, the password I enter is a passphrase that encrypts my private key only on my machine, and it is NOT a passphrase that is needed to decrypt encoded messages, correct?
  2. If the above statement is correct, does it mean that the password I use to decrypt a message is actually just the passphrase that unlocks my private key: therefore if I loose my private key (let us say, drop my computer in the Pacific), so even if I reveal my passcode, nothing can be done since it is used only to unlock a specific file?
  3. The brute-force technique breaks an OpenPGP encrypted text only via the private key (which is usually very long); consequently the brute-force technique used to break the private PGP key is done via the passphrase (known to the owner of the key) when the key was created for 'storage purpose'. Is that correct?

Sorry for the numerous questions, but I believe these represents one question for which answering I couldn't find anywhere.

Thank you.

6

If you have an encrypted private key, this means a private key was generated from random numbers and then symmetrically encrypted using your passphrase. With other words, the private key is not generated by the passphrase, but only protected through it.

When I create a key-pair, the password I enter is a passphrase that encrypts my private key only on my machine, and it is NOT a passphrase that is needed to decrypt encoded messages, correct?

The private key is encrypted using your passphrase, that's right. But this also means if you want to decrypt a message (which requires your unencrypted private key), you have to enter your passphrase to decrypt it.

If the above statement is correct, does it mean that the password I use to decrypt a message is actually just the passphrase that unlocks my private key: therefore if I loose my private key (let us say, drop my computer in the Pacific), so even if I reveal my passcode, nothing can be done since it is used only to unlock a specific file?

Then again, of course the passphrase alone is not sufficient to decrypt the message, so your "dropped into the sea" metaphor works out. The passphrase is of no use without the encrypted private key.

The brute-force technique breaks an OpenPGP encrypted text only via the private key (which is usually very long); consequently the brute-force technique used to break the private PGP key is done via the passphrase (known to the owner of the key) when the key was created for 'storage purpose'. Is that correct?

Of course, the encrypted private key might be revealed by brute-forcing the passphrase (but with reasonable/default settings of GnuPG and an adequate complex passphrase, this is no practical attack surface as long as the algorithms used are not proved insecure). But at the same time, an attacker might of course also try to guess/brute force the (unencrypted) copy of your private key. Given you had vast and sufficient computational resources, you could brute force any of them; brute-forcing the passphrase is likely less expensive but require knowledge of the encrypted private key, while brute-forcing the key requires nothing but an encrypted message.

  • I think that many novice users are not aware that the password they use/type/remember is actually the password that locks the key, but NOT the PGP key itself (the private key). With a such awareness they should know better all risks with the private keys. – stackex-change Jun 5 '17 at 11:08
  • A further question: If I store two identical private PGP keys on two USB sticks, but I change passphrase to one of them, I can still unlock encrypted file with both keys, but with two different passwords? – stackex-change Jun 5 '17 at 11:15
  • The private key is still exactly the same one, but encrypted by two different passphrases. So yes, no matter what passphrase the key is protected by, you can still decrypt the same files as the key stays the same. – Jens Erat Jun 5 '17 at 16:04

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.