Open Bug 1662272 Opened 6 years ago Updated 1 year ago

OpenPGP users in Thunderbird not aware of the recommendation to set up a Primary Password

Categories

(MailNews Core :: Security: OpenPGP, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: KaiE, Unassigned)

References

Details

As part of our easy OpenPGP implementation in Thunderbird 78, we are making the password protection of secret keys optional.

At the time we import existing keys into Thunderbird, we unlock them.
Future use of the secret keys works without having to enter an unlocking password - unless the user sets up a master password.

This applies to both the manual import of keys, or to keys that are imported as part of a migration from Enigmail.

The concern is:
Users might not be aware of having their keys stored without protection on disk.

The request:
If the user hasn't setup a master password, remind the user at least once or twice to set one, together with some explanations.

Technical details for those who are wondering:
On disk, the secret keys are stored encrypted. They are stored with an automatically generated passwords (all keys with the same one).
The automatic password is stored encrypted, too.
However, file key4.db in the Thunderbird directory contains the unprotected key that can be used to decrypt the above.
Only by setting a master password will the information in key4.db be protected, and the use of the OpenPGP secret keys will then require to unlock once by entering the master password (to unlock key4.db, which has the information that can then be used to unlock the automatic password and the keys.)

I think the implementation of this feature is not a good idea. Encryption is a very sensitive issue. I don't want any key stored without being protected by my own passphrase. At least you should give users the opportunity to choose wheather to use the master password or to keep individual passphrase protection for each key.

It surprised me (badly) that mails could be decrypted without asking for the passwords. I wished Thunderbird would not do that.

Imagine that someone gets access to all of your private PGP keys by hacking just one single password. And it is only a matter of time that "professional" (NSA, russian, chinese ...) hackers will do this.
Or imagine a security breach because of a faulty or unsafe implementation of this function. It is only a matter of time that someone finds a way to hack thunderbirs master password. The current implementation with PGP key protection by one single master password makes Thunderbird becomming a (more or even very) worthy hacker target.

In my opinion this issue makes Thunderbird worthless for users that seriously rely on encryption (e.g. in buisiness)
I'm really not happy with this implementation and I'm wondering if thunderbird can still be used for my email encryption.

Please change that !!!!

(In reply to User48756 from comment #2)

Or imagine a security breach because of a faulty or unsafe implementation of this function. ...

!!! This report (by Kai Engert) is the very best proof that weakness in Thunderbird's security is only a matter of time !!!

Sorry, you're confusing issues: this bug report is about using a password (the master password) at all, as opposed to no password at all to send/receive encrypted.

If you're concerned about security, use the OS protections and encrypted disk. If someone hacks their way into your computer, it's game over anyway.

Sorry Magnus, I do not aggree.
Key managers e.g. GnuPGP, Kleopatra, GPA, .. do not protect the keys by one single password (and e.g. assign individual passwords when keys are exported). Instead keys are stored with individual passphrases.

If I follow your argument this is unnecessary because of OS protection or disk encryption.
Secrets are hacked during normal operation by malware where OS protection or disk encrytion has nothing to do with.

How else would it be possible to hack a computer just by opening the wrong Email or site or document (word, excel, pdf .....)

Sorry Magnus I don't think you understand the scope of this report. This report shows that the key management has a weakness.
I think your attitude is wide spreaded and the reason that computers can be infiltrated so easily because security is allways the others job.

Quality on a large scale is only achieved by quality on a small scale, and this is especially true for safety.

(In reply to Magnus Melin [:mkmelin] from comment #4)

I agree that my concern is not the subject of this particular bug report. However, as a result of this report, the issue of key management security may well be raised again. If there is a more appropriate report on my specific topic, please tell me someone's ID.

(In reply to User48756 from comment #5)

If I follow your argument this is unnecessary because of OS protection or disk encryption.

If you use disk encryption and nobody else has access to your files, there's very little gained by additional password(s).

Secrets are hacked during normal operation by malware where OS protection or disk encryption has nothing to do with.

Like I said, malware -> game over. That malware might just as well log your keys, and gain whatever keys it wants.

This bug is about the request to make users aware of the presence of the master password, to allow users to be aware of this important protection mechanism for personal keys.

General discussions should not be done in bugzilla tickets, rather they should go to the https://thunderbird.topicbox.com/groups/e2ee list.

Feature enhancement requests should be filed as separate bugzilla tickets.

The master password, or other passwords protecting a secret key, are intended to protect secret keys at rest, and prevents secret keys from being easily recovered if the files storing secret keys get into the hand of an attacker, as could easily happen if you perform a backup of your files, and there's no protection of the backup files. The risk for accidental exposure of secret key files exists, even if you encrypt the disk of your computer. Also, for an attacker it can be much easier to steal a file from your computer, than to access the passwords that you type in, so a key password (or the master password) can provide an additional layer of protection.

PGP Secret Key Passwords should NEVER written to disk!

Arguing that some other mechanism should be used to protect them is specious, they should not be there at all.

What's the point of using PGP at all if the passphrases used to encrypt our e-mails are 1) stored and 2) encrypted by single password with a weaker encryption algorithm? One just has to crack TB's primary password to get full access to both encrypted e-mails and login credentials for every e-mail account. In effect, TB just uses PGP to offer compatibility with older versions and other clients, not to offer security.

That "just" is almost impossible, if you did not give the attacker full access to your computer. And even if he got physical access, you used full disk encryption right? So still basically impossible.

I understand that it's highly unlikely, but still. An attacker that somehow gets access to your system but fails to capture your passwords, needs to crack one weakly protected password instead of multiple strongly protected ones. If at least the encryption of the primary password was stronger, and its ability to en/decrypt e-mails expired after some time of not using it for that purpose, I don't think I would object much.

If an attacker already has gained access to your system, worrying about a possible brute force attack of at least many months... well, he'd probably go the easy route and install a key logger instead. A compromised system just can't be saved.

Why bother to prompt the users to use a primary password at all then? Its only purpose seems to be to prevent people with physical access to get your credentials and encrypted e-mails, and if they have physical access they can just install a keylogger as you, correctly, said. Just prompt them to use full disk encryption and call it a day.

The master password helps with data at rest, such as in backups.

Another scenario is, your home directory is on a network drive, e.g. in your organization.

Wouldn't stronger encryption in TB make sense in both those cases, or is it unimportant?

We're offtopic for this bug.

This bug suggests that users are made aware that they should set a master password.

You're suggesting that we should consider to further improve the strength of the mater password protection. That's a reasonable request, but should be tracked in a separate bug, as I had already explained above.

The master password protection mechanism isn't directly controlled by the Thunderbird team. It's part of the general Mozilla software platform that Thunderbird is based on. The respective code area is the NSS library, which provides the functionality to encrypt saved logins, keys and its master password protection. That's where an improvement needs to be made, and afterwards the Mozilla platform code needs to be enhanced to make use of a stronger mechanism. That improvement is tracked in bug 973759.

The fact that the crypto of master password (MP) is out of TB's control was exactly why I wanted to make sure you'd agree that the MP does actually offer protection, at least in some scenarios. The users, until recently, were using pretty solid encryption algorithms that are now effectively reduced to the strength of the crypto of MP when someone gets access to the key database (which they can get eg. from a backup of the user's home directory from a disk without full encryption). Since TB doesn't control the crypto of MP, my suggestion is to not use it ie. to not implement this bug at all, which is why the discussion wasn't off-topic. Instead, delete the passwords from TB's key database and ask the users to type their password whenever is needed, like they were used to do with enigmail.

From what I see, the team won't go that route, and I know when it's time for me to stop barking. Good day.

(In reply to tgn-ff from comment #21)

The fact that the crypto of master password (MP) is out of TB's control was exactly why I wanted to make sure you'd agree that the MP does actually offer protection, at least in some scenarios.

Yes, I agree it offers protection. In the past, the master password protection was worse - and along the route to adding OpenPGP into Thunderbird, I had worked on bug 1562671 to improve the MP protection.

The users, until recently, were using pretty solid encryption algorithms that are now effectively reduced to the strength of the crypto of MP when someone gets access to the key database (which they can get eg. from a backup of the user's home directory from a disk without full encryption).

You always have to consider all parts of an environment, and it's known that the weakest part is responsible for the overall strength of a setup.

For a user, who doesn't use unencrypted backups, who doesn't use a network drive for their home directory, who uses full disk encryption and locks their screen with an OS password, the security of OpenPGP emails in transit is as strong as the algorithms used with OpenPGP. In this scenario the MP can be considered unnecessary.

For anyone else, if they cannot completely eliminate the risk that someone might get access to the files stored in Thunderbird's profile folder, the master password provides some protection.

Even if the PBE mechanism provided by the master password can be considered weaker than OpenPGP encryption, IMHO it makes sense to point out that Capturing an email in transit is much simpler than performing a targeted attack on an individual and stealing their files.

That means:

  • you get the strong OpenPGP protection for emails.
  • performing a targeted attack is easier than brute force decrypting emails

Nobody claims that using Thunderbird's OpenPGP feature automatically protects your from targeted attacks.

If a user needs this level of protection, it's their own responsibility to ensure overall protection of their keys.

The master password may not be perfect, but for users who don't worry much about their operational security, or who don't have the skills to appropriately implement it in their environment, the master password adds a certain level of protection against easy attacks.

Also it should be said that the security depends on the passwords you're selecting. A strong password chosen for the master password might be more difficult to break than using a simple OpenPGP passphrase.

Since TB doesn't control the crypto of MP, my suggestion is to not use it ie. to not implement this bug at all,

I disagree. A master password adds a level of protection against accidental leakage of key material, or against guest users who don't have the criminal energy to install a key logger.

However, in documentation related to Thunderbird's master password, it would make sense to clarify that a better protection is to ensure that nobody can get a copy of your files in the first place, by hardening access to your computer.

Instead, delete the passwords from TB's key database and ask the users to type their password whenever is needed, like they were used to do with enigmail.

Having the keys in Thunderbird's database and using no MP by default is a convenience feature. It allows users to use encryption for emails in transit, without having to work on other aspects of their

Users who want to protect their keys with individual passwords can do so today, using the optional allow_external_gnupg mechanism, that requires the separate installation of GnuPG software, as described in the smartcard howto document.

Finally, we can file an enhancement suggestion for Thunderbird: We could optionally allow users to define their own passphrases for OpenPGP keys, instead of the current mechanism. I'll file a bug for that.

(In reply to Kai Engert (:KaiE:) from comment #22)

Finally, we can file an enhancement suggestion for Thunderbird: We could optionally allow users to define their own passphrases for OpenPGP keys, instead of the current mechanism. I'll file a bug for that.

Bug 1679278

The behaviour you described in Bug 1679278 is what I meant when I said to not use the MP. Thanks for filing the bug and for the info about GnuPG. I had skipped the smartcard part of the doc as irrelevant.

See Also: → 1741042
Summary: OpenPGP users in Thunderbird not aware of the recommendation to set up a Master Password → OpenPGP users in Thunderbird not aware of the recommendation to set up a Primary Password

(In reply to Magnus Melin [:mkmelin] from comment #13)

That "just" is almost impossible, if you did not give the attacker full access to your computer. And even if he got physical access, you used full disk encryption right? So still basically impossible.

Allow me to dispel this misconception with the following three words: laptop snatch attack.

Further discussion in bug #1679278.

You need to log in before you can comment on or make changes to this bug.