text
stringlengths
0
1.49k
[848.96 --> 849.14] Yeah.
[849.32 --> 854.84] So the project I've been working on for the last few months, quite a few months now.
[854.98 --> 855.20] Wow.
[855.88 --> 857.28] Is TLS 1.3.
[857.28 --> 863.96] So the short version of the crypto like pitch is that TLS 1.3 is the new version of TLS.
[864.26 --> 871.04] It's not about getting cryptographers jobs security, but instead about making the protocol
[871.04 --> 873.80] actually more robust against future attacks.
[874.04 --> 879.78] So it's a complete like rework and it takes one less round trip to connect to things.
[879.78 --> 883.82] So it's faster and a bunch of other things that if you're interested in,
[883.82 --> 888.00] there's a talk at CCC 33 C3 that you should watch.
[888.70 --> 895.48] But point is we wanted to implement TLS 1.3 and, you know, participate in the standardization
[895.48 --> 898.28] process with a real implementation deployed.
[898.52 --> 903.32] So we wanted to take a TLS stack and add 1.3 ourselves.
[904.14 --> 909.98] And I essentially threatened to quit if they've made me do it on OpenSSL.
[909.98 --> 912.50] Well, no, I'm joking.
[912.64 --> 913.52] Nobody asked me.
[913.94 --> 917.04] They just asked me what to use as a base.
[917.18 --> 924.00] So I just jumped straight to CryptoTLS, the standard library of Go, which is a wonderful
[924.00 --> 929.94] stack written originally by Adam Langley, which a lot of people in the industry say that it's
[929.94 --> 932.52] what they go to to understand TLS.
[932.52 --> 938.08] Like they read the spec, they fail to understand it, they go to CryptoTLS, they read the code,
[938.18 --> 940.26] they go code, and now they understand things.
[940.64 --> 942.20] So that was the starting point.
[942.84 --> 946.22] And we extended it to have TLS 1.3 support.
[946.56 --> 948.74] We worked most on the server side.
[949.36 --> 954.20] And it's now deployed globally on millions of cloud for sites.
[954.62 --> 957.80] Literally, like if you just sign up for a free account, it's on by default.
[957.80 --> 963.44] And the nice thing we like don't talk that much about, but you can definitely like gather
[963.44 --> 969.90] is that if our TLS 1.3 stack is in Go and you can use Go to connect to Cloudflare sites,
[970.50 --> 975.56] it means that sometimes when you connect to Cloudflare, actually in the HTTP pipeline,
[975.84 --> 979.30] there is a Go HTTP reverse proxy.
[980.10 --> 983.44] So all of the Cloudflare reverse proxy stuff is written in Go?
[984.00 --> 984.86] So no, no, no.
[985.38 --> 987.48] Cloudflare is a Nginx shop mostly.
[988.22 --> 996.08] But if you connect with TLS 1.3 enabled, Nginx will poke our Go stack and ask if the Go
[996.08 --> 997.62] stack wants to take over the connection.
[998.50 --> 1003.34] And if it wants, it will just pass on the file descriptor and the rest of the connection
[1003.34 --> 1006.94] will be passed through a Go reverse proxy.
[1007.80 --> 1010.38] Does the Go stack get to have like a bad day?
[1010.56 --> 1012.64] So can it say, you know, I'm just not interested today?
[1013.38 --> 1014.20] Yes, yes.
[1014.34 --> 1016.74] That was actually one of the like safeguards.
[1016.74 --> 1024.10] I was like, you know, as a team of three people total on the crypto team, mostly me working on it.
[1024.16 --> 1029.74] I'm not going to like take over the main Cloudflare reverse proxy.
[1029.74 --> 1038.60] But like we have this nice fallback system where Go SSL can literally explode and only like open connections will suffer.
[1038.76 --> 1041.52] Everything else will just downgrade to TLS 1.2.
[1042.06 --> 1042.40] Nice.
[1042.40 --> 1045.64] So I'm trying to follow the beginning of the conversation.
[1045.90 --> 1050.66] Did you say that the crypto TLS package can be used in the place of open SSL?
[1051.32 --> 1051.48] Yeah.
[1051.82 --> 1060.88] You almost never, you essentially never use open SSL when you host a Go server that has HTTPS and TLS.
[1061.32 --> 1065.02] You use the native Go implementation of TLS.
[1065.02 --> 1070.08] And we build TLS 1.3 into it and we're looking to upstream it.
[1070.66 --> 1073.12] So I know that open SSL has a lot of bugs.
[1073.64 --> 1081.78] And would you recommend to people to use script TLS and use Go instead of using whatever they're using with open SSL?
[1082.34 --> 1084.26] In your opinion, is it a lot better?
[1085.04 --> 1086.02] Is it less buggy?
[1086.78 --> 1092.50] So it's definitely like it has a better security track record at this point, we can say it.
[1093.12 --> 1094.52] It's less battle tested.
[1094.76 --> 1098.94] I think we are currently the widest deployment of it, I suspect.
[1099.80 --> 1100.98] It did pass an audit.
[1101.42 --> 1102.50] We paid for an audit.
[1102.70 --> 1103.30] It passed.
[1104.34 --> 1110.86] But let's say that if you are just putting Nginx in front of your site just to have open SSL in front of your site,
[1110.94 --> 1114.46] but your site is a Go service, you should probably stop doing that.
[1114.66 --> 1115.24] There's no need.
[1115.24 --> 1122.28] If saying that I'm suggesting to actually go out of your way to remove open SSL by adding some Go in front,
[1122.90 --> 1125.90] I mean, there are architectural decisions to be made there.
[1126.44 --> 1132.36] Performance-wise, it's probably slightly slower or more CPU intensive, at least.
[1132.98 --> 1133.18] Gotcha.
[1133.88 --> 1137.72] And now, what does TLS 1.3 offer over 1.2?
[1138.12 --> 1140.62] What was the motivation to kind of write that now?
[1141.10 --> 1142.60] So it's twofold.
[1142.60 --> 1144.58] There's better robustness.
[1144.86 --> 1150.06] A lot of things that were creaky and we weren't really sure about were just removed.
[1150.06 --> 1157.88] The policy was, if it doesn't have a very good reason to be in the protocol, cuff, cuff, heartbeat, cuff, cuff.
[1158.28 --> 1160.36] It's not going to be in the protocol.
[1160.36 --> 1166.30] And on the other hand, performance-wise, it cuts an entire round trip.
[1166.30 --> 1173.06] So when you connect to a website, you first do the TCP handshake and that still happens.
[1173.60 --> 1182.88] And then in TLS 1.2, you had to do two round trips to the server and back to the server and back before you could start sending real data on the connection.
[1182.88 --> 1185.42] Now, with TLS 1.3, you do only one.
[1186.10 --> 1192.46] You send the client, send something, the server responds, and we're ready to go with one less round trip.
[1192.92 --> 1199.36] And round trips on mobile networks or in some countries, we are talking seconds sometimes.
[1200.02 --> 1207.70] Yeah, I can see that, especially if it's a lot of connections kind of opening and closing rather than keep alive-based connections.
[1208.30 --> 1211.14] There's a lot of added latency there for that additional round trip.
[1211.14 --> 1212.48] Yeah, indeed.
[1213.08 --> 1216.30] So is that mostly what you work on at Cloudflare is crypto?
[1216.92 --> 1220.80] Yeah, these days I'm full-time on the crypto team.
[1221.34 --> 1224.18] It's a young team that is growing.
[1224.56 --> 1225.46] It's pretty fun.
[1225.64 --> 1229.98] It's a research team that gets to actually deploy code to the world.
[1230.50 --> 1231.26] It's fun, definitely.
[1231.26 --> 1241.44] And for anybody who has not seen it, Filippo actually gave a talk at GopherCon last year about crypto and the different ciphers and things like that.
[1241.70 --> 1248.52] And you closed that with some recommendations on which specifically to use and which not to use, if I recall.
[1248.52 --> 1253.66] You might be mixing me up with George Dunkesley.
[1254.24 --> 1254.86] Oh, that's right.
[1254.94 --> 1256.42] Yeah, that was George that did that.
[1256.58 --> 1262.48] But that's understandable because, I mean, not at the time, but in the meantime, he became a colleague of mine.
[1262.48 --> 1268.58] And he's now the second member plus the manager of the Cloudflare crypto team.
[1269.18 --> 1273.80] Well, I think that's because we were all up until 2 a.m. in one of your hotel rooms listening to those talks.