[00:00.000 --> 00:05.740] So today we're going to talk about basically sequential time and the trustworthy notion [00:05.740 --> 00:12.420] of it, right? I'm Brian Vohaska. Full disclosure, I just left Protocol Labs. So I'm representing [00:12.420 --> 00:18.700] Protocol Labs and this broke again. All right. I don't know what's up. So it's like I'm not [00:18.700 --> 00:23.360] at Protocol Labs. Don't ask me Protocol Labs questions. This is Simon Pevers. He's a super [00:23.360 --> 00:28.440] national. They're responsible for basically all the goodness, right? Like the actual implementation [00:28.440 --> 00:35.180] of what we're going to talk about. Hey, guys. I know it's pretty loud. Do you mind talking [00:35.180 --> 00:46.740] outside? Thanks. All right. Cool. So this is Simon. I'm Brian. Let's get to it. All right. [00:46.800 --> 00:53.400] So that talk title is pretty vague. What is trustworthy sequential time and all that business? [00:53.400 --> 01:00.020] And why do we care? And like, should we even make it real or whatever? I'm a little distracted [01:00.020 --> 01:06.300] because there's cords on the floor. So if I trip on it, I apologize. Anyway, so I guess the goal is [01:07.300 --> 01:12.220] fundamentally we want some sort of verifiable and trustful time, right? Like I want to know that [01:12.220 --> 01:17.840] when I talk to like Derek, right? And I say, hey, what time do you have? And you say 4 p.m. [01:18.100 --> 01:22.640] And I say, bullshit, I don't believe you. Prove to me that it's 4 p.m. And you go and you give [01:22.640 --> 01:26.680] me some proof or something. That would be cool. Not particularly interesting. If I could prevent [01:26.680 --> 01:32.180] him from doing something until some sort of 4 p.m. And then he could prove to me that, oh, it's 4 [01:32.180 --> 01:35.940] p.m. And I can now do something. That would be much more useful. And we'll get into what that [01:35.940 --> 01:41.080] means and applications and sort of things. So why do we want this sort of thing? Well, I mean, [01:41.680 --> 01:48.760] come on. Well, I mean, synchronization, obviously, would be super awesome. If we could all agree on [01:48.760 --> 01:53.920] some sort of definition of time. We all have synchronous clocks. And do some interesting [01:53.920 --> 01:59.440] things at like 4 p.m. or something, right? That would be super cool. If we could query some [01:59.440 --> 02:06.860] service. I call it the Oracle of time. Like Oracle Delphi. No? All right. That would be really cool [02:06.860 --> 02:10.480] where you can't really predict whatever's coming out of here. You just know that at some time, [02:10.480 --> 02:14.360] you get some information out. You can verify that it happened at time. Right? And time... [02:16.920 --> 02:25.620] Sorry, guys. I don't know how to make that better. It's been doing that for everybody? [02:25.660 --> 02:31.380] Okay. All right. Well... It's more on than off? Okay. And then fundamentally, [02:31.380 --> 02:36.320] like presume that you could do this. There's some magical box or something. How do we actually do [02:36.320 --> 02:42.700] this? Well, there's a bit of math and a bit of hardware. And it turns out you can't really solve [02:42.700 --> 02:48.120] this problem without both of them. So, sort of moving on. What is the agenda for this talk? And [02:48.120 --> 02:53.580] it's basically me talking to you about mathy things. And then after I'm done regaling you [02:53.580 --> 02:59.320] with math, Simon actually does real stuff. And I think that's sort of the juicy part of the talk. [03:00.400 --> 03:05.840] So, right. So, I mentioned kind of what this trustworthy notion of time is. Cool story, [03:05.840 --> 03:10.200] bro. Why do I care? Well, it turns out there's some really cool things you could do if you had [03:10.200 --> 03:17.320] magic box device something. One of them is self-revealing commitment. So, [03:17.320 --> 03:24.840] suppose that I say I pinky swear to reveal some secret to you in four days. And maybe that's a [03:24.840 --> 03:30.140] wallet password or something. I pinky swear to give you this money stored in some wallet or [03:30.140 --> 03:34.720] something. And you say, no, that's bullshit. I don't believe that you're actually going to give [03:34.720 --> 03:39.160] this to me. So, what you can do is if you had this magical device that gave you this [03:39.160 --> 03:44.320] verifiable time component, maybe some randomness that corresponded to some sort of unlocking key, [03:44.320 --> 03:49.300] then you could say, like, here is this problem that if you solve this problem, I know it's [03:49.300 --> 03:54.320] probably going to take me four days, then you will get this key that is necessary to unlock [03:54.320 --> 03:58.480] this thing that you can do something useful with. So, self-revealing commitments. Random [03:58.480 --> 04:04.340] beacons are really important along this line. So, I want to know every 30 seconds or so, like, [04:04.340 --> 04:08.240] the value of this random beacon. But I don't want people to be able to fast forward. Because [04:08.820 --> 04:12.440] maybe they could know the random beacon information and do something nefarious. [04:12.440 --> 04:16.620] Turns out that's super important for Ethereum and super important for Filecoin. [04:16.940 --> 04:22.600] You could also do something called verifiable lotteries. That is also super important to [04:22.600 --> 04:28.200] Filecoin. Something we call secret single leader election. Or secret single leader election. [04:28.200 --> 04:33.360] There's a hyphen in there somewhere. It's contentious. Anyway, so, it turns out, like, [04:33.360 --> 04:37.160] you know, in most of these consensus mechanisms, you have a leader election. [04:38.240 --> 04:44.320] It's effectively a lottery. It would be nice if you could basically have a delay on when those [04:44.320 --> 04:49.080] leaders are elected. And you could know, like, one, it's verifiably random. And two, it could [04:49.080 --> 04:54.060] only happen every so often. So, you don't want people to be a leader first or know they're not [04:54.060 --> 04:59.280] going to be a leader within some sort of epsilon of time. That would be really cool. So, what does [04:59.280 --> 05:05.020] this apply to for blockchains? I mean, Protocol Labs cares about this. Ethereum has funded a lot [05:05.020 --> 05:11.080] of the research with Protocol Labs. So, for Protocol Labs, it's proof of space time. We need [05:11.080 --> 05:17.500] this bounded delay function. There's no way around it. We actually use it in expected consensus, [05:17.500 --> 05:22.480] if you're familiar with that. If not, look it up. It's pretty cool. So, verifiable bounded delay, [05:22.480 --> 05:28.440] really cool stuff. If you go back into, like, the back in the day theory for consensus mechanisms, [05:28.440 --> 05:33.220] you'll find that most BFT systems are bounded delay. That's an assumption they make. [05:33.220 --> 05:38.260] So, if you can enforce bounded delay, you get a lot of security guarantees that you don't need [05:38.260 --> 05:43.680] to make further assumptions on. So, why do we actually care? Is there an example where we'd [05:43.680 --> 05:49.240] actually ever use this in real life? It turns out, yeah. This is something that came in, I think it [05:49.240 --> 05:56.120] was, like, Serbia or something, like, a few years ago, where you can see that the balls are, you [05:56.120 --> 05:59.560] know, it's like the lottery thing where the balls come out and you know the number and pick it up [05:59.560 --> 06:03.700] and read it. And all the balls are filled. But none of the balls or a few of the balls have been [06:03.700 --> 06:08.200] drawn. So, you'll see, like, whoever ran this lottery knew the answer before they actually did [06:08.200 --> 06:12.940] this sort of random pull out thing. So, something unusual happened that's really terrible. I stole [06:12.940 --> 06:18.040] the side from my colleague. I thought it was pretty cool. So, this would be really terrible. [06:18.040 --> 06:24.840] We could prevent that with these magical, like, box function things. So, I said some sort of [06:24.840 --> 06:28.720] heuristics. Like, it would be nice two halves. But maybe we could formalize this a little bit [06:28.720 --> 06:32.940] more and say, what do we actually want to guarantee? Like, what does security mean? Like, [06:32.940 --> 06:37.300] cool, we have this verifiable time thing. What does it absolutely need to do? And, Mickey, [06:37.300 --> 06:42.400] maybe can we, like, formalize some of this process, right? And so, this work was done a few [06:42.400 --> 06:48.820] years ago. Actually, no, it's about a year ago. A year and a half. By some of my colleagues, Ben [06:48.820 --> 06:54.440] Fish, Dan and some others. And they decided to formalize a lot of this and write something called [06:54.440 --> 06:59.660] verifiable delay functions. And they wrote a paper on it. It's pretty awesome. Recommend reading [06:59.660 --> 07:05.460] it. So, there's always going to be a setup component, right? This is a mathy sort of thing. [07:05.460 --> 07:09.040] It's really helpful for security models. But basically, you need to set up your function. [07:09.040 --> 07:12.820] You need to set up your system. You need to take in some set of public parameters, whatever they [07:12.820 --> 07:18.200] are. Public keys. Whatever floats your boat. Whatever the function needs. And you need some [07:18.200 --> 07:23.260] security parameters. Security parameters are often just labeled as lambda. They're kind of fuzzy. [07:23.260 --> 07:30.180] You ever see lambda in literature? That's usually what it means. This is security parameters. You [07:30.180 --> 07:34.280] need an evaluation function. It needs to do something and it needs to output a proof. That's [07:34.280 --> 07:38.780] basically all this means. Take in some public parameters. Take in a seed of some kind. Do [07:38.780 --> 07:43.380] something. And then provide a proof that you did something. You did it correctly. And the last bit [07:43.380 --> 07:47.580] is verify, right? And that's given the proof, given the something, given the thing you claimed [07:47.580 --> 07:53.240] you did, does it work? True or false? So, it seems like that's not important. But it turns out [07:53.240 --> 07:58.240] it's super, duper important for any type of proving in the system. So, what do we actually [07:58.240 --> 08:05.180] want from this magical function? We need uniqueness, right? So, if everybody has the same magic box, [08:05.180 --> 08:11.580] and in 30 seconds, we get this, like, verifiable delay and you get, like, time out of it or you [08:11.580 --> 08:15.980] get, like, a seed out of it or you get some random bits or something, we should all have the same [08:15.980 --> 08:20.940] random bits, right? Like, you can't have, like, somebody having a new set of random bits. It's [08:20.940 --> 08:25.280] actually true, right? And it's like, oh, I have my magic box that isn't unique anymore. So, I have [08:25.360 --> 08:29.420] a different value. And if I can get more than one value, right, then maybe I could cheat. It turns [08:29.420 --> 08:34.360] out that's a huge security problem. So, we require uniqueness. The other thing is called epsilon [08:34.840 --> 08:38.960] sequentiality. This is a formal word, but it basically means there's no way to do this in [08:38.960 --> 08:44.180] parallel, right? If you had a million of these boxes running, it doesn't give you an advantage, [08:44.180 --> 08:49.500] right? Like, you just spend a lot of money buying a million boxes. So, one is plenty, right? So, [08:49.500 --> 08:53.720] the next thing is, okay, cool, we have these mathy theoretical things. What does that mean [08:53.720 --> 09:02.640] in real life? Can such a magical box exist? And it turns out, eh, kind of, right? And here's some [09:02.640 --> 09:08.900] assumptions that you need to make. And that's your ability to do this sort of magic boxy thing [09:08.900 --> 09:14.040] is usually based on something you can't touch that nobody can touch in the world, right? So, [09:14.040 --> 09:18.980] something in space or something. Or hardware assumptions, right? So, your ability to compute [09:18.980 --> 09:23.920] some function, right? And that's actually the way we go. We'll talk about this in maybe the next [09:23.920 --> 09:29.320] slide or so. I'm not gonna cover this AMAX thing. It's not important until we get to the hardware [09:29.320 --> 09:36.560] stuff. So, you might think, surely somebody has done this in the past. They have. There's some [09:36.560 --> 09:42.300] centralized approaches. I mean, like, signed time protocols. They work. They're great. In [09:42.300 --> 09:45.400] blockchain, that's not great, though, because you have usually one entity that controls all the [09:45.400 --> 09:52.540] time. That's really not great for us. So, we tend to avoid that. So, like, most of these things [09:52.540 --> 09:57.180] that are centralized don't quite meet the product requirements, if you will. They don't meet what [09:57.180 --> 10:01.720] we're looking for. There are some distributed approaches that work really well. There's [10:01.720 --> 10:07.460] multi-party computational techniques you can use. They're really expensive. Like, [10:07.460 --> 10:11.680] unbelievably computationally expensive. And if they're not computationally expensive, [10:11.680 --> 10:16.700] they're sort of communication expensive. So, coordination is really nasty. So, we try to [10:16.700 --> 10:22.840] avoid those. There's some things that use, like, computation. It's more or less a subset of [10:22.840 --> 10:27.840] multi-party computation. It's expensive. This cosmic events thing is kind of interesting. [10:27.840 --> 10:31.720] Usually whenever these functions come up, people are like, oh, just look into space, and you see, [10:31.720 --> 10:37.340] like, some event that has happened. And that's fantastic. Except, you know, like, if something [10:37.340 --> 10:41.620] happens in space, not everybody can see it. So, like, somebody gets an advantage, that kind of [10:41.620 --> 10:48.340] sucks. So, we don't do that. So, what do we actually do? And that is verifiable delay functions. [10:48.340 --> 10:52.200] That's the formalism. That's the term. You can look this one up, and you'll find all this stuff. [10:52.780 --> 10:59.540] What are VDFs? So, VDFs are this magic box, right? This is sort of how we formalize the magic box [10:59.540 --> 11:05.540] that we're gonna talk about, right? And, like, there was a paper with Dan and Ben in, like, [11:05.540 --> 11:11.960] 2018, where they formalized all this, and basically exactly what I told you. There's a [11:11.960 --> 11:19.160] sequential stepping thing. It computes a thing. We believe it takes so long to do it. And the [11:19.160 --> 11:24.460] output of that, that proof component, is really fast to verify. And that's really, really important. [11:24.460 --> 11:29.760] I wrote PBT, probabilistic polynomial time. It's a formalism. It's important, but you can read it [11:29.760 --> 11:34.620] as, like, it's fast. So, VDF notation is the same as what I showed you before. Probably not [11:34.620 --> 11:41.540] important for here. At any rate, one of the things that is really important for VDFs is this [11:41.540 --> 11:48.880] epsilon sequentiality. You can't parallelize it. It's important. Whatever. At any rate, so, how do [11:48.880 --> 11:52.200] we actually build this thing? And that's probably what most people are interested in. Cool. Magic [11:52.200 --> 11:58.640] box exists. It does cool stuff. How do we build it? It turns out that Ron Rivest, some time ago, [11:59.240 --> 12:06.140] did something similar without the efficiency component. And he was like, hey, I have RSA [12:06.140 --> 12:12.460] stuff. I have an RSA number. What if I just raise things to a gigantic power? Right? Like, I don't [12:12.460 --> 12:18.000] know. Lots of zeros and stuff. So, like, X to the really gigantic thing. How long would it take to, [12:18.000 --> 12:23.720] like, do that? It turns out it's really expensive. And so, like, you can do some clever approaches [12:23.720 --> 12:28.180] to, like, bound how expensive it would be. This sort of approach where you take X to the 2T. [12:28.180 --> 12:36.800] The 2T is basically a carryover from square. What is it? Like, a squaring trick where you can [12:38.780 --> 12:42.540] divide by 2 and you can, like, square things and square and square and square. And it sort of [12:42.540 --> 12:47.620] works out and makes things a little faster. So, 2T is the number of exponentiations you're going [12:47.620 --> 12:54.500] to make. 2T is the exponent. So, he found that's really expensive to compute. It would be really [12:54.500 --> 12:59.820] cool if I hit something in X and then in, like, really far away somebody was able to compute this [12:59.820 --> 13:07.200] and reveal what X was. See? It's verifiable. At some point, you'll be able to finish this [13:07.200 --> 13:11.420] computation. You'll be able to figure out what X is and you'll be able to tell me and, like, [13:11.420 --> 13:16.940] I'll be really happy and we'll have a big ceremony and Simon will get invited and he'll get awards [13:16.940 --> 13:22.380] and stuff and I'll be really happy. That did happen, by the way. So, it turns out he did that. [13:22.380 --> 13:29.540] Problem is, that 2T is really huge in order to be, like, useful. And we wouldn't want people to [13:29.540 --> 13:35.480] waste, like, 35 years computing a thing. So, we needed something much more efficient. Turns out [13:35.480 --> 13:42.200] we have it. There's these two mathematicians. I think Ben Wozolowski is French and I think [13:42.760 --> 13:49.540] Piersak is Polish. It's not important. But they're really fantastically smart folks. [13:49.540 --> 13:55.280] And they found sort of a cheat, right? And it was, well, we'll just do what Ron did. We'll have [13:55.420 --> 14:00.740] a G to the well, G is just a group element, but this X thing to the 2T. Same as everybody else, [14:00.740 --> 14:06.780] we know that's hard. And we'll figure out how to make the proof while we do all this 2T business. [14:06.800 --> 14:12.380] So, maybe while we're computing this G to the 2T thing, we can do something on the side that, like, [14:12.380 --> 14:19.520] when we're done, for a little bit extra work, we can prove to somebody very efficiently that, [14:19.520 --> 14:26.840] you can do that, right? And here's effectively the algorithm. You compute the X to the 2T. So, [14:26.840 --> 14:30.560] this notation is a little wonky, but basically what it's saying is you have a hash function. [14:30.640 --> 14:34.460] This hash function isn't like a regular hash function. It basically says take some input [14:34.460 --> 14:40.680] and map it to inside this group. So, for RSA, it's like RSA2K, whatever your modulus is, [14:40.680 --> 14:45.400] hash it to less than that modulus within your group. So, this is fancier notation. But that's [14:45.400 --> 14:52.120] what it's saying. So, SHA2 would work here. Asterisks. There's some issues. But you need [14:52.180 --> 14:58.100] a hash function. That's the group. Not important. So, you take that. Then you just do the 2T, [14:58.100 --> 15:01.720] right? You get an answer. It takes forever. But on the side, what you're actually doing here is [15:01.720 --> 15:08.600] you sort of break down 2T into this Q times L plus R thing. It looks really weird, right? L comes [15:08.600 --> 15:14.600] from the person who is trying to get you to do work. So, when they say, hey, Simon, I want you [15:14.600 --> 15:20.220] to do work, I want you to compute this, like, G to the 2T thing. And also, by the way, here's [15:20.220 --> 15:24.560] an L. L is a prime. It's a random prime from a set of primes that you get to choose how big they [15:24.560 --> 15:32.240] are. Once that's done, you compute this sort of 2TQL business, right? And it turns out if you [15:32.240 --> 15:37.760] do some fancy algebraic stuff, that this bottom thing turns out to be correct, right? And so, [15:37.760 --> 15:41.840] this pi, which is this G to the Q thing, Q is pretty small. Or it can be pretty small. So, [15:41.840 --> 15:47.200] it's pretty easy for you to compute. Whenever you, as a verifier, like, I've said, Simon, do [15:47.200 --> 15:52.680] work. He gives me something back. I don't want to do a lot of work. So, I want to make sure that, [15:52.680 --> 15:57.240] like, L is small and R is small. It turns out if you do this, it is small. It's, like, small enough [15:57.240 --> 16:02.180] to do. And you can verify this super-duper fast. You get this verification thing. It's super [16:02.180 --> 16:08.980] awesome. So, the next question you might ask, like, cool, that's nice, I guess. Is there other [16:08.980 --> 16:15.980] ways of doing this? It turns out there are. But this is so simple. It's awesome. And you'll see [16:15.980 --> 16:21.440] why it's awesome when Simon goes into this a little bit more. But basically, so far in the [16:21.440 --> 16:26.200] research, and this may have changed in the last month or so, but there's two main avenues. RSA [16:26.200 --> 16:31.840] groups, just basically what I showed you before. And something called class groups. They're pretty [16:31.840 --> 16:40.400] complicated. I'm not going to talk about them at all. The moral of the story is you find a [16:40.400 --> 16:48.220] prime that has their properties and you build this quadratic number field and things happen. [16:48.220 --> 16:53.780] The advantage for having a class group is there's no trusted setup. So, if you know anything, [16:53.780 --> 16:59.480] maybe we don't, about VDFs, with this RSA stuff, you may have noticed, like, hey, if there's a [16:59.480 --> 17:05.440] modulus, and I happen to know the primes, I can cheat. So, this G to the 2T thing should be a lot [17:05.440 --> 17:11.440] easier to compute. And you'll be right. OpenSSL, whenever you go to encrypt things with RSA, [17:11.440 --> 17:16.200] it does this Chinese remainder theorem cheat. I know the primes. So, raising something to some [17:16.200 --> 17:21.800] gigantic power is much easier because I can sort of reduce the state space of these [17:21.800 --> 17:27.980] multiplications. So, like, you need some way of doing multi-party computation so everybody gets [17:27.980 --> 17:33.040] the same modulus without knowing the primes. That's really hard. There's some work to show [17:33.040 --> 17:38.040] like we can do that. I think it's now 10 minutes or something from Lero for like 1,000 people. So, [17:38.040 --> 17:42.440] that's probably reasonable. With class groups, you don't need to do that. So, it's really [17:42.440 --> 17:47.560] attractive. So, some groups like Chia, I think, are doing class group based VDFs, which is pretty [17:47.560 --> 17:52.440] cool. The issue with class groups is I'm not really sure if they're sequential. Like, we think [17:52.440 --> 17:57.660] they are. But, like, I'm not really sure. They're both really well studied, though. They're pretty [17:57.660 --> 18:02.620] solid. So, moving on. Revisiting these applications. Random beacons would be really [18:02.620 --> 18:11.660] cool. When I said trustworthy time, maybe this, like, backwards thinking is sort of, like, I have [18:11.780 --> 18:16.440] a notion of trustworthy time because I know something takes an amount of time to do. Not [18:16.440 --> 18:20.400] that I'm getting, like, 4 o'clock and everybody has the same 4 o'clock. That is also a side effect. [18:20.440 --> 18:24.980] But one of the things that tends to be more useful is having this, like, I want you to do something [18:24.980 --> 18:29.900] and I want it to take time. I want a bounded delay that you can verify and has some hardware [18:29.900 --> 18:34.180] assumptions that we all agree are good and then something good happens. So, with random beacons, [18:34.180 --> 18:39.300] that's exactly what happens. We do this VDF thing. We have some hardware. Or maybe you [18:39.300 --> 18:43.720] could do it in software. It just won't help you. And at the very end, you get a random number that [18:43.720 --> 18:48.520] took you so many minutes to do and you can verify that one. It took you so many minutes to do [18:48.520 --> 18:53.840] because they're making some hardware assumptions. You can prove that you did it. So, like, hey, [18:53.840 --> 18:57.700] I did this. And now you have randomness. So, we can all have the same randomness. We can all have [18:57.700 --> 19:01.580] the same values. So, if we were doing something off chain and wanted to bring that on chain, [19:01.580 --> 19:05.360] we can now do that and show, like, hey, no funny business happening here without needing, like, [19:05.360 --> 19:09.740] snarks or something like that, which don't really solve this problem. For Filecoin, [19:09.740 --> 19:15.400] proofs of space time, this, like, is gigantic for us. Basically, proofs of space time are [19:16.440 --> 19:21.420] I need to prove that I have your data on my machine and I want to continue to prove I still [19:21.420 --> 19:25.300] have your data on your machine. And it turns out that if you don't have bounded delay, [19:25.300 --> 19:30.260] you can do some pretty nasty cheats. If you do have bounded delay, then this problem is super [19:30.260 --> 19:36.300] awesomely easy. And, well, asterisk, it's not easy, but it is much easier to quantify and, like, [19:36.300 --> 19:39.680] secure and these sorts of things. So, really important for Filecoin, really important for [19:39.680 --> 19:44.680] Ethereum because they're using random beacons. And I think the next, you know, if it's Casper [19:44.680 --> 19:48.560] or something or one of the protocols, like, it relies on random beacons that if we can get VDFs [19:48.560 --> 19:56.980] to work well, this just makes it so much easier. So, moving on, you know, kind of what's next, [19:56.980 --> 20:02.580] right? Like, VDFs are new. Like, this just started in, I think, like, May or June of 2018. [20:02.740 --> 20:08.620] And so, we've gone from, like, this is a cool theoretical thing to, like, we have implementations [20:08.620 --> 20:12.740] of this, like, and we're well on our way to, like, ASIC design, which is pretty cool. So, [20:12.740 --> 20:17.360] there's a lot more research. There's a lot more theory stuff. I know I kind of glossed over a lot [20:17.360 --> 20:22.540] of this for the sake of time. The questions oftentimes we get asked quite a bit, and that's [20:22.540 --> 20:27.360] why it's on the slide. Are they quantum resistant? No. Class groups, you can kind of make quantum [20:27.360 --> 20:32.300] resistant, but, like, not really. You just change some parameters and you can do that. [20:33.140 --> 20:39.920] There's probably quantum resistant VDFs. Right now, it's just research stuff. And it's a ways [20:39.920 --> 20:45.560] away. So, I think quantum stuff is a ways away. So, sort of, like, moving ahead of that, like, [20:45.560 --> 20:50.320] can you make this magic box? That's basically what this gets down to. Cool. Theory exists. [20:50.320 --> 20:55.700] We can do this. I believe you. Make the box. Right? And so, the next question is, can we actually [20:55.700 --> 20:59.480] make the box? And this is sort of, I call it the rubber meets the road bit. And that's [21:00.000 --> 21:03.760] fundamentally what Simon has sort of done, right? And it's, like, let's make this real. Like, [21:03.760 --> 21:08.720] let's really have hardware. Let's solve hard problems. Can I actually show you that this is [21:09.080 --> 21:12.780] advantageous, like, versus CPU? Do you need hardware? Can you make these hardware assumptions [21:12.780 --> 21:16.400] and actually get away with it and people don't, like, screw you over or something? [21:16.400 --> 21:21.760] It turns out, yes, you can. And this is where Simon's part of the talk is going to pick up. [21:22.320 --> 21:53.420] Yep. Coming up. All right. That is not working. [22:04.650 --> 22:09.190] Okay. So, yeah, I'll talk about some of the work we've done to date. So, [22:09.190 --> 22:13.650] what my company does is look at, we focus primarily on taking various algorithms, [22:13.650 --> 22:17.030] computationally expensive algorithms, and speeding them up, either through software [22:17.030 --> 22:24.010] optimizations, FPGAs, or ASICs. And so, as Brian said, this, the VDF, because it has this property [22:24.010 --> 22:27.990] of you need to know, have a sort of a maximum or minimum time bound on how fast you can compute it [22:27.990 --> 22:32.850] for it to actually be secure, it implies right away that you're going to need hardware. So, [22:32.850 --> 22:36.910] you either need, it basically means you need ASICs, because the CPU is going to be much slower [22:36.910 --> 22:42.150] than an FPGA, which will be much slower than an ASIC. And so, we started basically in February [22:42.150 --> 22:48.010] looking at, well, how would we actually build this into hardware? And starting in February, [22:48.010 --> 22:51.970] I mean, we looked at some of the software implementations. GMP is a pretty common [22:51.970 --> 22:57.710] math library, and it's pretty well optimized. And if you take a sort of high-end CPU today, [22:57.710 --> 23:02.970] to do one modular squaring of a 2K RSA number takes about 1200 nanoseconds, [23:02.970 --> 23:08.130] which is pretty good. And it's actually a lot better than the 35-year timeline to compete [23:08.130 --> 23:14.290] this LCS35 puzzle that Ron Rivest had estimated 20 years ago. Basically, with a CPU today, [23:14.290 --> 23:18.570] you could do it in about three and a half years instead of 35. And I'll talk a little bit about [23:18.570 --> 23:22.770] how that happens. And then, so we started looking at, if you're going to go to hardware, [23:23.470 --> 23:27.630] what is the component you need? You basically need a low-latency modular squaring unit. [23:27.650 --> 23:31.430] And you might think that hardware multipliers are well-studied, they're in every CPU in the world. [23:31.430 --> 23:37.370] And that's true. But they basically focus today on a balance of throughput and power [23:38.790 --> 23:41.870] optimization with latency as well. It's a balanced kind of multiplier, because it's [23:41.870 --> 23:47.190] going to be used for general-purpose computation. What we need here is a low-latency multiplier. [23:47.190 --> 23:50.670] That's the only thing we care about, really. As long as we can put it on a chip and the chip [23:50.670 --> 23:55.170] doesn't melt or catch fire, nothing else matters. So we started looking at different algorithms for [23:55.170 --> 23:59.830] that, working with my colleague Erdin Cazturk at Sabancı University in Turkey. We came up [23:59.830 --> 24:06.130] with a super low-latency implementation and put it on an FPGA. So it took about two months [24:06.130 --> 24:11.150] to kind of crank through that. And that runs then at about 67 nanoseconds. So [24:11.770 --> 24:18.590] the comparison with the CPU, you can see it's much faster. 20 times faster or so. [24:20.470 --> 24:26.150] And so we got that going. And we noticed sort of in February, March or something, [24:26.150 --> 24:30.130] we learned about this LCS35 puzzle and decided that, hey, this is something we could actually [24:30.130 --> 24:34.570] go tackle. It was supposed to take 35 years. It happens to use the same function we're working on. [24:34.570 --> 24:39.730] Why not use that as a test point for our hardware? You know, it'd be kind of neat to break it early [24:39.730 --> 24:45.930] and, you know, drive some excitement in VDFs. And so in May of this year, right, we actually [24:45.930 --> 24:49.590] solved that puzzle. It takes two months to compute on the FPGA instead of 35 years. [24:50.050 --> 24:54.450] And it was great. And in fact, we went to MIT at CSAIL. There was a ceremony [24:54.990 --> 25:01.630] with Ron Rivest, the RNRSA on the far your right. And we had a good time. And this is the whole [25:01.630 --> 25:05.450] crew. So we had one of the neat things about this project actually is it involves multiple [25:05.450 --> 25:09.710] blockchains collaborating. So we have Filecoin and Ethereum and now Interchain Foundation is [25:09.710 --> 25:19.430] working on it as well. And MIT, right. So that was fun. So how do we get to just two months? [25:19.430 --> 25:22.930] And so this chart, I'm going to briefly sort of walk you through what are the things that happened. [25:22.930 --> 25:28.050] So when Ron did his calculation for 35 years, he figured out, he estimated that it would take [25:28.050 --> 25:33.010] 79 trillion squarings. It would take 39 years. And so that was the T, the large number that [25:33.010 --> 25:37.950] Brian talked about. And he just assumed basically Moore's law scaling with frequency going up. But [25:37.950 --> 25:41.370] as you've noticed in the past 10 years, frequency hasn't gone up. You know, we don't have any 20 [25:41.370 --> 25:45.590] gigahertz processors. So you'd think it's slowed down, but there's a lot that happens in certain [25:45.590 --> 25:52.570] areas of certain computations that gets fed up. So for large integer multiplication, [25:53.710 --> 25:58.550] the move from 32 bits to 64 bits was big because we do these multiplies with a bunch of smaller [25:58.550 --> 26:02.810] multiplies and sort of compose them. So making one that's twice as big actually is twice as fast. [26:02.810 --> 26:06.610] So that's huge. That was a big improvement. Maybe, what was that, 10 years ago? [26:07.050 --> 26:11.330] There were some new instructions introduced into the CPUs to make carry chains more efficient [26:11.330 --> 26:17.070] for exactly this kind of operation about five years ago called ADCX, NATOX, and MOLEX. [26:17.410 --> 26:21.030] And these are both in Intel and AMD processors. And that helped quite a bit. [26:22.050 --> 26:25.210] Then you get some algorithmic improvements. You can do a number of things with algorithms. You [26:25.210 --> 26:29.630] can use Montgomery representations. You can optimize the software, right? The number of [26:29.630 --> 26:33.890] times you get these new instructions, new processors, they can do more issues at once. [26:33.990 --> 26:37.110] A lot of times you're in there optimizing the superscalar pipeline to make it as fast as [26:37.110 --> 26:42.790] possible. And that speeds it up. And so that's how the CPU kind of goes from 35 years to three [26:42.790 --> 26:47.270] and a half years, even though Moore's law scaling didn't quite follow the anticipated trajectory. [26:47.970 --> 26:53.550] On the FPGA, we went further. So instead of 64-bit multipliers, we have two 512-bit multipliers. [26:53.610 --> 26:56.830] That makes a huge difference. And then we use some other sort of low latency [26:57.970 --> 27:00.830] adder and accumulation techniques to really reduce the cycle time. [27:01.470 --> 27:05.050] And that's how we got to two months, right? And the FPGA is dedicated to solving this one problem [27:05.050 --> 27:16.690] fast. So where are we going in the future, right? So ultimately, we need to get to an ASIC design. [27:16.690 --> 27:20.870] So if we take the FPGA, and so how fast is that going to be, right? What does it buy you? [27:21.590 --> 27:25.970] In a synthesized FPGA design toward an ASIC, that's about a five nanosecond squaring. So [27:25.970 --> 27:32.710] we've gone from 1200 nanoseconds to five in that step. If we really optimize the design for an ASIC, [27:32.710 --> 27:38.010] we think we can get down to one in the end. On the FPGA, you're limited to the resources that [27:38.010 --> 27:43.330] are on the chip, both the DSPs and the routing resources and whatnot. And an ASIC, you can build [27:43.330 --> 27:48.270] exactly what you need. And you're unlimited as long as you can fit on that chip. And so that's [27:48.270 --> 27:52.850] where you get really extract all the parallelism of that one operation and get down to one [27:52.850 --> 27:58.850] nanosecond. And the goal is for EDFs ultimately to build this chip, probably, you know, 2021, [27:58.850 --> 28:03.550] maybe late 2020, something like that, and have silicon available to do this function, [28:03.550 --> 28:07.890] to put on Ethereum and Filecoin and a bunch of other blockchains that are interested. [28:09.070 --> 28:13.510] The other interesting thing, let me see. I want to mention before we go to the demos, [28:13.510 --> 28:19.390] this competition, we're running one now to develop new low latency squaring algorithms. [28:19.390 --> 28:22.890] We have one that's pretty fast. How do we know it's the fastest? We don't, right? So [28:23.250 --> 28:26.870] there is a prize out there starting with $100,000 for an FPGA competition [28:27.910 --> 28:32.030] to build the lowest latency one. And ultimately, the idea is to run an ASIC competition too with [28:32.130 --> 28:37.750] a $1 million prize. And hopefully that incentivizes all the people who are interested in low latency [28:37.750 --> 28:42.870] multipliers to sort of put their designs out there. And this is in the goal of making sure [28:42.870 --> 28:47.110] that we understand what that AMX is, so that somebody couldn't later build hardware that is [28:47.110 --> 28:51.050] 10 or 100 times faster and compromise security of the networks. [28:51.710 --> 28:55.630] So I'll do a quick demo here if everything is going to work. [28:58.420 --> 29:07.300] Okay, so we have this FPGA design running on AWS F1, which is their FPGA as a service platform. [29:07.300 --> 29:10.760] So on the left, what I'm going to kick off here, I'll start on the right, which is the software [29:10.760 --> 29:16.920] implementation in GMP. And I'm going to do 250 million squarings. It takes a couple minutes. [29:17.820 --> 29:25.800] That's going to start. And it's going to print out every maybe 10 million iterations what the [29:25.800 --> 29:29.140] number is. So you'll see it progress. Both of these are going to do the same thing. And on the [29:29.140 --> 29:38.260] left, I have the FPGA in AWS F1. Doing the same problem. So it first loads the FPGA. And what [29:38.260 --> 29:43.200] happens is it has to send the problem down to the FPGA. So there's a little bit of overhead. [29:43.480 --> 29:47.780] And every iteration is sending the problem and going to get back. But you can see they're doing [29:47.780 --> 29:54.160] the same thing. So each line is equivalent. And that's the sort of 50 nanoseconds for the squaring. [29:54.160 --> 29:59.480] It's 50 nanoseconds because this is a 1K RSA number, not the 2K that we did for the timelock [29:59.480 --> 30:03.520] puzzle. So that goes pretty fast. And I can show you here, I have one queued up for [30:05.520 --> 30:20.700] somewhere. I guess I didn't queue it up. So we can do a billion. So this will run a billion. [30:20.700 --> 30:24.640] It runs a little bit better on the FPGA. There's a little overhead with every time you send a [30:24.640 --> 30:30.040] problem to the FPGA with the communications coming back and forth, which eats into the cost, [30:30.040 --> 30:34.160] right? So if you run a billion, it's amortized a little bit better. You see 50.1 above. And [30:34.160 --> 30:40.740] sometimes you might see a number like 50.8. Our algorithm actually is a variable depth algorithm. [30:40.740 --> 30:45.200] Sometimes it takes mostly takes eight cycles to compute. Sometimes it's nine and sometimes it's [30:45.200 --> 30:50.500] 10, depending on the carries that happen in that round. So we try to optimize. The carries, it [30:50.500 --> 30:55.200] turns out, in multipliers are a big cost in terms of the latency because they have to ripple through [30:55.840 --> 30:58.480] every bit, right? So we try to optimize that by [30:59.940 --> 31:03.000] watching where the carries are and shortcutting it where we can. [31:04.840 --> 31:14.080] So the guy on the left should be running. Yeah, so I can mention there, the one billion finished. [31:14.220 --> 31:19.020] And you can see the CPU is still running. So the key is, right, for this AMAX, right, [31:19.020 --> 31:22.520] we want to make sure that that's a predictable amount. [31:24.420 --> 31:28.500] I think in Ethereum, the security parameter for AMAX is adjustable [31:29.360 --> 31:35.920] sort of in the protocol so that can be changed. The main thing is you can't build something like [31:35.920 --> 31:42.040] 100 or 1,000 times faster. And so if you have an ASIC that's pretty highly optimized, you want [31:42.040 --> 31:46.460] to make sure that somebody can't spend, say, 100 times more money and get something that is 100 [31:46.460 --> 31:50.980] times faster. It's pretty hard to do. But you do need to be at the sort of leading edge of silicon [31:50.980 --> 31:57.300] technology to ensure that. So there, the CPU one finished. It took quite a lot longer. 15 seconds [31:57.300 --> 32:02.860] versus, you know, two and a half minutes. And that's the story. So once we have the ASIC, [32:02.860 --> 32:07.140] if it's running at about a nanosecond, we would be able to solve the LCS, the 35-year time lock [32:07.140 --> 32:15.600] puzzle in about one day. So that'll be a goal for next year. So what are applications? It's [32:15.700 --> 32:20.000] a security conference. VDFs are great for blockchain. There's a couple sort of security [32:20.580 --> 32:23.660] ones that could be interesting. And I think Brian mentioned it a little bit. But one is sort of an [32:23.660 --> 32:27.580] unstoppable disclosure. If you have a zero day that you're going to, maybe you want to release [32:27.580 --> 32:31.940] it in a month or X amount of time, you could wrap it in a time lock puzzle and put it out there. [32:32.440 --> 32:36.080] And that sort of ensures that one is going to be released and then it sets the time too, [32:36.080 --> 32:40.660] so it can't be released sooner. Another is like a denial of service prevention or spam prevention. [32:40.660 --> 32:45.240] You can require sort of a VDF or a time lock to be solved, along with the proof that you [32:45.240 --> 32:49.880] solved it prior to every email. That sort of imposes a little bit of work to be done [32:49.880 --> 32:54.740] for the email that the receiver can actually verify and make sure you did the work. And so [32:54.740 --> 33:02.160] it's a way to sort of prevent some of these things. I think that's it, except for the [33:02.160 --> 33:08.640] competition. So this is our little flyer. If you go to vdfalliance.org, you can find out more about [33:08.640 --> 33:14.420] VDF Alliance. And I think it's a great consortium of blockchains and also commercial partners. We [33:14.420 --> 33:20.560] have AWS, Synopsys, Xilinx involved and it's growing. And you can participate in the contest [33:20.560 --> 33:25.140] and I hope you guys will all do that or find friends to do that and win $100,000. [33:27.740 --> 33:30.720] Any questions? I think we may be out of time, but... [33:33.020 --> 33:41.080] Yeah. It was, yeah. So coincidentally, and it was quite amusing, right? So we were solving [33:41.080 --> 33:45.920] the puzzle and projected to solve it in May. And there was a Belgian programmer who had [33:45.920 --> 33:51.760] started two years earlier working on the same problem, sort of in secret. And we both contacted [33:51.760 --> 33:58.120] MIT with our sort of intended solution within 24 hours of time. Completely random. We had [33:58.120 --> 34:02.240] no knowledge of each other, right? So, but he did beat us by a couple days or a couple [34:02.240 --> 34:07.000] weeks actually. And I think his persistence is remarkable and the fact that he was able to do [34:07.000 --> 34:11.540] it. And he moved a couple times in the process. But anyway, it was a great event. He was there [34:11.540 --> 34:27.200] too. He was in the picture, Bernard. And yeah, it was nice. Other questions? All right. Thank you.