Expected behavior
Import and use of existing GPG Keys
Actual behavior
Connot import my GPG Keys
Import and use of existing GPG Keys
Connot import my GPG Keys
this feature is important.
importing public GPG keys of contacts is necessary in order to be interoperable with protonmail and gmx/mailevlope.
This is not a convenient solution of course, but you can write some script converting your keys which are probably in the ASCII-armored format into vCards understandable by Delta Chat. You can find some documentation of the Delta Chat vCard support here: deltachat-core-rust/deltachat-contact-tools/src/lib.rs at main · deltachat/deltachat-core-rust · GitHub
I’ve closed Add a way to import peer public keys from `.asc` files · Issue #5698 · deltachat/deltachat-core-rust · GitHub to discuss it here first. The suggestion there was
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.
any update on this to have GPG Keys in place or to be hybrid encrypted with this format of keys?
there was the idea, to create a little webxdc-tool for that purpose - paste a key and get a vcard. however, it was just not done by someone yet
a general note to understand priorities: Delta Chat does not consider PGP in its classic dealing-with-keys form as a convenient-enough approach to exchange keys. we do not want users to be confronted with key questions in the UI they “reach”, Don’t ask users anything about keys, ever. therefore, effort and focus is put to other parts - autocrypt, secure-join, vcards etc. - resulting in far more messages being encrypted than on most other email apps
but a vcard webxdc could be a nice addon for advanced power users
I think the solution is to have both formats encrypting the message, which is to go hybrid for each message,
It should be no matter, if the friends uses DetaChat or Thunderbird with GPG.
The vision must be that DeltaChat is a GPG-messenger, a PGP-messenger.
All other views and approaches and time gaps and delays are not supporting that vision and are wrong.
Only as a GPG Messenger other apps like Thunderbird will implement something like Autocrypt.
Whats the matter to add some code to wrap a message twice? In Delta Format and in Standard GPG Format, without any plugins and external resources?
Please revise the priorities and think about this standard.
Many thanks
The current API for vCard import is
async fn import_vcard(&self, account_id: u32, path: String) -> Result<Vec<u32>>
vCards are stored in files like
.../dc.db-blobs/VCard-Alice.vcf
Maybe, if a key is absent in the vCard, just import it from .../dc.db-blobs/VCard-Alice.asc
? The user can see the vCard path in the message Info
and put the key next to it. Delta Chat already supports importing keys from .asc
, see MimeMessage::try_set_peer_key_from_file_part()
, so to implement this workaround we only need to format a file path, open the file, read it and call this function, roughly.
why not just adding an API to RPC like: import_asc()
??? even without any new API the UI could just convert the asc to vcard and pass it to import_vcard()
but that would be more work
then if you attach a .asc file in a chat, on clicking it the client can offer to import contact similarly to vcard, question is if asc file provide all the contact information, email address at least, if not then what we need is an option to create a contact AND provide a key, or “add key” to existing contact from its profile which could be done using the contact address + asc file data generating a vcard and feeding it to import_vcard()
it is a bit questionable adding this advanced stuff to UI so maybe indeed it is better to have a simple python script to convert asc to vcard or a webxdc app, for the intermediate nerd
if this is the case then it would be fine to add it to the UI as the workflow is similar to vcard
I think it’s indeed a bit questionable, that’s why i suggested a w/a implemented completely in the core, i don’t want to complicate the apps code with this feature. Importing a key from the “neighbour” ASCII-armored file is just several lines of code, Delta Chat already supports this format, + a new test. Still it’s not clear if such a w/a suits anybody’s needs.
One more user request, https://social.doghub.eu/notice/Aj74CM15lcMTZrmTiq:
maybe a kind of stupid question @delta@chaos.social 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