🌲 treerockets blog

Chat with Deltachat and an email contact

If you want to use deltachat, and a chat partner has just an email client, you can still write directly from deltachat.

But at first, you'll likely notice a message that end to end encryption is required and cannot be used.

The system is based on PGP, so we should be able to import the PGP key into deltachat right? Kind of - yes.

It sounds complicated at first, but it's not really. Not like "my Grandpa can do this", but it's a start.

To my knowledge the deltachat devs are working on making this easier. I would think - maybe - just being able to import a PGP key via the app?

How to do it:

1.) Have a Deltachat client, with an ID set up (your own or one of the availabe servers the app suggests) and a partner with email and a PGP key set up.

2.) The email sender (your chat partner) needs to convert the public PGP key into base64.

For this, the PGP key needs to be binary - normally easy to export from your PGP client or keychain (I'm using seahorse for example). (It's maybe silly to say, but always be sure to use the PUBLIC KEY only.)

Open this file (typically a .pgp file) in a text editor - it will present itself as a large number of many lines, looking like this: "1502 0d03 62da 5534 0110 00a9 1558 00ff"

We need to convert this into base64 (for example with https://www.base64encode.org/) or use the commandline of your OS.

If you use the website, simply copy and paste. Since this is the public key, you're not sharing anything "dangerously private" to this website. Using a commandline on a linux based system is easy: '$ base64 input-file.txt > output-file.txt'.

3.) Now create a vcard file in a text editor - it should look like the example below.

Add the base64 encoded PGP key (copy and paste is required here - not linked or attached). Add a name and matching email. (I would expect the email needs to match with the PGPs keys aligning email, I have not tried though)

BEGIN:VCARD
VERSION:4.0
EMAIL:ADDR@example.com
FN:My Dad
KEY:data:application/pgp-keys;base64,<BASE64 ENCODED BINARY PUBLIC KEY HERE>
REV:20240620T153225Z
END:VCARD

4.) Create a new email and send this PGP key as attachment with your first message to the deltachat contact you want to communicate with (email to deltachat). Now, the deltachat client should already recognize the key exchange. On this end, we're all set.

5.) But, we need the deltachat key IN the email-client or rather the PGP keychain. So; in the deltachat-client (I'm asuming to use the desktop client), export your own keys (on desktop: file > settings > advanced > export secret keys) - this will give you a file with your public key in .asc format. (Only ever use the PUBLIC key file)

6.) Hand this to your email-chat-partner - for example by a conventional email, an other chat, on a USB stick ... Import the key in the PGP client, now you can exchange encrypted messages.

#deltachat