[00:00.000 --> 00:04.720] All right everybody, thanks for being here. We're going to kick off our next talk with speaker [00:04.720 --> 00:11.580] Christian Paquin and he'll be covering migrating to quantum safe crypto to protect against the [00:11.580 --> 00:24.140] quantum hacker. All right, thank you very much. Thank you. I'm very happy to be back this year [00:24.140 --> 00:33.240] to discuss our progress towards migrating to post-quantum cryptography. The work I'm [00:33.240 --> 00:40.480] presenting today is in collaboration with a lot of people, some in my team at Microsoft Research, [00:40.480 --> 00:46.560] also with some other organizations, but for this particular work has mainly been done with [00:46.560 --> 00:53.840] Douglas Sibila at University of Waterloo. So I don't know if you remember, or some of you [00:53.840 --> 01:01.380] might not have been born, 20 years ago when South Park introduced these very weird characters, [01:01.380 --> 01:08.460] little gnomes, and they went around and they had a plan to make money, a kind of an interesting [01:08.460 --> 01:15.220] business plan. They would go around steal people's underpants and then with some unknown way they [01:15.220 --> 01:23.000] would try to make a profit. I'll get back to these guys later. But on an unrelated note, also something [01:23.000 --> 01:28.880] that happened 20 years ago is that I started to study quantum computing in my graduate studies [01:28.880 --> 01:37.160] at the University of Montreal. It was a fascinating subject and I kind of abandoned it. I came back to it [01:37.960 --> 01:44.920] a few years ago, this time not trying to use quantum computing but trying to defend against it. [01:46.540 --> 01:55.600] Because I'm sure you all know that... was that not on before? Okay, so I'm sure you all know that [01:56.160 --> 02:01.340] quantum computers, although they would be fantastic for the field of algorithmics, [02:01.340 --> 02:04.820] you can solve a lot of problems more efficiently, for the world of cryptography [02:04.820 --> 02:12.920] it's really bad news. Because a quantum computer would break due to Shor's algorithm. [02:13.300 --> 02:20.080] It would break RSA and DSA elliptic and BCDH and all the elliptic curve variants [02:20.820 --> 02:27.680] essentially because it can solve the underlying mathematical problems on which these schemes are [02:27.680 --> 02:35.000] based. Namely they can factor and find a discrete log of numbers very efficiently in polynomial time. [02:35.400 --> 02:42.280] What does that mean? It means that a quantum computer would break all the public key crypto [02:42.280 --> 02:49.680] we use today. And by that what I mean is that it would break HTTPS, TLS, it would break SSH, [02:49.680 --> 02:55.810] would break peer-to-peer communication messaging systems like Signal, break certificates, [02:56.300 --> 03:00.720] software update channels, and bitcoins. If somebody has a quantum computer it could steal [03:00.720 --> 03:06.720] all the bitcoins. And there's another algorithm that's important in quantum computing it's called [03:06.720 --> 03:13.240] the Groover's algorithm. It affects hash functions and symmetric primitives like AES, [03:13.240 --> 03:19.480] but that's not a big problem. We can just double the key sizes, the hash sizes, and we're fine. [03:19.480 --> 03:25.810] Shore is really the main problem here. And there's a wide spectrum of [03:28.960 --> 03:34.820] estimates of when a quantum computer will be built. Some people say it will never be built, [03:34.820 --> 03:41.640] some people say it's going to be done in five years, but there's a wide consensus in academia [03:41.640 --> 03:47.280] and experts that say a specialized quantum computer could be built within a decade or two to break [03:48.400 --> 03:55.540] RSA. So that means that we need to start thinking about migrating to quantum-safe cryptography. [03:56.340 --> 04:02.940] So quantum-safe cryptography or post-quantum crypto is not cryptography that runs on a [04:02.940 --> 04:10.140] quantum computer. It's a type of algorithmic schemes, cryptographic schemes that run on [04:10.140 --> 04:15.460] normal computers, but for which we know no way to break them with quantum computers. [04:17.020 --> 04:24.720] So I get asked often, like, why do we care now? Why don't you just tell me a year before the [04:24.720 --> 04:29.840] quantum computer is going to be built and then we're going to scramble and rush to fix everything [04:29.840 --> 04:36.660] like we did for Y2K a year before? That's a valid argument. The problem is that the data we encrypt [04:36.660 --> 04:44.520] today on the web is at risk. It is at risk of being captured now, stored for a couple of years, [04:44.520 --> 04:52.000] and then decrypted. So if you're sending important data, trade secrets, or if you're a [04:52.000 --> 04:57.900] whistleblower and sending confidential information, then if this data can be decrypted in 10 years and [04:57.900 --> 05:04.460] ruin your life, then you need to start protecting it differently today. Another problem is that [05:04.460 --> 05:08.540] once we're ready to transition, it's going to take a long time to change the standards. [05:08.540 --> 05:15.340] TLS, SSH, all these things will take years to update. And consequently, also, it will take [05:15.340 --> 05:21.300] some time to update the software stack, all the code. There's this notion of crypto agility [05:21.300 --> 05:28.220] to program your software to be able to replace algorithms. We've done that many times, [05:28.220 --> 05:33.880] replacing MD5 with SHA-1, SHA-1 with SHA-256. So we're used to that, but you'd be surprised [05:33.880 --> 05:39.520] how many places RSA is just hard-coded in some code bases. So it might be hard to transition [05:39.520 --> 05:45.900] some software stacks. And also, these new algorithms, they don't necessarily function [05:45.900 --> 05:51.640] like the old ones. Some of them have huge keys, they run slower, so it might have a critical [05:51.640 --> 05:58.020] impact on some software. Bottom line, if you have data that needs to be secured in 10 years, [05:58.020 --> 06:02.160] all these steps backwards, we kind of need to do that today. [06:04.040 --> 06:07.820] We're back to these guys now. So now they have a new idea how to make money. [06:07.860 --> 06:12.560] They don't need to collect underpants anymore. They can simply collect ciphertext, [06:12.560 --> 06:17.540] wait a few years, and then they can turn out a profit when they have access to a quantum computer. [06:19.220 --> 06:24.780] Fortunately, on the crypto side, we're on top of things. So NIST, the National Institute of [06:24.780 --> 06:32.900] Standards and Technologies, they started this effort to provide new standards to replace RSA [06:33.660 --> 06:44.100] and ECDH and all these things. They started in 2017. They asked the community to propose new [06:44.100 --> 06:51.620] schemes. There were 69 accepted schemes that were submitted. And in January of this year, [06:51.620 --> 06:58.580] they started round two. So Thanos happened and a bunch of these just got snapped away. [06:58.580 --> 07:04.480] And then some more got merged together because they were very similar. And now we're left in [07:05.820 --> 07:14.920] right here with 26 schemes. And we're two weeks away from a workshop organized by NIST where the [07:14.920 --> 07:19.760] submitters will discuss these round two candidates, what updates they did in the second round. [07:19.760 --> 07:26.640] And if all goes well, then within three to five years, NIST is going to publish some new standards. [07:26.760 --> 07:35.000] So it's coming up fairly soon. So our goal is to experiment with these new schemes and see what's [07:35.000 --> 07:41.520] the impact on the software we use today. So this project was started by the University of Waterloo [07:41.520 --> 07:48.180] and we joined along with other many collaborators to create a framework in which you can integrate [07:48.180 --> 07:53.800] your new crypto schemes. And in turn, we can take these and integrate them in higher level software. [07:54.700 --> 08:00.300] So the open quantum safe project is an open source project. It's available at this URL. [08:00.720 --> 08:05.700] Our goal is to integrate all the round two schemes. We're on the way of doing that. And [08:06.380 --> 08:13.380] we also have integrations into open SSL, open SSH, and also open VPN, which allow you to try [08:13.380 --> 08:18.760] and deploy these things, experimenting with post-quantum cryptography. [08:18.940 --> 08:25.580] What's new, what we did this year, is we kind of completed the roadmap of all the use cases. [08:25.580 --> 08:31.140] So we can do full post-quantum and also the hybrid case, classical plus post-quantum, [08:31.140 --> 08:38.020] and both the key exchange and the authentication, the signature part, for both TLS 1.3 and SSH. [08:38.460 --> 08:43.360] We also have 1.2 support. I'll talk about it in a second, but it's not as complete. [08:43.380 --> 08:48.830] And we also implemented wrappers, so you can use the library from C++, C Sharp, or Python. [08:51.200 --> 08:59.880] So using this framework, we did some case studies and analysis of different ways you can plug in [08:59.880 --> 09:08.660] these algorithms in our target protocols, SSH and TLS. So we just released a paper describing this. [09:09.820 --> 09:12.920] It's going to be presented at the NIST workshop in more details. [09:14.780 --> 09:19.700] And we also have an extra collaborator on the paper, Eric Crockett from Amazon, [09:19.700 --> 09:25.700] who provides also some insight from their S2N SSL integration. [09:26.840 --> 09:30.540] And I will present a few results from this analysis [09:32.040 --> 09:38.220] to give you an idea of what is entailed when you try to migrate to post-quantum cryptography. [09:39.080 --> 09:45.620] So first, I mentioned this before, but we support what we call hybrid deployments. [09:45.840 --> 09:51.000] So hybrid means that if you take a post-quantum algorithm, you don't want to transition to it [09:51.000 --> 09:58.500] right away. You don't want to dump RSA and start using a picnic signature, because these are fairly [09:58.500 --> 10:07.520] recent. RSA has been there since 76. There's been a lot of cryptanalysis done on it, so we don't know. [10:07.520 --> 10:13.080] These post-quantum algorithms may be broken in five years, not even by a quantum computer, [10:13.080 --> 10:18.220] but maybe by a classical computer. Maybe there's a flaw in the algorithm that we haven't seen. [10:18.800 --> 10:27.580] So how to achieve more safety is to combine a classical algorithm with a post-quantum one. [10:27.580 --> 10:33.760] So you take, let's say, PCDH, and you combine it with a Psyche algorithm, [10:33.760 --> 10:40.340] and then you create a new one. And the resulting communication will be secure if any of the two [10:40.340 --> 10:46.400] is secure. So if there are no quantum computers, then you're safe. You have your elliptic curve [10:47.540 --> 10:51.520] defilement. And if there is a quantum computer, then your communication will still be secure [10:52.080 --> 10:55.220] because you would have protected with a post-quantum one. [10:56.960 --> 11:02.240] So TLS, SSH, they already have this notion of negotiating algorithms. The client sends [11:02.240 --> 11:07.020] its support list, and the server responds. They negotiate which algorithm they'll pick. [11:07.220 --> 11:11.880] But we don't have a way to pick two algorithms at the same time and combine them. So that's [11:11.880 --> 11:17.300] where we have to work. And there are multiple ways to do that in the list in the paper. [11:19.240 --> 11:24.960] The simplest one is just to create a new scheme. It's like, you know, P&J sandwich. You know, [11:24.960 --> 11:29.740] peanut butter and jelly and just combine. It's the new thing. It's P&J. So the same thing, [11:29.740 --> 11:34.340] we can take a classical algorithm, a post-quantum one, combine them, and that's a new thing. [11:34.400 --> 11:38.600] The great thing is that this is backward compatible. So when you say I support these [11:38.600 --> 11:43.320] algorithms, you just name the new one, which is a combination of both. And if the other [11:43.320 --> 11:50.780] peer supports it, you can have this exchange that provides extra security. And there are a bunch of [11:50.780 --> 11:56.900] more advanced ways to negotiate the two algorithms separately. And they're a bit more complicated. [11:56.900 --> 12:04.580] They require protocol changes and might affect a few items. And the things that you need to take [12:05.280 --> 12:10.260] to care about when you design these is, okay, how is it going to affect backward compatibility, [12:10.260 --> 12:17.100] performance? Because, for example, in TLS 1.3, when the client sends its first message to request [12:17.100 --> 12:22.620] communication, it has the ability to precompute some data. So assuming you're going to pick ECDH [12:22.620 --> 12:28.060] is a precomputation for this exchange. But if I'm going to send three proposals and I have to [12:28.060 --> 12:33.740] compute pre-calculations for each, I'm consuming data, the data is bigger. So we don't want to [12:33.740 --> 12:42.880] introduce too much more problems or more data, increase the bandwidth requirements, and we don't [12:42.880 --> 12:50.600] want to add communication messages and affect the data flow too much. So these are all things that [12:50.600 --> 12:56.060] we take in consideration. The first thing we've implemented and the one that we use for our [12:56.060 --> 12:59.660] experiments is the first one I mentioned, the combo scheme, because it is the simplest to [12:59.660 --> 13:09.260] implement minimal changes in OpenSSH and also doesn't affect backward compatibility. So it's [13:09.260 --> 13:19.340] easier all around. So for the TLS use cases that we consider, we have some work in TLS 1.2. The [13:19.340 --> 13:28.580] more recent work in TLS 1.3, the base protocol only supports elliptic curve type exchanges, ECDH. [13:29.600 --> 13:36.840] RSA is not even there anymore. So we have to masquerade our algorithms as curves. So we [13:36.840 --> 13:44.380] pretend to be an elliptic curve and then we can run. So we don't have to modify the stack. [13:44.380 --> 13:51.280] And one problem is the size of these things. As I mentioned, some schemes have very large [13:51.280 --> 13:57.360] public keys or very large encryption systems or signatures. And the protocol specifies a [13:57.360 --> 14:04.620] maximum size. In this case, 2 to the 16 bytes for public key and 2 to the 24 for certificates, [14:04.620 --> 14:11.400] for example. And some schemes are bigger than that, so they wouldn't fit. But also OpenSSL has [14:11.400 --> 14:17.700] smaller limits. Because RSA is not that big. It's a main thing that's used. So they don't want to [14:17.700 --> 14:23.300] provide this empty buffer where people could dust them. So they reduce this limit. So at some [14:23.300 --> 14:30.360] places, we had to tweak, remove some of these limits in OpenSSL to be able to run our experiments. [14:32.000 --> 14:39.080] OpenSSH is kind of similar. But it has a bigger limit. It's 2 to the 32. So all the [14:39.540 --> 14:46.740] proposed round two schemes would fit there in theory. OpenSSH also has its internal limits [14:46.740 --> 14:53.040] that we had to tweak to fit our algorithms at some places. And in this case, we support both [14:53.040 --> 15:00.560] the client and server public key authentication. So it's kind of a full coverage of what we want [15:00.560 --> 15:05.960] to achieve here. Just as a summary of what we tried, [15:05.960 --> 15:09.860] is a table that shows for the key encapsulation. So the key exchange. [15:12.500 --> 15:16.760] So as I mentioned at the beginning, the OQS slide, there were some algorithms that are in there, [15:16.760 --> 15:21.460] some that are not. And there's no particular reason to why schemes are excluded other than [15:21.460 --> 15:24.900] the fact that people involved in the project contribute their own schemes. And the other [15:24.900 --> 15:29.560] ones we're trying to fill them by taking implementations that we can find by the [15:29.560 --> 15:34.080] submitters. So at some point, we hope to have all the NIST candidates in that table. [15:36.640 --> 15:44.000] Yellow checkmark here, for example, Frodo, has larger artifacts that we needed to tweak [15:44.000 --> 15:51.480] OpenSSL internal limits to be able to fit in there. NTS, which is a code-based scheme here, [15:51.480 --> 16:03.860] like Macleese also is a similar scheme, which had very large public keys, and we're not able [16:03.860 --> 16:10.500] to fit them in the software. We had a problem. And the spec in theory would support that size, [16:10.500 --> 16:15.500] but we were not able to make it work. So it's a good reason to try these experiments [16:16.160 --> 16:21.120] in practice, because even in theory, you say the size should fit, there's some resulting, [16:21.120 --> 16:28.660] there's a lot of code paths in the software that didn't work. For the signatures, we have a lot [16:28.660 --> 16:34.760] more of these yellow boxes, meaning that we needed to augment the internal size in OpenSSL [16:34.760 --> 16:42.060] and OpenSSH to fit these large signatures or public keys. And we only had two failures, [16:42.060 --> 16:48.100] picnic level three and five were expected, because the signature size were bigger than [16:48.100 --> 16:54.680] what's allowed by the protocol. The round two version of picnic all fits, so they reduced, [16:54.680 --> 17:02.960] they did some optimization that allowed picnic two to be used in TLS. And on the SSH side, [17:02.960 --> 17:07.840] we had some failures with the rainbow, some more higher level parameter sets. [17:08.620 --> 17:20.320] So now I'd like just to show you a quick demo of SSH. So if you know and use, if you know SSH, [17:20.920 --> 17:26.500] that's going to look, it should look exactly as how you used to see it. So the only thing we did [17:26.500 --> 17:33.400] is add these post-quantum algorithms and nothing is different. If you've never seen an SSH connection, [17:33.400 --> 17:40.420] that's just going to look a little bit weird. Sorry for the unreadability of these consoles. [17:41.040 --> 17:46.000] But what I'm starting on the right hand side is a server. It's expecting a [17:47.960 --> 18:01.760] ECDHT with the NIST curve P384 combined with a psych algorithm. There it is. And on the left [18:01.760 --> 18:08.080] hand side, it's going to be a client requesting the same algorithm. And I've put the debug output [18:08.080 --> 18:13.200] there. So it's just to show something on the screen. Otherwise, it would just be nothing. [18:13.480 --> 18:19.180] And we see the connection was successful. The authentication was done with the picnic [18:19.900 --> 18:28.020] hybrid, the picnic signature, and also an ECDSA. So the point I'm trying to make here is that [18:29.380 --> 18:38.260] we modified these software stacks, but they work exactly as you did before. They did before. [18:38.260 --> 18:44.280] If you've deployed SSH before, one step that I skipped was the creation generation of the [18:44.280 --> 18:49.980] key pair and added it to the authorized set on the server side. So it works exactly the same. [18:50.060 --> 18:55.620] Which means that you can basically go out and try it and deploy it even. [18:56.480 --> 19:03.720] So what's next? For us, is what we want to add more of the round two schemes, [19:03.720 --> 19:09.980] the one we're missing. So we can have a full list of all the algorithms. And we want to do [19:09.980 --> 19:16.400] some performance testing. We did some tests a year ago with round one candidates, and it was [19:16.400 --> 19:21.200] very promising. The fast lattice schemes, for example, were competitive and sometimes even [19:21.200 --> 19:28.860] faster than state-of-the-art ECDH. And some slower one, which might not be suitable for [19:30.880 --> 19:36.340] multiple connections a second, like on an SSL server, could be great for more one-on-one [19:36.340 --> 19:43.120] interactions in a messaging system or SSH. So you really have a broad choice of deployment options [19:43.840 --> 19:50.380] if you're a system integrator. And we also want to tackle more protocols. There's all sorts of [19:50.380 --> 19:57.360] things that needs to be made quantum safe. We want to start looking into that. And for you, [19:57.360 --> 20:03.400] an interesting thing to consider is, are you working with projects or with software that [20:03.400 --> 20:09.160] protects data, that needs to be secure for a couple of years, for 10 years? And if so, [20:09.160 --> 20:16.380] you might want to start using post-quantum cryptography to protect this data, [20:16.380 --> 20:24.020] either integrating in your code or using some of our forks and deploy them, SSH or VPN. [20:24.560 --> 20:30.040] All right. So that's my time. Thank you for your attention. I'll be posting the slides [20:31.140 --> 20:35.360] right after the talk. And I'm happy to take some questions. Thank you. [20:35.380 --> 20:44.760] All right. Thank you. If you have questions, please come up to the human microphone. That is me. [20:46.880 --> 20:54.180] Come on down. Can you come up and... thanks. Form an orderly line. [20:56.680 --> 21:02.000] My question was just, obviously, I haven't looked at the GitHub repo yet, but did you [21:02.000 --> 21:11.760] use the OpenSSL module API to build your provider? Or did you hack OpenSSL to extend it? [21:12.020 --> 21:14.640] Yeah. The engine API you're talking about? Yeah. [21:14.720 --> 21:20.860] Okay. So no, we didn't. So the engine API in OpenSSL, there's a way to provide an alternate [21:21.320 --> 21:25.660] implementation. So if you have RSA and you implement RSA in hardware, you can create an [21:25.660 --> 21:32.760] engine to plug it in. So since these were new algorithms unknown to OpenSSL, we add to modify [21:32.760 --> 21:38.840] OpenSSL itself. And OpenSSL is in two layers, the crypto layer and the SSL layer. The crypto layer, [21:38.840 --> 21:44.300] you could maybe get away with using the engine. But in the SSL layer, where you define specs [21:45.440 --> 21:48.300] or specifications for the actual algorithms, that didn't work. So [21:48.980 --> 21:54.660] we modified the code directly. We have a fork. You can see the diff between the original project. [21:56.040 --> 22:01.800] I just have a question. I mean, obviously you're aware that IBM has actually created [22:01.800 --> 22:08.540] the Q1 system, correct? Because I was at CES in January and that's where they showcased it. [22:08.540 --> 22:12.140] And I don't know if you know anything about it, but knowing what it is, it's [22:12.140 --> 22:19.060] legit. How do you think that's going to help your field of migrating regular, like what you were [22:19.060 --> 22:25.180] talking about? How do you think that the creation of the IBM Q1 system will help? Maybe not you, [22:25.180 --> 22:32.040] but like whenever they streamline it more, how do you think the creation of the IBM Q1 system [22:32.040 --> 22:37.060] is going to help you and the people that come after you in this particular... [22:37.060 --> 22:42.520] So yeah, so there's a lot of vendors that have work on quantum computing and provide specialized [22:42.520 --> 22:47.160] chips. A lot of what's out today, the D-Wave system and some others, they're very specialized [22:47.160 --> 22:51.740] and they're not general computers to do all these things. So the estimates I gave at the beginning, [22:51.740 --> 22:58.720] 10, 15 years, is the output of very serious quantum computer experts that took everything [22:58.720 --> 23:07.900] in consideration, research, time, money invested, and they give a 50% chance to have something in [23:07.900 --> 23:13.300] 10, 15 years, including all this development. None of this is surprise work. You see the [23:13.300 --> 23:18.420] scaling of quantum computer and we have to plan that pessimistically. If you're trying to defend [23:18.420 --> 23:24.680] against it, then our mark is like 10, 15 years. I mean, I just wanted to get your opinion on [23:24.680 --> 23:29.960] how you think, even though it might not be the Q1 system itself that helps you, like the later [23:29.960 --> 23:36.440] iterations of quantum computing. Do you think that will just streamline the migration from regular [23:36.440 --> 23:46.880] to PQC? I mean, it's like all this stuff, the migration doesn't use quantum computers at all. [23:46.880 --> 23:51.180] We're just like, if they exist, they threaten what's in today and you need to migrate to this [23:51.180 --> 23:55.660] stuff. So what's going to trigger this is NIST is going to do their, they're going to have new [23:55.660 --> 24:00.000] standards and then the protocols will update. And what we're trying to kind of kickstart is [24:00.460 --> 24:04.560] you might want to migrate before all that takes place, because that could be, you know, five, [24:04.560 --> 24:10.820] seven years and all the data that you encrypt today until then is at risk to be decrypted later. [24:10.820 --> 24:16.180] So if you want to migrate to something, a hybrid scheme, then that you have the tools to do that [24:16.180 --> 24:21.800] today. Expecting that one of these systems, D-Wave, IBM, Microsoft is working on them, [24:21.800 --> 24:27.160] Google, everybody has a quantum computing team that somebody will have a functioning one in, [24:27.160 --> 24:34.820] you know, 10, 15 years. Hi, does any of the algorithm being evaluated [24:35.480 --> 24:40.460] builds any potential application in an IoT environment where bandwidth, computational power [24:40.460 --> 24:48.220] and latency are critical issues? Yes. So there's a lot of different flavors of algorithms. [24:48.460 --> 24:55.240] Some are very big, very small, very slow, very fast. And some of them that might not be competitive [24:57.780 --> 25:03.800] in speed with some other like fast lattice one, they will give them advantages to themselves [25:03.800 --> 25:08.160] saying that, oh, we have very short keys. We fit in very small embedded systems. [25:08.160 --> 25:13.760] So this is the selling point to some of these. And this said that they won't pick a winner. [25:13.960 --> 25:20.220] They're more likely to pick a bunch of them for different use cases, including IoT, [25:20.220 --> 25:25.200] which is a very important scenario. That's all the time we have for questions, [25:25.200 --> 25:29.220] but hopefully you can be available afterwards outside. Yes, I can stay here. [25:29.220 --> 25:31.680] All right. One more round of applause for our speaker. [25:31.680 --> 25:32.640] Thank you very much.