# Sending public key to non-Delta-Chat users \[.asc file attachment\]

**URL:** <https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187>\
**Category:** Feature Proposal\
**Tags:** open-standards, security\
**Created:** [May 6, 2026, 10:59pm UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187 "2026-05-06T22:59:40Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregex](https://forum.delta.chat/letter_avatar_proxy/v4/letter/g/e5b9ba/32.png) [@gregex](https://forum.delta.chat/u/gregex)\
**Post date:** [May 6, 2026, 10:59pm UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/1 "2026-05-06T22:59:40Z")

</div>

Hi all!

First of all, I really love this project. Keep up the good work!

**TL;DR: It would be great if the attachment menu would include a button to send one’s public key as an .asc-file to someone.**

I’ve been using DC for about a year now and have a couple of contacts with whom I regularly use it. However, I do have many contacts that do not use DC, but with whom I communicate via PGP encrypted email. Exchanging keys with them (in particular if the recipient has a setup that is incompatible with autocrypt) is quite a hassle - but possible.

This topic has come up many times before.

Reading the following two threads, I found out that I can import my contacts’ public keys using VCards:

- [How-to: Delta Chat interoperability with other ENCRYPTED email clients](https://support.delta.chat/t/how-to-delta-chat-interoperability-with-other-encrypted-email-clients/4726)
- [Is it possible to communicate with non-DC user? (interoperability with email)](https://support.delta.chat/t/is-it-possible-to-communicate-with-non-dc-user-interoperability-with-email/4425)

In order to send my public key to my contacts, I used to export it (Settings → Advanced) in the desktop app and then send it as a file. Unfortunately, this feature has been removed:

- [cleanup: remove outdated options and experiments](https://github.com/deltachat/deltachat-desktop/issues/5773)

It is still possible to extract the public key in binary format from the sqlite database and to use gpg to convert it to an .asc-file:

- [https://support.delta.chat/t/this-seems-redundant-now-that-manual-key-imports-will-likely-be-removed/3385](https://support.delta.chat/t/this-seems-redundant-now-that-manual-key-imports-will-likely-be-removed/3385)

I also tried extracting the key from my own VCard, but unfortunately to no avail. **If anybody knows how to extract a PGP key from a VCard generated by Delta Chat, please let me know.**

In general, this procedure does seem too complicated though and I think that one of the great selling points of DC is it’s interoperability. Manual key exchanges are possible already and do not have any security drawbacks (quite the opposite I would argue). For users of the mobile DC apps, performing a key exchange like this requires a significant amount of effort and technical skills that cannot be expected from every user. **Adding a feature to the user interface (in desktop and mobile apps) that would allow one to send one’s public key as an .asc-file to someone, would greatly improve DC’s interoperability and usability for everyone.**

I would suggest to include an item in the attachment menu (the paper clip symbol) that allows one to send - apart from photos, contacts or files - one’s public key. If there is some concern that this might confuse users, it could of course also be hidden somewhere else or only be visible when explicitly being activated in the settings.

I would love to hear what others think about this!

Gregor

---

<div class="post-metadata">

**Author:** ![ian](https://forum.delta.chat/user_avatar/forum.delta.chat/ian/32/3164_2.png) [@ian](https://forum.delta.chat/u/ian)\
**Post date:** [May 7, 2026, 10:20am UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/2 "2026-05-07T10:20:30Z")

</div>

Why not just attach your own contact (vcard) to the message from the menu? Your peer is already expected to be able to parse it. The `key` property contains a binary pgp file encoded as base64, so it’d also be possible to convert it to `.asc` if you need it for some reason.

---

<div class="post-metadata">

**Author:** ![gregex](https://forum.delta.chat/letter_avatar_proxy/v4/letter/g/e5b9ba/32.png) [@gregex](https://forum.delta.chat/u/gregex)\
**Post date:** [May 7, 2026, 11:01am UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/3 "2026-05-07T11:01:16Z")

</div>

Thank you for your answer!

Yes, that’s exactly what I was trying to do, but it does not seem to work. Maybe I’m doing something wrong. I’ve been trying to import the VCard directly to Protonmail, but they did not recognise the key. That might of course be an issue on their side, so I tried to extract the key from the VCard.

This is what I tried:

In my VCard I have a line looking like this:

```auto
KEY:data:application/pgp-keys;base64\,xjMEaF1...bF1Bw==

```

If I understand it correctly, the `xjMEaF1...bF1Bw==` part is the binary PGP key encoded as base64, so I decode it as follows:

```auto
echo "xjMEaF1...bF1Bw==" | base64 -d > key.bin

```

However, trying to import it with `gpg --import key.bin` fails with the following output:

```auto
gpg: mpi larger than indicated length (256 bits)
gpg: read_block: read error: Invalid packet
gpg: import from 'key.bin' failed: Invalid keyring
gpg: Total number processed: 0

```

Importing the key that I copied from the sqlite database with `gpg --import key-from-db.bin` on the other hand succeeds.

**Where am I going wrong?**

Also, while I am interested in knowing where I went wrong, I cannot expect other people to go through all this trouble to import my key. **Importing PGP keys from VCards is not widely supported and it would help less technically inclined people to set up end-to-end encryption if one could just send the public key as an .asc-file.**

---

<div class="post-metadata">

**Author:** ![ian](https://forum.delta.chat/user_avatar/forum.delta.chat/ian/32/3164_2.png) [@ian](https://forum.delta.chat/u/ian)\
**Post date:** [May 7, 2026, 11:28am UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/4 "2026-05-07T11:28:44Z")

</div>

I don’t know how to help you without seeing more concrete data, because the way you detail works perfectly for me. You may want to also try with `gpg --dry-run --import -v -v -v key.bin` Are you using an up to date version of gpg? You may try the same command with a fresh OS user to rule out that your keyring is in error.

> <https://github.com/rnpgp/rnp/issues/941>
>
> \## Description
> 
> While OpenPGP standard allows MPI lengths up to 64k bits, we a…llow only smaller ones.
> Construct dummy key, signature and PKESK data files and make sure those are loaded with correct error reporting, without AV and range-check failures.
> Separate test file should be added to rnp\_tests suite.

It would also be feasible to implement a webxdc app to convert a vCard to an asc file, similar to the already existing converter from asc to vCard.

---

<div class="post-metadata">

**Author:** ![gregex](https://forum.delta.chat/letter_avatar_proxy/v4/letter/g/e5b9ba/32.png) [@gregex](https://forum.delta.chat/u/gregex)\
**Post date:** [May 7, 2026, 11:53am UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/5 "2026-05-07T11:53:24Z")

</div>

Ooh wait. I missed one character when copy/pasting the base64 encoded key. It does work. Great! Sorry for the confusion. 🙈

However, I still think it would be a useful and desirable feature to have if one could send keys in .asc-format (and ideally receive and process them directly within DC as well). My concern that importing public keys from VCards and exporting them into VCards is not widely supported by other email providers and email clients still stands.

Using webxdc apps to handle this seems to be more of a workaround and there might be reasons that some people do not want to enable webxdc apps at all, but still want to be able to set up end-to-end encryption with non-DC contacts.

---

<div class="post-metadata">

**Author:** ![ian](https://forum.delta.chat/user_avatar/forum.delta.chat/ian/32/3164_2.png) [@ian](https://forum.delta.chat/u/ian)\
**Post date:** [May 7, 2026, 11:57am UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/6 "2026-05-07T11:57:47Z")

</div>

Protonmail already supports importing contacts from vcards. You may want to open a feature proposal for them to also support the existing `key` property in the standard.

> **[How to create or edit CSV files | Proton](https://proton.me/support/creating-or-editing-csv-files)**
>
> Learn how to create and import contacts as a CSV file into your Proton Mail account

---

<div class="post-metadata">

**Author:** ![gregex](https://forum.delta.chat/letter_avatar_proxy/v4/letter/g/e5b9ba/32.png) [@gregex](https://forum.delta.chat/u/gregex)\
**Post date:** [May 7, 2026, 12:03pm UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/7 "2026-05-07T12:03:05Z")

</div>

Yes, I will certainly do that seperately as well. It would be great if they would support that. Exporting a contact as a VCard from Protonmail already includes the key and DC is able to import it. 👍

This feature request is not only about Protonmail though. There are many other email providers that support PGP in their web apps, but that do not handle VCards. In the interest of interoperability it would be good to keep the people using those providers in mind as well.

---

<div class="post-metadata">

**Author:** ![alexlehm](https://forum.delta.chat/user_avatar/forum.delta.chat/alexlehm/32/3305_2.png) [@alexlehm](https://forum.delta.chat/u/alexlehm)\
**Post date:** [May 9, 2026, 3:03pm UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/8 "2026-05-09T15:03:15Z")

</div>

I thought the simplest way to propagate the public key would be to use autocrypt which is supported by Thunderbird at least, however I have until now failed to create an email that I can send out via the chatmail relay since it has to be encrypted and has to follow a specific format apparently.

The other option to introduce contacts that do not use DeltaChat would be to send an autocrypt-compatible mail from the non-dc email to the dc email, but that does not seem to work either

---

<div class="post-metadata">

**Author:** ![gregex](https://forum.delta.chat/letter_avatar_proxy/v4/letter/g/e5b9ba/32.png) [@gregex](https://forum.delta.chat/u/gregex)\
**Post date:** [May 12, 2026, 12:02pm UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/9 "2026-05-12T12:02:39Z")

</div>

I haven’t tried setting up autocrypt. I use the mutt email client, which theoretically also supports it, but there also seem drawbacks to using autocrypt. One reason for me to not use it is certainly that, even though I usually use mutt to check my mails, I want to have the option to do everything in webmail as well. I use Protonmail and their web interface does not support autocrypt (this applies to many other providers as well).

The simplest approach for me is to do the manual key exchange as outlined in this thread (mentioned in my initial post):

- [Is it possible to communicate with non-DC user? (interoperability with email)](https://support.delta.chat/t/is-it-possible-to-communicate-with-non-dc-user-interoperability-with-email/4425)

Whether autocrypt is generally a good approach for key exchange or not is one discussion, but regardless of that I think that users should at least have the _option_ to perform manual key exchanges. After all the choice of building Delta Chat on top of the email protocol is interoperability (if I understand it correctly). In line with this goal it would thus only make sense to not restrict encrypted email transmission to those who follow a small subset of the available standards for key exchange (i.e. those with access to autocrypt compatible clients).

---

<div class="post-metadata">

**Author:** ![Minim](https://forum.delta.chat/letter_avatar_proxy/v4/letter/m/ccd318/32.png) [@Minim](https://forum.delta.chat/u/Minim)\
**Post date:** [May 18, 2026, 2:32pm UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/10 "2026-05-18T14:32:51Z")

</div>

There is a WebXDC app to convert:

> **[asc-to-vcard](https://codeberg.org/r10s/asc-to-vcard)**
>
> Create VCards from classic PGP .asc public key files.

It is available in-app in the “Apps” submenu of the attachment menu.

---

<div class="post-metadata">

**Author:** ![gregex](https://forum.delta.chat/letter_avatar_proxy/v4/letter/g/e5b9ba/32.png) [@gregex](https://forum.delta.chat/u/gregex)\
**Post date:** [May 18, 2026, 2:35pm UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/11 "2026-05-18T14:35:02Z")

</div>

Yes, thank you. I am looking for a convenient way to do the conversion in the reverse direction though.

---

<div class="post-metadata">

**Author:** ![Minim](https://forum.delta.chat/letter_avatar_proxy/v4/letter/m/ccd318/32.png) [@Minim](https://forum.delta.chat/u/Minim)\
**Post date:** [May 18, 2026, 2:39pm UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/12 "2026-05-18T14:39:42Z")

</div>

I have done manual key exchange and it worked. I am okay with Deltachat following a narrow subset of good well-documented standards, there are just too many e-mail standards to spend development effort on all of them.

Does anyone know of a good webmail provider that does Autocrypt? The dysfunction of zero-access encryption does rather mean you have to trust them with your keys, but they could offer accounts on any Keymail relay.

I believe there has been talk of a webmail Chatmail app.

---

<div class="post-metadata">

**Author:** ![gregex](https://forum.delta.chat/letter_avatar_proxy/v4/letter/g/e5b9ba/32.png) [@gregex](https://forum.delta.chat/u/gregex)\
**Post date:** [May 18, 2026, 2:43pm UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/13 "2026-05-18T14:43:17Z")

</div>

> I am okay with Deltachat following a narrow subset of good well-documented standards, there are just too many e-mail standards to spend development effort on all of them.

I do agree. This does not really apply to VCards though. I do not think that there is a standard of how exactly to include a PGP key in a VCard - everybody seems to do their own thing. Distributing keys as .asc files on the other hand is well documented and standardised.

---

<div class="post-metadata">

**Author:** ![ian](https://forum.delta.chat/user_avatar/forum.delta.chat/ian/32/3164_2.png) [@ian](https://forum.delta.chat/u/ian)\
**Post date:** [May 18, 2026, 6:12pm UTC](https://forum.delta.chat/t/sending-public-key-to-non-delta-chat-users-asc-file-attachment/5187/14 "2026-05-18T18:12:02Z")

</div>

@Minim

> [@Web client possible?](https://support.delta.chat/t/web-client-possible/467/26):
>
> Some of the topics and posts are already sparsely or transitively linked, but let me list here together all posts related to shipping static web client apps (WebAssembly, wasm, Emscripten, Rust, TCP/IP, proxy, gateway, compile, WebSocket, JMAP, JavaScript, API):
