unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* revisiting Autocrypt in notmuch, MVP
@ 2023-04-26 18:10 Antoine Beaupré
  2024-02-23  3:22 ` Antoine Beaupré
  0 siblings, 1 reply; 6+ messages in thread
From: Antoine Beaupré @ 2023-04-26 18:10 UTC (permalink / raw)
  To: Notmuch list; +Cc: dkg, dme


[-- Attachment #1.1: Type: text/plain, Size: 2313 bytes --]

Hi!

I'm giving an OpenPGP training this week, which I haven't done in
ages. A lot has changed since then: keyservers are basically dead (or
have changed significantly), WKD and Autocrypt exist and are supported
out of the box by Thunderbird, which simplifies a lot of things.

While testing out Thunderbird, I realized I wasn't sending out autocrypt
headers. I find those headers really precious, as they allow me to TOFU
users when they send me encrypted email. I have a rough hack to parse
incoming email and manually importing them in my keyring:

https://gitlab.com/anarcat/scripts/-/blob/dd898332c4e6c829fd18455fe3f1bbbee37e9551/autocrypt-key-import

That used to be a complicated Python program, but it turns out that
sequoia directly supports parsing those headers! So it's now this
one-liner:

    sq autocrypt decode | gpg --import

So I have a basic MVP (minimal viable product) for importing keys. But
what about *sending* keys, i.e. embedding keys in outgoing messages?

Well, this (and parsing incoming keys too, obviously) is something that
was discussed before:

https://nmbug.notmuchmail.org/nmweb/show/20210221152132.2302112-1-dme%40dme.org

That discussion somewhat died out as dkg suggested to fix the problem
more broadly, and things stalled there.

And while autocrypt has a nice beautiful and brilliant spec that does
everything, that's not what I'm looking at right now. And I don't think
it's productive to block in this way at this point.

So I made a bespoke implementation that just calls out to sequoia (and
yes, also gpg, hopefully one day the latter can just go away) to insert
autocrypt headers to outgoing mail. Here's the implementation:

https://gitlab.com/anarcat/emacs-d/-/blob/354fabad24100f69310dd16a0d30ac3bd96d7244/notmuch-config.el#L14-31

It's brittle, but it works for my case.

I don't think this is something that can be merged as-is in notmuch. It
depends on gnupg and sequoia, and it's probably incorrect as far as the
Autocrypt spec is concerned (in particular it doesn't use a UID to
fingerprint map), but this all seems like things could be improved.

So that's what I got. I hope that helps! :)

a.

-- 
Celui qui ne connaît pas l'histoire est condamné à la revivre.
                        - Karl Marx

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-25 16:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-26 18:10 revisiting Autocrypt in notmuch, MVP Antoine Beaupré
2024-02-23  3:22 ` Antoine Beaupré
2024-02-23 17:14   ` Antoine Beaupré
2024-02-25  4:09     ` Steven Allen
2024-02-25  9:40       ` Sandra Snan
2024-02-25 16:33         ` Steven Allen

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).