deltachat / deltachat-core-rust

Delta Chat Rust Core library, used by Android/iOS/desktop apps, bindings and bots 📧
https://delta.chat/en/contribute
Other
631 stars 80 forks source link

Add a way to import peer public keys from `.asc` files #5698

Open iequidoo opened 2 weeks ago

iequidoo commented 2 weeks ago

Sometimes it happens to me that i need to message some new contact having their PGP key, but i can't do that with Delta Chat because there's no way to import a key from a file. (Btw, maybe i mistake and there IS a way? This doesn't look like i want smth uncommon.) Auto-importing keys from incoming messages was implemented quite a long ago, so i suggest to do the same from outgoing messages sent to the self-chat, e.g. you send a message /deltachat-import EMAIL@ADDR with a .asc file attached and that's it. The /deltachat- prefix here is to avoid triggering this logic occasionally. The email address is better to be specified explicitly, sometimes PGP keys have several uids/addresses and creating peerstates for them all may be redundant, and anyway then you should choose one of them. Then you can click on the email address in the sent message and start chatting. So, no need to even auto-create a contact. You can check that the key is imported successfully in the "Encryption Info" context menu as usual. Maybe all this sounds not user-friendly, but this solves the problem entirely in Core and actually is an advanced feature anyway. Also #5678 adds a way to replace the maps integration by sending a webxdc to the self-chat, so it looks somewhat similar UX-wise.

r10s commented 2 weeks ago

Sometimes it happens to me that i need to message some new contact having their PGP key, but i can't do that with Delta Chat because there's no way to import a key from a file. (Btw, maybe i mistake and there IS a way? [...]

isn't our vcard implementation, containing public keys, better than to invent another thing with commands etc?

i did not follow previous discussions on that topic, however. did they take place? usually, we aim to agree with some devs before considering an enhancement, esp. the "self-assignment" looks as if that is already started :)

iequidoo commented 2 weeks ago

The reason is that people often publish their PGP keys in .asc format, not as vCards. Not all of them even use Delta Chat. I can imagine a tool converting .asc to vCard, but it would be less convenient and we already have implemented importing keys from .asc attachments for interoperability with non-Autocrypt MUAs. In e.g. Thunderbird you can import keys from files, why not have the same capability in Delta Chat, though of course it's not needed every day.

i did not follow previous discussions on that topic, however. did they take place?

Not sure, but i think i'm not the only one. I had this problem only a couple of times before and used TB or K-9 to send an encrypted message. Quite annoying anyway

iequidoo commented 2 weeks ago

Yesterday's user question btw: https://chaos.social/@waldschnecke/112647668730208369

maybe a kind of stupid question @delta I'm trying to establish a chat session with someone using email and not delta-chat. I have their public PgP key but I can't seem to find a way to import the key. All I get is the "nine.testrun.org requires end-to-end...." Am I wrong that this should be possible to chat with them? the other end not using a delta-chat client, just their email-client with pgp? #deltachat #deltachat_desktop