🌐
Videos Blog About Series πŸ—ΊοΈ
❓
πŸ”‘

ARC and the SRS: Stop the email insanity πŸ”—
1713357982  

🏷️ blog 🏷️ email

There's a problem with most of the mail providers recently requiring SPF+DKIM+DMARC. Lots of MTAs (exchange, mailman etc) are notorious for rewriting emails for a variety of reasons. This naturally breaks DKIM, as they don't have the needed private key to sign messages which they are forwarding. And given the nature of the email oligopoly means you absolutely have to be under the protection of one of the big mass mailers with juice at MICROS~1 or Google, this necessitated a means to "re-sign" emails.

This is where SRS came in as the first solution. Easy, just strip the DKIM sig and rewrite the sender right? Wrong. Now you are liable for all the spam forwarded by your users. Back to the drawing board!

So, now we have ARC. We're gonna build a wall chain of trust, and we're gonna make google pay for it! But wait, all DKIM signatures are self-signed. Which means that peer-to-peer trust has to be established. Good luck with that as one of the mittlestand out there. Google can't think that small.

I can't help but think we've solved this problem before. Maybe in like, web browsers. You might think that adopting the CA infrastructure in Email just won't work. You'd be wrong. At the end of the day, I trust LetsEncrypt 100000% more than Google or MICROS~1.

So how do we fix email?

The core problem solved by SPF/DKIM/DMARC/SRS/ARC is simple. Spoofing. The web solved this long ago with the combination of SSL and DNS. We can do the same, and address the pernicious reality of metadata leaks in the protocol.

Email servers will generally accept anything with a To, From, Subject and Body. So, let's give it to them.


To: $RECIPIENT_SHA_1_SUM@recipient-domain.test
From: $USERNAME_SHA_1_SUM@sender-domain.test
Subject: Decrypt and then queue this mail plz

(encrypted blob containing actual email here)

Yo dawg, I heard you liked email and security so I put an encrypted email inside your email so you can queue while you queue

This is actually a practical solution, as it requires no modifications to clients whatsoever. Servers that don't understand these mails will bounce them, like they do to misconfigured mails (such as those with bad SPF/DKIM/DMARC/SRS/ARC anyways). There are also well established means by which email servers discover whether X feature is supported (EHLO, etc), and gracefully degrades to doing it the old dumbass way. When things are supported it works like this:

  1. We fetch the relevant cert for the sender domain, which is provided to us by the sending server.
  2. We barf if it's self-signed
  3. We decrypt the body, and directly queue it IFF the From: and Envelope From: are both from the relevant domain, and the username's sha1 sum matches that of the original from.
  4. Continue in a similar vein if the recipient matches and exists.
From there you can drop all the rest of it; SPF, DKIM, DMARC what have you. Not needed. SpamAssasin and Milters continue working as normal. If it weren't for forwarding, you could even encrypt the sender/reciever domains for marginally more deniability about which vhosts are communicating. That said, some scheme for passing on this info securely to forwards could be devised.

What would be disrupted here is the pattern where forwarders tack on a bunch of crap or alter messages in transit. That's a good thing. In real life, you get arrested for adulterating mail, not tech that bends over backwards for you. But, just like plain HTTP is still a thing, they can continue to do their nonsense while the rest of us are all secure over here.

Just like the schemes to get ARC and whatever nonsense needed to make the current model to work, a 99% encrypted model requires server updates and config changes. It's also not too conceptually different from existing email encryption, such as PGP or S/MIME. In short, it's no worse than the status quo, but leads us out of this evolutionary dead end of perpetually increasing complexity that Email is currently in.

25 most recent posts older than 1713357982
Size:
Jump to:
POTZREBIE
© 2020-2023 Troglodyne LLC