deltachat / deltachat-core

Delta.Chat C-Library with e2e chat-over-email functionality & Python bindings
https://c.delta.chat
Other
304 stars 26 forks source link

Show a warning if password-protected-keys cannot be imported #144

Closed r10s closed 5 years ago

r10s commented 6 years ago

password protected keys cannot be imported currently.

Autocrypt does not encourage these keys, so this is not a big problem, however, we should print a concrete error if such a key could not be imported,

https://github.com/deltachat/deltachat-android/issues/98

An alternative would be to ask for the password and remove it or save the password together with the key, however, I think it is better if the user removes the key manually so that he knows what is going on and won't expect Delta Chat to store password protected keys,

mbeko commented 6 years ago

I already have a password-protected key in Enigmail and I thought protecting private keys is essential for security. Therefore, I wouldn't like to copy the key without password to my phone and have several questions related to this:

r10s commented 6 years ago

What's the reason for not protecting private keys? Why is this not encouraged by Autocrypt?

Delta Chat not only encrypt mails but always use encrypt+sign; signing would required the password for the key. As we do not want the user to enter the password each time a message is sent, we would save it along with the key, so password protected keys would not have much benefits. But they have problems, eg. data loss if the user forgets it and additional UI complexity. https://autocrypt.org/level1.html#secret-key-protection-at-rest and https://k9mail.github.io/2017/01/30/OpenPGP-Considerations-Part-II.html gives some more background.

If I let Delta Chat generate a private key, how can I make sure I can read encrypted chats also with Thunderbird/Enigmail while continuing to use my original, protected key for non-chat mails?

You can import the Delta Chat Key to Thunderbird, PGP/Enigmail allows you to use multiple keys for decryption (as well as Delta Chat does). The easiest way to transfer the key, is sending an Autocrypt Setup Message, see Settings / Advanced in Delta Chat. Enigmail 2.0 can decode the key then.

mbeko commented 6 years ago

Great background information, thanks a lot!

When I try use Start Setup after sending the Autocrypt Setup Message, Enigmail tells me that the account is already configured for Autocrypt and asks if I want to overwrite the settings. Will my original Enigmail key be lost then?

By the way, I initially didn't understand what Initiate Autocrypt Key Transfer means and feared to tap on it because I thought it would immediately trigger the unknown action.

I propose to add at least "…" at the end to indicate that a dialog with an explanation will open up. In addition, maybe it could be renamed to make it easier to understand for laymen. I suggest Send secret key to self…

r10s commented 6 years ago

it should be possible to use several keys in enigmail in some way. For Autocrypt, however, only one key is specified. This keys should have no passphrase then.

Regarding some additional information beside the Autocrypt-buttons - yes, this would be great.

STPKITT commented 6 years ago

Just to make it clear, is there just one single Autocrypt key or one per E-Mail-account?

r10s commented 6 years ago

Each Autocrypt communication peer is identified by an e-mail address. Autocrypt associates state with each peer, among them the key. So yes - there is one key associated with one e-mail-account. See https://autocrypt.org/level1.html#autocrypt-internal-state for details.

mbeko commented 6 years ago

OK, so I take away two points from your reply:

r10s commented 6 years ago

I can't use the Autocrypt key transfer feature if I already have a key.

I am no Enigmail export, but i think it should read "I can't use the Autocrypt key transfer feature if I already have an Autocrypt key."

r10s commented 5 years ago

closed in favor to the more common https://github.com/deltachat/deltachat-core/issues/266