The sad state of SMTP encryption
blog.filippo.io
blog.filippo.io
Regarding the issue with certificates for the servers that the MX points to, I disagree with the author. If the MX for example.com points to mail.example.info, it implies that example.com trusting the handling of its mail to mail.example.info, therefore there is no issue with letting mail.example.info present its own certificate.
The article also suggests that DNSSEC with DANE will solve all issues with SMTP encryption.
However, DNSSEC is a crappy standard. It doesn't do encryption so a surveillant can still collect metadata; it has unsolved issues that facilitate amplification attacks, it's overly complex and has slow adoption. In fact, before DANE arrived on the scene, there was hardly a good reason to deploy it.
If we adopt DNSSEC now we'll be stuck with it (including its lack of privacy) pretty much forever. Instead, I suggest we work on more promising initiatives such as DNSCurve (https://en.wikipedia.org/wiki/DNSCurve)
Not sure I made that point clearly but I'm not saying that performing validation against the MX target is wrong. However it requires the MX to be authenticated (i.e. signed with DNSSEC), otherwise the attacker can just falsify the MX and have mail delivered to a server for which it has a valid certificate, making validation useless.
http://sockpuppet.org/blog/2015/01/15/against-dnssec/
http://sockpuppet.org/stuff/dnssec-qa.html
I was not familiar with that EFF project. Looks like an interesting starting point. I wonder if, rather than maintaining a central configuration file, domain owners could vend configuration through canonical URLs on each domain, like https://example.com/.smtp-ssl for example.com - essentially bootstrap the security through another protocol that's more mature. (This could have the effect of using the existing CA system rather than relying on a government-controlled PKI.)
http://www.postfix.org/TLS_README.html#client_tls_dane
https://github.com/Exim/exim/blob/master/doc/doc-txt/ChangeL...
To be fair, on-the-wire encryption is a problem orthogonal to that which DNSSEC is attempting to solve, which is integrity.
> it has unsolved issues that facilitate amplification attacks, it's overly complex and has slow adoption. In fact, before DANE arrived on the scene, there was hardly a good reason to deploy it.
Yup, DANE is essentially its killer app.
Any chance you could outline how you think it could be improved?
> If we adopt DNSSEC now we'll be stuck with it (including its lack of privacy) pretty much forever. Instead, I suggest we work on more promising initiatives such as DNSCurve (https://en.wikipedia.org/wiki/DNSCurve)
I don't think the case. As I wrote, DNSSEC aims to solve the issue of integrity, not privacy. DNSCurve, or something like it, should be deployed alongside DNSSEC, with the former giving you privacy, and the latter ensuring the integrity of the records. That way, even if the authoritative DNS server itself is compromised, you can know whether the data you're getting from it are OK or not. After all, it doesn't matter how good the pipe is if you're getting sludge rather than the clean water you expect through it.
The big problem is that people, whether they're DNSSEC or DNSCurve advocates, incorrectly put DNSSEC and DNSCurve in competition with each other, but this isn't even remotely the case. We ought to be using both.
With DNSSEC yes, you can store signed data on a server without having to store the key on the same machine. It does make it even more complicated, however. With HTTPS, IMAPS, SMTPS etc we're also fine with storing the key on the server, why not with DNS?
If you're worried about the key being stolen you can always store it in a HSM to limit the damage of a server compromise.
As I recall, the problem DNSSEC aimed to solve when it was re-proposed (it failed mutiple times previously), circa 2008, was cache poisoning. That problem can be solved other ways besides using DNSSEC under the control of third parties. Of course, today we rarely hear much about cache poisoning when DNSSEC is brought up. Instead the discussion usually revolves around other problems such as the CA system or spam. What's funny about this is that the proposed use of DNSSEC only enforces another system where potentially untrustworthy third parties are in control.
Is it a coincidence this blog post was written by someone employed by Cloudflare? Another company tied to the DNS "business". This is the third post pushing DNSSEC from Cloudflare to reach the HN front page in the last month.
Will there be a fourth?
Enforce TLS on your mail server and you're siloing yourself from a large part of the internet, and unless you're Gmail and your actions carry weight, others will simply stop emailing you after their mail keeps bouncing.
Until we 'solve' THIS problem, there's no point in discussing what happens in between IMHO.
[1] http://www.theguardian.com/world/2013/jun/06/us-tech-giants-...
If you're already a passive eavesdropper, all you need is the ability the send a DNS response and you're a man-in-the-middle.
I predict in my group of friends I can receive/sent from/to almost everyone if I would enfore TLS on my server. Except to/from that one guy that is savvy enough to have his own domain but hosts his email at a cheap, crappy provider.
PGP and SMIME is perfectly fine for high security scenarios (whistleblowing and such), in other words for the 0.000001% use case.
For the 99.9% use case, all that regular folks need is for the sending MX to verify that the recipient MX owns the domain before delivery.
PGP and SMIME with their key-signing parties, government-owned PKI et cetera, is either wild overkill or so utterly complex that it defeats the purpose for the 99.9% use case.
---
That said, you are going to break some of my software with this.
Specifically a SMTP reverse proxy, that looks at the domain part of RCPT TO, and transparently forwards the SMTP connection to the correct customer's MX for processing.
It could easily be unbroken again - BUT that would require that Postfix get their software together and add SNI support to their TLS stack (like all? other MX software does).
---
Implementation proposal:
1) Use RCPT domain-part for the SNI hostname.
2) Always try SMTPS port before SMTP port. Always try STARTTLS before plaintext.
3) Actually verify the certificate, duh.
4) Support a new EHLO header that mimics Strict-Transport-Security exactly.
S/MIME might also have some dependencies on PKI that in some scenarios could make it unsuitable for high security scenarios?
For me personally, I'm not too worried about the NSA. But I do think it is quite silly that Gmail and Outlook has a little lock icon to indicate that security is ON, while the first thing that happens when you click Send is that your email is whizzed over half the internet in plaintext.
For organizations and corporations, I imagine they would very much like to be able to verify the identity of the receiving organization before delivering possibly sensitive email.
(The sender identity is already authenticated via DKIM.)
Without proper certificate validation, the encryption step is cryptographically worthless. Anyone can MITM the traffic just by presenting a random certificate to the sender.
(What does happen with your reverse-proxy when someone opens up a session and sends two mails, to two different customers?)
if hostname != target {
downstream.Write([]byte("452 Different domain, please reconnect and deliver separately.\r\n"))
continue
} else {
As a side-effect, email to the secondary domain is slightly delayed.It is a full proxy, in the sense that it sees all of the traffic, so technically it could de-multiplex and spool to two different targets at the same time for the duration of the current email.. Hasn't been a noticeable problem so far. But it would be nice to add at a later point in time. If/when someone complains, probably.
StartSSL limits you to one year and Let's Encrypt is really focused on certificates for HTTPS (their ACME protocol AFAIK requires a handshake through HTTPS).
Unfortunately, I know of no way around this. I just gave up and started using Claws in the meantime.
The problem is you don't have public keys for people you send to.
And there's not a reason for many to get the keys.
I wish I could say "I'll read your unencrypted email tomorrow" (and delay it from getting to my inbox).
Then we get to argue whether NSA can get bogus valid certificates from the commercial CA's... Of course you could roll your own CA but then both parties need to trust it.
https://www.mail-archive.com/dane-users@sys4.de/msg00142.htm...
Comcast published TLSA records the other day. So when people like myself who have enabled TLSA in Postfix send email to Comcast users, the SMTP connection is guaranteed to be both encrypted, and the SSL cert validated.
* TLS Wraper
* Secure Tunnel
And Amazon Web Services Simple Email Service accepts all three approaches. Granted the latter two may not be supported by a lot of providers, but hey is that the same thing with browsers securities? We deprecate old MTAs and old versions of them progressively. Just my two cents.