This is Dr. Jeremy Galula. He's the tech projects director of the Electronic Frontier Foundation. He's going to talk with us about kind of the cool encryption internet kind of thingies. So I'm going to turn it over to him. Let's give him a great big round of applause. Thanks very much. So yes, apologies if you were looking forward to seeing Shahid Batar. He is elsewhere at DEF CON but couldn't be here to give this particular talk. So I'm not going to be talking about NSA spying. I am going to be talking, however, about NSA spying, but just from a totally different angle. So first of all, thank you everyone for showing up here bright and early this morning. I'm amazed that there are more than like two of you in the audience at 10 a.m. on Saturday. So I will try not to put you back to sleep. So most people see the EFF like this, like a bunch of lawyers. So these are a team of lawyers. They're outside the United States Court of Appeals. And it's true. We have a lot of lawyers. They're awesome. But EFF also does a lot of other awesome stuff. Obviously, with lawyers, we petition the government. This is some comments we wrote to the FCC during the whole net neutrality debacle. We actually put together comments from Internet engineers, pioneers, and technologists about the technical flaws in the FCC's proposal. And so we bring technologists together. Obviously, we also do a lot of grassroots support, rallying grassroots support. Some of you might have been at some of these protests. But nearest and dearest to my heart as tech projects director is that we actually write code. We have a bunch of technologists on staff at EFF who not only advise the lawyers, we also write code, we create software that people can use to enhance their privacy and security. And I'm going to be talking a little bit about that sort of stuff today. So some of our software projects, some of you may or may not have heard of. There's HTTPS Everywhere is probably our most well-known. It's a browser extension you can install to enhance your security online. I'll be talking a little bit more about that one later. There's also Privacy Badger. That's another browser extension that's a privacy-focused as opposed to security-focused. And then Certbot, which some of you may have even used to get yourself a certificate. And I'll be talking a little bit about these two today. So EFF has these three different theories of change. We've got lawyers, activists, and technologists. And so we get this wonderful sweet spot of being able to pressure the world to make the world a better place from three different angles. So let's take a trip down memory lane. And this is sort of how all of this sort of really tech-focused part of EFF started. So back in 2006, this is way pre-Snowden. A technician from AT&T literally walked in EFF's front door one day and said, there's some shady stuff going on at AT&T between the AT&T and the NSA. And I think you ought to know about it. And so this was a guy named Mark Klein, who was an AT&T technician. And he came to EFF and told us about essentially how AT&T was letting the NSA tap the Internet backbone. There was this secret room in an AT&T facility in San Francisco. And this was, again, long before Snowden. And so we said, all right, we've got to do something about this. This is warrantless mass surveillance, not cool. Let's try and fix this. So we tried the courts. Our first lawsuit was Hefting versus AT&T. Hefting was an AT&T customer we found who we had reason to believe that their communications had been sucked up by the NSA via AT&T. Does anyone know how this one turned out? So the fun fact is it disappeared because Congress, as soon as AT&T got sued, AT&T ran to Congress and said, Congress, you have to protect us. We were doing this because the DOJ told us to. We were doing this because the NSA told us to. How could we have possibly known that warrantless wiretapping was illegal and we should have challenged it? And so Congress passed a law granting all of the telcos retroactive immunity. And so Congress basically said, AT&T, you've got to get out of jail free pass. And it goes backward in time. So that went away. So then we're like, fine, AT&T, we can't sue you, so we'll sue the NSA. So Joule versus NSA. Joule was another customer whose, again, communications we had reason to believe had been sucked up by the NSA. Fun fact, Carolyn Joule is actually a romance author who lives in Northern California. She's really awesome. If you're into romance fiction, you should check out her books. Anyway, so does anyone know how this one turned out? Didn't disappear. Good guess. Excellent guess. She did not disappear. She's still around. And in fact, so is the damn case. It's been 10 years, and the wheels of justice grind inexorably slowly. It is still ongoing, just because legal lawsuits take forever. And they take especially longer. They take a much longer infinity if you're suing the federal government. And so this is still ongoing. We still hope that we will succeed at some point, but it's just taking forever. And so from our perspective, we're like, well, we don't want to wait for infinity time to get a resolution. We think we can do something a little better. So we tried some activism. How many of you have seen this before? A couple. So then I'm happy to show it to you. So this was a blimp that we flew in partnership with Greenpeace, I think the First Amendment Coalition. There might have been a couple other groups. I apologize for not remembering all of them. And we flew it over the NSA's Utah data center. So this is out in the middle of Utah where they've got this giant data center, which is presumably storing all of the data they're sucking up. And we thought people should know that there's some illegal spying going on beneath that. Of course, that didn't really pressure the NSA to stop. As you might imagine, they didn't really care about a blimp flying overhead. So what about technology? As I said, we've got lawyers, we've got activists, we've got technologists. So what is the fundamental problem? To solve it with technology, we have to define what the problem is we're trying to solve. So this is a slide later released via the Snowden leaks. But it shows you the sort of thing that the NSA was sucking up. And in particular, what you're seeing here is the headers from a connection. And you notice that it's over HTTP. This whole thing is unencrypted. So the reason the NSA can suck all of this mass surveillance up is because it's unencrypted. If it were encrypted, the NSA would not be able to look at everyone's communications. Even the NSA, as far as I'm concerned, does not have the capacity to break everyone's encryption. Assuming the encryption is configured correctly and is up to date, etc. They may still be able to target individuals, but that's no longer mass surveillance. And so then that's going to be a different problem. So we said, fine, the solution is to get everyone to use HTTPS. Well, 10 years ago, none of this was HTTPS. It's kind of hard to believe that just 10 years ago, Google, Facebook, Wikipedia, Twitter, none of them were using HTTPS by default. And so we said, well, let's pressure them. Because what we want to do is get as much traffic on the web encrypted as possible. So let's start with the most popular sites, and then we'll work our way down. So Idea Kitty has a bright idea. We can fix this. So we created the HTTPS Everywhere Firefox extension. So what it is, it's a browser extension for Firefox, now also Chrome. You can also install it in Opera. I'm pretty sure it's compatible with Brave, too, although I don't think you need it in Brave. Because Brave actually incorporates the HTTPS Everywhere list into the browser itself. And what it does is when a website supports HTTPS, but it is not by default, HTTPS Everywhere will upgrade your connection automatically. You don't even have to remember anything. It will prevent any sort of man-in-the-middle style attacks, any SSL attacks, because it says, if that website is on my list of websites that support HTTPS, then I'm only going to let the browser connect over HTTPS. So we launched that. It was in June of 2010. At launch, it was about 1,000 websites. It's now tens of thousands of websites. It also blocked mixed content before the browsers did. Now, I just want to double-check and get a sense of the room. How many people here know what mixed content is? Okay, so about half. So basically, mixed content is when you load a web page over HTTPS, but then it pulls in other resources over HTTP, so like images or JavaScript. And when it's pulling the other stuff over HTTP, that gives an attacker an opportunity to inject malicious scripts, basically, and bypass the fact that the original web page was loaded over HTTPS. So we did that before the browsers did, which is kind of awesome. And now, of course, blocking mixed content is the default for browsers. So shortly after we launched this news... Well, basically, someone else launched another tool, which gave us great motivation and pleasure that we had just launched HTTPS Everywhere. How many people remember something called FireSheep? So, okay, so a couple of people. So FireSheep was yet another browser extension, but what it was designed to do was to listen if you were on an unsecured wireless network or if you're just connected to a wired LAN and it was just broadcasting packets, it would listen to the HTTP connections that other clients, other browsers were making, other computers, and it would say, hey, look, that one looks like a cookie, an authentication cookie for Facebook. And then it would pull that in and it would let you log in as the other person. And again, it was taking advantage of the fact that at the time, even log-in connections were not encrypted. So I could get on FireSheep, I could sit at a coffee shop, and I could basically become a log-in as any person who logged into Facebook at that coffee shop because it wasn't over HTTPS. And so HTTPS Everywhere protects against that, which was great. So we were like, look, this is an active thing, this is an attack that can really happen, and we're protecting against it. Awesome. So great. Wonderful. We've solved the problem. We can go home. The NSA will stop surveilling. Sadly, no. That is not quite how life works. Everything was not awesome. Although we might have been able to protect many sites, not everyone's using HTTPS Everywhere, for one thing. We've got anywhere from 3 to 10 million users, depending on how you count. Fun fact, as a privacy organization, counting how many users you have is really difficult given that we're not collecting that information. But regardless, that is not the entire web. Lots of people aren't using it. And there's still no default HTTPS support. So we said, all right, the real way to protect everyone is to get the actual companies to change. We can put out this browser extension, and smart people can use it, they can tell their friends, they can tell their family, they can tell their neighbors, but it's still not going to reach everybody. So we launched a HTTPS Now campaign, basically pressuring the companies, trying to shame them, and say, why the hell aren't you using HTTPS by default? It's not that frickin' hard. So we made some progress. And it looks like I don't have all of the fonts on my computer, because those were supposed to be green checkboxes. That's what happens when you upgrade your operating system and don't check your slides to make sure that you've got the same fonts. But Facebook and Wikipedia still know default HTTPS, which is kind of ridiculous. So then, along came Edward Snowden, and I'm pretty sure everyone in here knows who Edward Snowden is. And so back in 2013, we got the Snowden leaks, which told us even more of, frankly, what EFF already knew, that the NSA was wiretapping the backbone of the Internet and sucking up innocent Americans' data without a warrant. Not only that, they were collecting phone records, they had this X-Keyscore program, which they would use to look through the data. And this is not good. This came out, and finally, the whole world started to realize, holy shit, this is really awful. And so we decided shortly after that to really turn up the pressure and put out an encrypting-the-web report that would just, in plain, I was going to say black and white, but I guess red and green, show the world, this is what the companies are doing. And if the company is getting undetermined or red Xs, then that means they're not paying attention to your security. And so we put that out. This is actually, obviously, not up to date. This was back when we launched it. Because, obviously, today, most of this would be supports HTTPS, encrypts data center links, uses HTTP strict, etc. As we're going down memory lane, it's fun for me to note that some of these companies don't exist anymore. But at the time, they were important to rank. They were important to put on this chart. So we did that, and we actually made a lot of progress. This pushed a lot of these big companies to adopt HTTPS. So great, we're done again. That was a bit of technology plus activism plus the original technology. We don't have to wait for the courts. It's good to get that precedent, but in the meantime, we're set. We've now thwarted NSA mass surveillance. Well, unfortunately, again, the answer is no. Our job is not yet done. Although we might have gotten the major websites encrypted, overall, the Internet was still not encrypted. So this is a chart from... this is actually courtesy of Mozilla, showing the percentage of page loads over a 14-day moving average that use HTTPS. And you can see, if it's tough to read the text in the back, the dark blue line is all users. And then more recently, Mozilla broke out USA versus Japan users. USA is the one on top. Japan is the one on the bottom. But as you can see, back in 2013, this is like 30%. This is ridiculous. This is less than a third of page loads are encrypted. As you can also see, the story is going to get better, but we'll get to that. So at the time, back in 2013, TLS was not ubiquitous. You log into a site like Quora, and you can just look at the packets. And I know that's really tiny text, but what that's showing is the username and password. You just get on Wireshark, you snip it, and obviously the NSA is doing Wireshark on infinite steroids. So, okay, sorry, this is in 2013. This is June 2014. It wasn't just sites like Quora. It was even the Googles. So, oh, man, I am missing all of the fonts. That's supposed to be the table-flipping emoji. Anyway, in particular to notice here, this is an HTTP page with a link to a sign-in page. And so an attacker could inject and basically redirect this sign-in to wherever they want. Because they could have intercepted this page while it was en route to you, said, I want to redirect this to some URL that's using some sort of homoglyphs and some shady... It will be some domain that looks kind of like Google, but it's actually ours. And so we'll get you to click that, you'll go to that domain, and you'll enter your Google credentials. And so even though Google's actual login is over HTTPS, we're going to trick you into signing in on our page. This is 2015. So why was this such a big deal? Why was this so hard? So the first reason that HTTPS wasn't ubiquitous was setting up TLS was tedious. Like, this is a page from DreamHost about how to set up HTTPS on DreamHost if you were hosted on their service. And it is just... even for an actual sysadmin, it's just a tedious ton of stupid work. Like, it's just a bunch of manual steps. It's also really hard. There's all this... every time a new exploit or new vulnerability in some part, some cipher comes out or something like that, some configuration of TLS, unless you're a crypto expert, you're not going to understand this stuff. And not everyone who runs a website is a crypto expert, nor should we expect everyone who runs a website to be a crypto expert. We want to make the web easy to use both to access but also to put content up there. So, I mean, there are entire books written on how to set up TLS properly. And if you're like a mom and pop shop, you just want to put up your website so that people can see that you've got a restaurant or something, you don't have to read a freaking book to know how to set up your website securely. So, TLS wasn't ubiquitous because the one thing I also missed is it costs money most of the time. You have to pay a service, a certificate authority, to get a certificate that you would then post on your website. You have to pay for that HTTPS certificate. It was also tedious. It was also very hard. So, this makes me sad. But, what if we told you we could fix every single one of those problems? So, back in, I guess, around 2016, EFF started brainstorming. Well, how can we fix this? Like, this is a fundamental infrastructure problem. And so, the answer is to make the infrastructure better. So, we decided to fix that by creating a... I'm sorry, it wasn't even 2016. It was earlier. It was 2014 when we started thinking about it. We decided to create a certificate authority. So, the certificate authority is the entity that issues certificates, which you can then put on your website. That's how the browser verifies the HTTPS connection. And so, the goal of Let's Encrypt wasn't just to make sure that we could give everyone certificates, but it was to eliminate all of the obstacles in getting HTTPS set up properly. Whoops, that was wrong button. So, the first problem, TLS is not ubiquitous. The answer, let's automate certificate issuance and make it free so that everyone can get a certificate and you don't have to follow a bunch of manual steps. So, you can type in one or two commands in the command line and just get your certificate. It will be set up. And the solution to this was we created an open protocol for requesting and getting a certificate called ACME. I can no longer remember what it stands for. It's something certificate management something. But it doesn't matter. The point is, it is a protocol that is open. So, any server, any certificate authority can use this protocol to issue certificates. And in particular, fun fact, Let's Encrypt is no longer the only certificate authority using ACME. I believe... man, I'm forgetting which one. There's another major certificate authority that is now also using ACME. I forget if it's Komodo or the result of Komodo or something else. But the open part of it worked, which is exciting. So, how ACME works. First, there's an ACME client. This is your web server. The client is the thing that wants to get the certificate so they can put it on a web server. And then there's an ACME server, the certificate authority. A lot of you are probably thinking, wait a second, we can't just give out certificates willy-nilly because then I could request a certificate for Google.com and then I could spoof Google and scoop up everyone's Gmail passwords. And so the way it works is the ACME client tells the server, I want to search for example.com and here's the public key I want to put in that certificate. And then the server, again, this is the certificate authority, says, OK, that's great. Here's a nonce. Here's some random string and I want you to post it at example.com slash nonce and sign it with the corresponding private key. And so what that does is first, that verifies that if I can post it at example.com slash nonce, that pretty well establishes that I have control of that domain and the server that is serving content from that domain. Because what will happen is I'll say, great, it's posted. And then the ACME server is going to just try to get that nonce. And if it can get that nonce over, and of course, there are a couple of other issues with this. So if there was DNS hijacking, that would defeat this. So we are relying on DNS. Another thing that we're looking at implementing, and if this is going over your head, don't worry about it, is doing this from multiple perspectives on the Internet so you can't just hijack one route. But basically, if the server can get that nonce, then it knows this machine I was talking to controls this domain and also can put stuff on the web, on port 80 for that domain. And so if that's enough, if it can do that, then it can do whatever it wants on that domain. So that's good enough. It obviously has control. And so the server will get that nonce. Of course, the web server will respond with the nonce and the signature. And then now the ACME server knows this web server controls the domain, can put content there, controls the public key because it signed that nonce with the private key. And so of course the ACME server can verify that. And so then it says signature checks out, so you control the public key, you control the server, you control the DNS, so here's your certificate. And so now in an automated way, this is all happening over the ACME protocol, you can get a certificate and prove that you control the domain. So that's how the protocol works. How do we actually get that certificate on the other side? So what we do is we created a client or an agent that basically gets it right. We created a piece of software you can use over the command line, very simple, that will not only use the ACME protocol to talk to the ACME server, get the certificate, but also if you're using Apache or NGINX, it will install the certificate and configure it for you. So you don't even have to think about like, where do I put it, how do I set this up, what cipher suite should I be using, it will use sensible defaults and do it for you. Again, it will tweak your existing web server to pass those challenges, so what I just showed you that back and forth was called a challenge. It will install the cert, it will tweak the security options, plus it's going to automate renewals, certificates expire. And in particular, since we're doing this in an automated fashion, what we decided was we wanted a very quick expiration just in case something went wrong. And so let's encrypt certificates expire after 90 days. And nobody is going to always remember to renew their certificate, I guarantee you. So because computers are good at doing things on a schedule, we'll have the computer do it for you. We'll have your server automate the renewal and some of these security response tasks. So what kinds of automation happen? Well, like I said, easy ones, cipher tuning, if you're doing OCSP, OCSP stapling, you could also set up upgrade insecure for content security policies. There are some features where if you want to do redirect from HTTP to HTTPS by default, then you can tell this software, which is called Certbot, you can tell it, I've set that up on my server too, so I don't even have to think about it. So install the cert and set up automatic redirects to HTTPS. What we haven't quite gotten to yet is full rewrites. So if you want to actually automatically rewrite all of the content on your web server to use HTTPS instead of HTTP, like if you've got hard-coded links, Certbot doesn't quite do that yet. That's a little bit harder, but it does support HSTS, which is a protocol that a web server can use to say, when you connect to me, always use HTTPS. It's kind of like the server's way of saying, use HTTPS everywhere, essentially. And then there's even harder stuff like mixed content auditing and correction and HTTP public key pinning, which we're probably never actually going to implement. But this is the software. It's called Certbot. It'll do all of those things. Not only that, it supports plugins. So if you want it to work on a different web server, you can write a plugin for that. There are different challenges. So the challenge I showed you is just one challenge. There's also other challenges. Say you want a wildcard certificate. So you don't want a certificate just for example.com. You want one for star.example.com. That's a different challenge. You have to actually do the challenge over DNS. And thanks to various plugins, Certbot will automate that for various DNS providers, too. It works on most Unix-based systems. And pretty soon it's also going to work on Windows, which we're really excited about. So actually this is not current events. This is, God, eight months ago events. So this is just giving you an example. As some of you probably remember, the U.S. government shut down about eight months ago. And all of a sudden a bunch of websites went down, U.S. government websites, because their certificates weren't renewed. They should have been using Certbot. Obviously that would have been solution one, automating renewal. You might as well automate this task. It's easy. Maybe the other solution is don't shut down the government over stupid budget disputes. But this is not a political talk. EFF is a nonpartisan organization. No, I'm just kidding. Encryption is inherently political. Encryption may not be partisan, but it is political in that it does equalize power. It allows people who normally wouldn't have the power to keep their information, their communication secret, secret. And that's part of why EFF does its work. We want to give everyone this ability. So anyway, HTTPS for everybody. We've got Let's Encrypt. We've got Certbot. We've got security. It's usable. We've got transparency with Let's Encrypt now being part of certificate transparency. We're great. We're set, right? And the answer is actually, yeah, we did pretty awesome. So this is a chart of how many fully qualified domains are using the Let's Encrypt certificate authority. And so you can see back when we launched, when we actually went into a public beta, and, God, this thing's actually a year old and it's at 140 million certificates. So this blue line is fully qualified domains, and that's 140 million. The dotted line in the middle is certificates active. So there could be multiple domains per certificate, which is why that number is lower. And then this is the number of registered domains that are active. So no matter how you slice it, basically Let's Encrypt is now the largest certificate authority in the world. And so we are basically a fundamental part of encrypting the Internet, which I think is pretty awesome. And if you look, I think we had something to do with this upward trend. Now, to be clear, Let's Encrypt didn't single-handedly make this trend go from 30% encryption to, at the beginning of 2019, almost 80% encrypted page loads. There were other things. The browsers definitely helped. When Google and Firefox decided to say, we're going to work pages as insecure instead of secure, so that people start feeling creeped out when they're using an HTTP page, that definitely helped. Because now sysadmins are like, well, crap, I've got to upgrade just so my website doesn't look shady. Other things that look good, HTTP2 is going to be encrypted by default, and that is the only way it will be supported by all of the major browsers. So if you upgrade to HTTP2, the answer is, everything is going to be encrypted. But there's more. EFF is not satisfied with just the web. The web is not enough. There are other things that we want to encrypt. And so for the last 20 minutes of this talk, I'm going to be talking about a couple of other things that we really want to see get encrypted. So, in order, they are TLS, SNI, and I'll explain what all of these are, encrypted DNS, and start TLS. So, SNI. So this is a weird quirk, and all credit due to CloudFlare for making this awesome image, which I am using as fair use, because I work at EFF, and I know what that means. When you go to an HTTPS page, there is still information being leaked. And in particular, I know it's really tiny to see, but, so this is the website you're going to visit. When you send the initial connection to that web server, you have to tell it, this is the domain name I'm trying to visit, and that has to be sent in the clear at the moment. And so that gets leaked. The actual page you're visiting, so if you're visiting example.com slash index.html, the index.html gets obfuscated, but example.com gets leaked. And in particular, if this is sitting on a CDN, then that's telling the adversary which domain you're visiting. Because it could have been example.com, it could have been EFF.org, if they're all on the same CDN. But now the adversary knows. And so they can see that. And then, again, after that, everything is sent encrypted, but not until the adversary, someone listening on the wire, can know what domain you visited. So the solution? Encrypt the damn thing! So encrypted SNI... oh, I should mention. SNI stands for server name indication. It indicates to the server the domain name that you're trying to visit. So the solution is to encrypt it. And so there is now a RFC out there. It's still a bit in flux. But you can now essentially send that server name in an encrypted way by getting a certificate ahead of time. And so now the adversary cannot tell what domain you're visiting. So great. But what about this side over here? I've been pointing over at this side. I've conveniently ignored the DNS side of things. That is still going to leak the domain name you're visiting. Because DNS, by default, is sent in the clear. It's an unencrypted protocol. And again, if an adversary is listening in, they can see that. So let's just encrypt all of it. Let's encrypt the DNS, too. So there are currently two different protocols that are competing for encrypted DNS. One is called DNS over HTTPS, and it's exactly what you think. It sets up an HTTPS connection and then makes a DNS query over it. And the other is DNS over TLS, which also is exactly what you think. It sets up a TLS connection, but doesn't build the stack all the way up to HTTPS. It just sends the DNS request over TLS. And they have some different pros and cons. DNS over HTTPS, it's harder for censorship-prone regimes to censor. And the reason is, it looks like HTTPS traffic. Unless you start doing a serious traffic analysis, it just looks like something going over port 443. And so the only way to censor it is to block all of the HTTPS traffic. The downside, it's harder for network operators to monitor for malicious activity because it looks just like all other HTTPS traffic. And so if there's malware in your network and it's making DNS queries over HTTPS, it's going to be very difficult for you to tell that versus other HTTPS traffic. And it's basically the inverse for DNS over TLS. EFF does not have a strong position on either of these. We just want to get DNS encrypted. So if you have a strong position on either of these, come tell me. I won't promise I will be fully convinced, but I am open to hearing good arguments for either side. Either way, this is the future. Encrypted DNS is the future. And we're going to see, we believe, ISPs and also other providers, DNS providers, move towards encrypted DNS. And in fact, EFF is going to do another encrypting the net scorecard before too long and both of these things are going to be on it. Does your website support ESNI? And if you're a DNS provider, do you support DOH or DOT? Don't ask me when. It will happen in the impending future. But certainly if you work for a company, you should be thinking about these sorts of things. Certainly if you work for a company that will get on EFF encrypting the net scorecard, it's coming. What about e-mail? So far I've been talking mostly about web stuff. DNS supports the web. E-mail is the cockroach that will not die. When the singularity has come and the hive mind, as we are all part of the hive mind, the hive mind will still communicate with itself via e-mail because e-mail will not die. So we need to fix e-mail. So the way e-mail works is you're on some client, either you're on Gmail's webmail client or you've got Thunderbird or something. And when you're communicating to your e-mail server, it's probably encrypted. And then when your friend is reading their e-mail again, they're talking to their e-mail server, it's probably encrypted. But there's this thing in the middle between e-mail servers that may or may not be encrypted. And that's an issue because that is a point where an adversary could listen in on e-mail. And so there's this protocol called start TLS which is meant to solve this. And the way it works is essentially what happens is when these two mail servers are talking to each other, the first one will say, hey, do you support start TLS? Do you support TLS basically? And then the other one will say, sure. And then they'll say, okay, great, I'm going to set up a TLS connection to you and everything will be encrypted. The problem is that first message is sent in the clear. And so if there's a man in the middle attack, when this first server tries to connect, Google will say, yeah, I support TLS. Let's do this encrypted. But the man in the middle will just strip that right out. And the first mail server has no way of knowing that that's happened because all of this was sent in the clear. There's no authentication. There's nothing. And so it's trivially simple to strip that out. So that's a problem. Additionally, so the other issue is that many mail servers, even if they do support start TLS, they're using self-signed certificates for that TLS connection, which means that nobody on this end is ever checking the authenticity and verifying the certificate. They're not trying to say, does this chain up to a valid certificate authority, to a root certificate? And so again, an attacker can sit in the middle and provide their own self-signed certificate, and the originating mail server sending the mail is going to be none the wiser. And actually, since on this side they're not checking the certificate either, Google isn't going to be any the wiser. And so both of these mail servers will think, oh, everything was fine, the connection was encrypted. But in fact, there was an attacker in the middle who was encrypting traffic to Google, decrypting it, re-encrypting it to EFF, EFF would send traffic, and then they'd decrypt it, re-encrypt it, et cetera. So it's, again, a really big deal. And this isn't theoretical. 20% of the Alexa top million domains that support connections, incoming email connections, don't use start TLS. 40% of them present invalid certificates. And I don't know what the hell is going on in Tunisia, but 96% of the traffic is stripped of those start TLS headers. So someone is actually going in there and removing the start TLS header and preventing the encryption. Also, what the hell is going on? Like, you know, maybe I understand that a lot of these places are in, you know, like Uzbekistan. Maybe I don't expect Uzbekistan to have the best security on the network. What the hell is going on in Denmark? Like, 4% of traffic of the TLS is being stripped. Also, this was in 2015, I should note. So it can be a little bit out of date, but it's definitely happening. So trivial downgrade attacks, trivial impersonation attacks. The solution is a new specification called MTA-STS, which stands for Mail Transport Agent Strict Transport Security, which is basically a... well, let's get into it. It's a way for a mail server to say, always use TLS to connect to me. So the way it works is say I've got... I use EFF, and I'm trying to send mail to somebody in Google. So first, my mail goes to the EFF mail server, and then it's trying to figure out what do I do with this. So it goes to the DNS provider. And it goes to the DNS provider and says, hey, does gmail.com have a particular text record in its DNS corresponding to this MTA-STS field? And then presumably Google has already set this up ahead of time. And it says, yes, here's this record. And the record points to an HTTPS address. The HTTPS address hosts gmail's MTA-STS policy. The policy is basically just saying, here's a text document which says, these are the servers that you should be... If you're trying to send mail to gmail.com, these are the actual MX addresses that will answer for that. Also, you can be in testing or enforced mode. If you want to make sure your configuration is working before you start rejecting email and mass, you can put it in testing mode. And that way, even if things don't check out with MTA-STS, in testing mode, the sending mail server is still supposed to send the email. It will post a log to you saying there were these issues, but you won't start getting mail rejected. So this web server says, okay, here's the MTA-STS policy. And then I go to gmail and say, let's start a TLS connection. And then gmail says, great. And then you get your TLS connection. And so what would have happened if there was this attacker in the middle? Well, let's say that this destination was in gmail.com's MTA-STS policy. Let's just assume it's gmail.com. Then essentially what will happen is, I will try to start the TLS connection. The attacker will strip out that start TLS header. And then I'll say, holy crap, something's going on. According to gmail's policy, it's supposed to be using TLS. It's supposed to be encrypted. So I'm not going to send the e-mail if it's in enforced mode. I'll still send the e-mail if it's in testing mode. But either way, the other part of the policy is basically a reporting mechanism. You can either send the report over e-mail or post it to a specific URL. But I can essentially communicate to gmail that something shady went on, so either you didn't get the e-mail or I still sent it to you, but somebody was trying to strip away this encryption. So that's great. How do we actually get this out in the wild? How do we actually make this happen? Well, we started a project called start TLS everywhere. And the goal of the start TLS everywhere project is to promote the spec, get mail servers to use it. It will also maintain a start TLS policy list. So as you probably noticed, there is this potential still for a downgrade attack if a attacker can intercept your DNS requests. And basically say, you know, we go back to this point right here. And say, does gmail have a MTSTS text record? And if they can intercept that first request and say no, then I will think, oh, gmail doesn't support MTSTS. And so what the start TLS everywhere policy or the start TLS policy list is, is it is a preloaded list that you can download from a different channel. It's basically an out-of-band way to get a list of websites that support MTSTS. And so now an attacker would not only have to intercept your DNS, they would also have to basically block your ability to connect to EFF's website. And if that's happening, then probably something shady is going on if you can't connect to EFF's website. We also want to lower the barriers to entry. It's really hard to run a secure mail server in the same way it was hard to run a secure web server. So in terms of promoting MTSTS adoption, there are a couple steps. First, we have to make sure that mail servers actually support start TLS. Then we have to make sure mail servers can get certificates. We have to make it easy for sysadmins to receive those failure reports because no sysadmin is going to set this up and be like, man, I don't care if e-mail isn't getting through anymore because if the e-mail isn't getting through anymore, you get fired and then you don't have a job and then it doesn't matter what great security things you did. So we want to make it easy for sysadmins not only to receive those failure reports but also to post them to other mail servers when you are sending the mail. And also make sure the MTS software finally knows how to check for and use MTS policies. So there's actually quite a few steps to make MTS work. So how are we going to do this? Well, step one is the good news is mail servers already all support start TLS. Maybe they are not configured to use it but they all support it. Step two, getting a certificate. Well, the good news is we happen to already have some software you can use to get a certificate. So you can use certbot and we have guides for how to use certbot to get a certificate for postfix, XM, send mail. You can check out all of these if you run a mail server and it will walk you through. This is how you get a certificate. This is how you install it. It is not quite yet just one click and it installs it for you. That was actually due to a lot of feedback we got from sysadmins who told us my mail system set up is so convoluted I don't want you touching it. Just tell me where to put the certificate. I will take over from there. That is what we did. Here is how you get the certificate. You put it wherever you want. If you are using a default install, here is where you put it. That was supposed to be a green check mark again. Sorry about the fonts. Step three, receiving failure reports. This is the RFC for MTSDF and in particular it is a complimentary RFC for the reporting part. The report may be delivered by e-mail. The good news is if you have a mail server, it can send e-mail. And it can also receive e-mail. All we have to do is basically set it up so that when your mail server encounters some sort of error trying to connect, we just have to set up so it can send a report over e-mail. We don't have to create a new web server for you to receive reports via post or anything like that. We are just going to say do it over e-mail. It is fine. Posting MTSDS records and policies. This is like how do I actually tell the world that my server supports MTSDS? To do this, this is something we are still working on. Basically on the start TLS everywhere website, we are going to have basically a form you can fill out where you put in the details of like this is my MX domain. This is the actual domain for e-mails. This is where I am going to post my policy. And then it will turn all of that into a valid MTSDS policy and tell you what DNS records to put it in. We are working on that. It is basically a web tool you can use to generate the policies and guide you through how to set it up. It is not quite ready yet, but it is something we are working on. And then last but not least is getting MTAs to actually use MTSDS. This is actually getting the actual mail transfer software. This is getting DoveCod or XM or SendMail to actually pay attention to request the policy now that you have it posted. And then to know how to use it. What are the options here? One, we could submit patches directly to SendMail and XM, et cetera. But sysadmins upgrade their MTA about once every lifetime. There are tons of really obsolete MTA software out there running. And so even if we got patches in, it would take forever to finally upgrade and actually get that in the wild. We could write a middleware application that sits in front of MTAs. And so the MTA is oblivious and then it is connecting to this middleware application that is then paying attention to all the MTSDS stuff and otherwise routing things to and back through that MTA. It is one more thing to administer. It adds some complexity, but it also reduces other complexity that the MTA doesn't have to know about start TLS or the MTSDS. Maybe there is another option. If you have an idea, come talk to me. This is a problem we are still trying to solve. We are still trying to figure this one out. So we have our work cut out for us, but we think the future looks bright. We have come a long way in ten years from just a little browser extension to an encrypting the web report to actually launching a freaking certificate authority and being the biggest certificate authority in the world, launching the start TLS everywhere project, and we are really excited to see where we go from here. Before I finish up, credit where credit is due. This is the work of a tremendous number of people who have worked at EFF, but also at other places. People have worked at Tor project. It's just everywhere when we launched was a joint project with Tor. A bunch of people have worked on Let's Encrypt and Certbot. Let's Encrypt, I should say, wasn't just an EFF thing. We worked with Mozilla and the University of Michigan to initially get it off the ground, and now there's a whole host of sponsors that keep it alive. If you don't donate to EFF, you should donate to Let's Encrypt. I think you should donate to EFF, but you should also donate to Let's Encrypt. So credit where credit is due, a bunch of people have contributed to this work. And the reason we have been able to do all this amazing work is thanks to members like you. Your public support directly, as almost all of you know, EFF is a member-supported nonprofit, directly translates into this sort of technical work. We couldn't have a team of 15 or so technologists on staff to do this work without your support. And to be clear, this is a... I don't know if our 2018 chart is up yet. This shows you where our money comes from. And in particular, these three things right here are all individual donations. Whether it's individual or like individual but it's employee matching, that's basically individual. It's not like Google gets to decide where their employees choose to donate. They just match it. This part right here, this is sheer luck. This is when we get an award in the courts. And this is not when we're in a lawsuit. Sorry about that. This is when another entity has filed a lawsuit and the answer is instead of giving a dollar to every person in a class, let's give it to an entity that is going to do some good for privacy or security. And we can't control that. We can't rely on that. And this is us begging actual foundations for money. Even though we have foundation in the name, we don't give out money. We take in money and turn it into an awesome project. So as you can see, the majority of it is from individual members. So on behalf of everyone at EFF, thank you, DEF CON, for your tremendous support over the years. Thank you for making work like this possible. And I'm happy to take any questions. We don't, EFF doesn't personally or like as EFF work closely with Linux foundation, but as you said, Linux foundation does essentially do the administration and overhead for ISR G, the organization that actually runs Let's Encrypt, which is pretty awesome. That way they don't have to hire an HR person or accountants or stuff like that. They can focus on Let's Encrypt. Yep. Yeah. Not yet. Are you talking about... So I'm pretty sure ES and I is a different thing, I think. I would have to go double check. Yep. We have seen that sort of argument. From our perspective, the... We feel like the right tradeoff is that for given that... I guess the way I would put it is normal users don't have the same resources to invest in making sure that their traffic is encrypted as a corporation does. And so we feel like the right tradeoff is to get... Basically get as much encryption as possible and then if a corporation does need to do that sort of TLS termination, the answer is... It's kind of a side effect of making the web more secure for everyone, I guess. I definitely get it. Yeah. But it's true, yes. It does... Yeah. Yep. Yep. Absolutely. Yeah. Yeah. So in particular, this is... That's an interesting one. So I can think of two cases. One, cloudflare actually rolled out ESNI in south korea. I think it was either earlier this year or late last year. And basically ISPs in south korea, I believe at the direction of the government, just started blocking ESNI. Just straight up because they could no longer look at the domains that you were trying to connect to. Similarly... Related. About a month ago now, I think it was, an industry organization of ISPs in the united kingdom nominated of all organizations mozilla as their internet villain of the year. Because mozilla wants to push forward encrypted DNS. Now, to be fair, what mozilla... Because ISPs don't yet support encrypted DNS, what mozilla is thinking of doing is cloudflare has a centralized DNS server and they're supporting encrypted DNS. And so... It hasn't rolled out yet. And from my understanding, I think what mozilla is thinking about doing is if you're in the U.S. Where the privacy laws are crap, then they will turn that on by default. Because frankly, cloudflare has a better privacy policy than most U.S. ISPs. However, that's not true in europe or the united kingdom where there are actually decent privacy laws controlling what your ISP can do with your private data. And so they're thinking that it will be an opt-in there. But regardless, in the U.K., there is an obligation by the ISPs from the government to censor for all sorts of silly stuff, adult content, terrorist content, whatever. And because the ISPs, if you're using cloudflare's DNS in an encrypted way, could no longer do that censoring, they got really up in arms and they said, oh, my god, this is terrible. They later rolled it back once they realized that not everyone was against mozilla doing this encrypted DNS thing. But certainly in, you know, countries where there are, I would say is democratic rule of law, we are still seeing pushes for censorship. Or the ability to censor. And so that's not even touching places like China or Iran or something else like that. Yeah. So I think from my perspective, the way to do that, that is the way to, that's the destination. You have to get there slowly. Because if you do that immediately, people will just stop using your software. And it's just, it's just a sad, like, we won't stop using that software. Because we'll be like, what the fuck's going on? Someone's trying to intercept my traffic. But, you know, my nieces and nephews, my friends, they're just going to stop using that software and switch to something that works. And so the trick is, I feel like, to raise the bar slowly. And by raising it, basically it's kind of like this boiling frog approach. Until you get to the point where there is no longer anything else to switch to. Because everything is encrypted. Yeah. Acme protocol. Yep. So there's a couple things. One of the things that they're working on, I don't know if it's rolled out yet, is basically doing multibandage point verification. So that you would have to man in the middle, not just, you know, let's encrypt servers. Well, they're going to do it via Tor. So you would have to man in the middle a bunch of unpredictable Tor nodes as well. And so if they do like three or four of those from different exit nodes, you know, then that's a much, I mean, that raises the barrier. It's still possible, right? Like, you know, eventually, you know, someone who controls all the Internet traffic could man in the middle it. Yeah. Yeah. So that's, I was going to say, I think there was another thing. But that's the big one that they're working on. It's not there yet. The other thing is there's a thing called certificate transparency. I'm sure many of you have heard of it. But now let's encrypt logs all of its certificates to certificate transparency servers. And so if you run a domain, you can essentially log into these certificate transparency servers and say, did somebody issue a certificate or did let's encrypt issue a certificate from my domain? And was that me? If I don't, if I'm not using let's encrypt and that happened, or I am, but I go look in my server logs and certbot doesn't say recently renewed my certificate, something shady is going on. So that's detection, not mitigation. But detection is still helpful while we're working toward mitigation. All right. Thanks very much, everybody. Thank you. Thank you. Thank you. And thanks for coming.