WEBVTT - Automatic transcript; recognition may contain errors. Reviewed for technical wording and speaker labels. Times match the published episode.

00:00:06.450 --> 00:00:10.110
<v Aaron van Wirdum>Live from Utrecht, this is the Van Wirdum Sjorsnado.

00:00:10.590 --> 00:00:11.550
<v Sjors Provoost>That's right. Hello.

00:00:12.590 --> 00:00:13.410
<v Aaron van Wirdum>Sjors, welcome back.

00:00:13.730 --> 00:00:14.130
<v Sjors Provoost>Thank you.

00:00:14.530 --> 00:00:19.210
<v Aaron van Wirdum>You confirmed your status as Bitcoin Core Elite Developer this week.

00:00:19.390 --> 00:00:23.950
<v Sjors Provoost>Absolutely. Thanks to me, there has never been a more amazing way to send

00:00:23.950 --> 00:00:26.130
<v Sjors Provoost>Bitcoin. This is absolutely groundbreaking.

00:00:26.530 --> 00:00:27.350
<v Aaron van Wirdum>It changed everything.

00:00:27.630 --> 00:00:28.590
<v Sjors Provoost>It changed nothing.

00:00:29.050 --> 00:00:32.310
<v Aaron van Wirdum>Okay, to be clear, this is not what the episode is going to be about. The episode

00:00:32.310 --> 00:00:37.230
<v Aaron van Wirdum>is going to be about libsecp256k1 library.

00:00:37.610 --> 00:00:38.170
<v Sjors Provoost>That's right.

00:00:38.390 --> 00:00:42.810
<v Aaron van Wirdum>But I want to know about this game-changing technology that you just built and

00:00:42.810 --> 00:00:46.050
<v Aaron van Wirdum>implemented. What is it? What did it do? How did it change the world?

00:00:46.540 --> 00:00:49.520
<v Sjors Provoost>So there are many ways to send Bitcoin, but one of them is you download the

00:00:49.520 --> 00:00:53.020
<v Sjors Provoost>Bitcoin Core software and then it gives you a really nice graphical interface.

00:00:53.020 --> 00:00:54.640
<v Sjors Provoost>You click a bunch of buttons and poof.

00:00:55.040 --> 00:00:56.480
<v Aaron van Wirdum>So far so good?

00:00:56.600 --> 00:01:00.340
<v Sjors Provoost>So far so good, but there's also a command line way to do it. And especially if

00:01:00.340 --> 00:01:05.520
<v Sjors Provoost>you need to do anything advanced, like using it with a hardware wallet, you'll

00:01:05.520 --> 00:01:10.830
<v Sjors Provoost>have to use the command line. And it turns out the command line doesn't do

00:01:10.830 --> 00:01:15.570
<v Sjors Provoost>exactly what I want it to do. And so then you just make a pull request to change it.

00:01:15.750 --> 00:01:18.210
<v Aaron van Wirdum>What did you want to do exactly that it didn't do?

00:01:18.670 --> 00:01:23.830
<v Sjors Provoost>Well, in this case, originally, I wanted to add PSBT support to...

00:01:23.830 --> 00:01:25.710
<v Aaron van Wirdum>Partially signed Bitcoin transactions.

00:01:25.930 --> 00:01:29.370
<v Sjors Provoost>Exactly, which we discussed in the first episode. I wanted to add that to the

00:01:29.370 --> 00:01:34.250
<v Sjors Provoost>standard way of sending. But the problem is this command line stuff is used by a

00:01:34.250 --> 00:01:38.370
<v Sjors Provoost>lot of automated systems. So a lot of Bitcoin exchanges, they might be running

00:01:38.370 --> 00:01:42.150
<v Sjors Provoost>Bitcoin Core, and they might be relying, or Bitcoin ATMs, they might be relying

00:01:42.150 --> 00:01:46.570
<v Sjors Provoost>on these methods. Which means if you change them, you have to be very, very

00:01:46.570 --> 00:01:49.450
<v Sjors Provoost>careful not to suddenly break a million Bitcoin ATMs.

00:01:51.710 --> 00:01:56.030
<v Sjors Provoost>Any change to the existing method will run into that type of problem. You can

00:01:56.030 --> 00:02:00.410
<v Sjors Provoost>usually add stuff but then it becomes super ugly because you just add another

00:02:00.410 --> 00:02:05.030
<v Sjors Provoost>argument and another argument and so it just becomes tedious to use. So

00:02:05.030 --> 00:02:10.910
<v Sjors Provoost>ultimately I decided to just create a new send method. So now there's like five

00:02:10.910 --> 00:02:12.650
<v Sjors Provoost>different ways to send from the command line.

00:02:12.910 --> 00:02:13.190
<v Aaron van Wirdum>Right.

00:02:13.470 --> 00:02:16.710
<v Sjors Provoost>But there was a couple that were really designed from the beginning just to send

00:02:16.710 --> 00:02:20.050
<v Sjors Provoost>coins to somebody else. And there was a couple designed for PSBT specifically.

00:02:20.310 --> 00:02:23.910
<v Sjors Provoost>But those are very inconvenient to use if you just want to send something and

00:02:23.910 --> 00:02:25.210
<v Sjors Provoost>click OK on a hardware device.

00:02:25.770 --> 00:02:26.170
<v Aaron van Wirdum>Right.

00:02:26.410 --> 00:02:31.950
<v Sjors Provoost>So this one is future proof. It should be able to send coins very quickly. But if

00:02:31.950 --> 00:02:35.750
<v Sjors Provoost>you want to then expand Bitcoin Core to work with hardware wallets, it's like a

00:02:35.750 --> 00:02:39.790
<v Sjors Provoost>one line change so that it also works for that. Just kind of why I built it. So

00:02:39.790 --> 00:02:44.030
<v Sjors Provoost>it was a prerequisite of the one of the many, many, many prerequisites to having

00:02:44.030 --> 00:02:45.590
<v Sjors Provoost>easy to use hardware wallet support.

00:02:46.640 --> 00:02:50.040
<v Aaron van Wirdum>Right. Yeah, you've done a bunch of work on hardware wallet integration for

00:02:50.040 --> 00:02:50.880
<v Aaron van Wirdum>Bitcoin Core, haven't you?

00:02:51.080 --> 00:02:55.060
<v Sjors Provoost>A little bit, yeah. I think the bulk is still Andrew Chow. He's been completely

00:02:55.060 --> 00:03:00.100
<v Sjors Provoost>rewritten the wallet. I like to test this stuff and review it. But yeah, I'm

00:03:00.100 --> 00:03:04.200
<v Sjors Provoost>using the library, the HWI library that he wrote, which is basically just a

00:03:04.200 --> 00:03:08.520
<v Sjors Provoost>collection of drivers from all the different hardware wallets. So all the

00:03:08.520 --> 00:03:12.080
<v Sjors Provoost>different hardware wallets, they usually have some Python code, but that also

00:03:12.080 --> 00:03:17.800
<v Sjors Provoost>supports all their shit coins. and this we basically just took the essential

00:03:17.800 --> 00:03:20.300
<v Sjors Provoost>parts of the code With just Bitcoin support.

00:03:20.480 --> 00:03:20.840
<v Aaron van Wirdum>Right.

00:03:20.960 --> 00:03:23.980
<v Sjors Provoost>And just shoved it into one little project that you can download.

00:03:24.400 --> 00:03:29.880
<v Aaron van Wirdum>Right. So yeah, and this new, the Ultimate Send RPG, what was it called?

00:03:30.080 --> 00:03:33.900
<v Sjors Provoost>RPC? Yeah, the Ultimate Send RPC is the name. I think it's going to be marked

00:03:33.900 --> 00:03:38.760
<v Sjors Provoost>experimental because there'll probably be plenty of bike shedding of what the

00:03:38.760 --> 00:03:40.560
<v Sjors Provoost>exact interface should look like.

00:03:40.700 --> 00:03:44.440
<v Aaron van Wirdum>Right. But it's a small step towards hardware wallet integration.

00:03:44.760 --> 00:03:47.000
<v Sjors Provoost>It's one of a hundred small steps, yes.

00:03:48.020 --> 00:03:49.340
<v Aaron van Wirdum>Great. Thank you, Sjors.

00:03:49.580 --> 00:03:51.780
<v Sjors Provoost>Yeah, I was a bit surprised that it got merged as quickly as it did.

00:03:52.800 --> 00:03:53.980
<v Aaron van Wirdum>Oh, should we be concerned?

00:03:56.000 --> 00:03:56.880
<v Aaron van Wirdum>Should we be worried?

00:03:57.140 --> 00:03:57.340
<v Sjors Provoost>No.

00:03:57.760 --> 00:03:57.940
<v Aaron van Wirdum>Okay.

00:03:59.210 --> 00:04:00.230
<v Aaron van Wirdum>We're going to discuss

00:04:00.230 --> 00:04:05.810
<v Aaron van Wirdum>libsecp256k1.

00:04:06.030 --> 00:04:10.070
<v Aaron van Wirdum>Thank you. Why are we going to discuss it? We are going to discuss it because

00:04:10.070 --> 00:04:13.570
<v Aaron van Wirdum>BIP340 support was merged into

00:04:13.570 --> 00:04:18.090
<v Aaron van Wirdum>libsecp256k1 this week.

00:04:18.330 --> 00:04:19.110
<v Sjors Provoost>What was merged?

00:04:20.150 --> 00:04:20.870
<v Aaron van Wirdum>Shut up.

00:04:21.510 --> 00:04:22.410
<v Sjors Provoost>Schnorr was added.

00:04:22.730 --> 00:04:22.830
<v Aaron van Wirdum>Yes.

00:04:23.090 --> 00:04:23.370
<v Sjors Provoost>Okay. Yeah.

00:04:23.470 --> 00:04:28.880
<v Aaron van Wirdum>So Schnorr. Exactly. Thank you. For actually making it clear for our listener.

00:04:29.260 --> 00:04:32.320
<v Aaron van Wirdum>Oh, I misunderstood your question. Yeah, Schnorr was added.

00:04:32.760 --> 00:04:32.960
<v Sjors Provoost>Yes.

00:04:33.300 --> 00:04:36.620
<v Aaron van Wirdum>So, libsecp256k1 is a library.

00:04:36.800 --> 00:04:37.360
<v Sjors Provoost>That's right.

00:04:37.500 --> 00:04:41.600
<v Aaron van Wirdum>And we're going to explain what this library actually is or why it exists or what

00:04:41.600 --> 00:04:44.920
<v Aaron van Wirdum>it does. And the reason we're going to explain that is because I actually didn't

00:04:44.920 --> 00:04:49.160
<v Aaron van Wirdum>know that much about it. It's one of these things for me that I heard about and I

00:04:49.160 --> 00:04:54.320
<v Aaron van Wirdum>kind of know what it is, but I never really... got into it to any sort of serious

00:04:54.320 --> 00:04:57.060
<v Aaron van Wirdum>extent. Okay, libraries, first of all. Let's start with libraries.

00:04:57.280 --> 00:04:57.880
<v Sjors Provoost>Let's talk about libraries.

00:04:58.080 --> 00:05:00.360
<v Aaron van Wirdum>There's a thing called software libraries.

00:05:00.980 --> 00:05:01.380
<v Sjors Provoost>Yes.

00:05:01.820 --> 00:05:05.400
<v Aaron van Wirdum>And I'll just let you explain what a software library is, first of all. So for

00:05:05.400 --> 00:05:08.900
<v Aaron van Wirdum>any programmer that's listening, this is probably going to be very, very new-ish

00:05:08.900 --> 00:05:12.340
<v Aaron van Wirdum>for you, but for people like me, this is actually kind of interesting.

00:05:12.460 --> 00:05:17.420
<v Sjors Provoost>The easiest way to describe a library is it's a reusable piece of software. So...

00:05:18.300 --> 00:05:23.420
<v Sjors Provoost>For example, OpenSSL is a library we'll talk about. It is a piece of software

00:05:23.420 --> 00:05:27.320
<v Sjors Provoost>that lets you do all sorts of cryptographic operations from creating random

00:05:27.320 --> 00:05:33.300
<v Sjors Provoost>numbers to signing stuff with every curve under the sun. But it's not

00:05:33.300 --> 00:05:36.700
<v Sjors Provoost>an actual program. It doesn't really do anything by itself. But other programs

00:05:36.700 --> 00:05:40.420
<v Sjors Provoost>can use a library to do whatever they want without having to rewrite that stuff.

00:05:40.580 --> 00:05:44.260
<v Aaron van Wirdum>Or I assume you can take a part of the library, not necessarily the whole

00:05:44.260 --> 00:05:46.580
<v Aaron van Wirdum>library, but get a specific...

00:05:46.990 --> 00:05:50.250
<v Sjors Provoost>You take the entire library, but you use a subset of it.

00:05:50.430 --> 00:05:56.290
<v Aaron van Wirdum>Exactly, yes. So Bitcoin was at some point in the past relying

00:05:56.290 --> 00:05:57.430
<v Aaron van Wirdum>on OpenSSL?

00:05:57.630 --> 00:06:02.090
<v Sjors Provoost>Yeah, until actually very recently, a few months ago. But for less and less and

00:06:02.090 --> 00:06:06.770
<v Sjors Provoost>less stuff. So in the beginning, OpenSSL was used for all the things. In

00:06:06.770 --> 00:06:12.230
<v Sjors Provoost>particular, the reason it was needed is because Satoshi picked a cryptographic

00:06:12.230 --> 00:06:18.230
<v Sjors Provoost>curve, the secp256k1 curve, because it was pretty.

00:06:19.110 --> 00:06:23.170
<v Sjors Provoost>And OpenSSL had support for it. So he did not have to write all this

00:06:23.170 --> 00:06:26.170
<v Sjors Provoost>cryptographic functionality, which, of course, you never want to do yourself.

00:06:26.170 --> 00:06:30.130
<v Sjors Provoost>It's very dangerous to write your own cryptographic stuff. And this is also a

00:06:30.130 --> 00:06:34.690
<v Sjors Provoost>reason why he didn't use Schnorr, because there was no library for it. There were

00:06:34.690 --> 00:06:38.110
<v Sjors Provoost>other reasons, but this was a reason, a practical reason.

00:06:38.800 --> 00:06:43.360
<v Aaron van Wirdum>So just to be clear, when you say Bitcoin Core or Satoshi use this library, the

00:06:43.360 --> 00:06:48.500
<v Aaron van Wirdum>OpenSSL library, how does a software program actually use a library?

00:06:49.000 --> 00:06:54.680
<v Sjors Provoost>You just Google on Stack Overview how to use OpenSSL, and then you just look at

00:06:54.680 --> 00:06:55.240
<v Sjors Provoost>the examples.

00:06:55.560 --> 00:06:59.620
<v Aaron van Wirdum>Let me rephrase the question. Where is the library?

00:07:00.010 --> 00:07:04.790
<v Sjors Provoost>oh the library is included in the software package when you download it right so

00:07:04.790 --> 00:07:08.630
<v Sjors Provoost>in this binary file contains some of the bitcoin core specific stuff and then a

00:07:08.630 --> 00:07:12.190
<v Sjors Provoost>whole bunch of libraries and that's what makes it so big, or like 20 20 megabytes.

00:07:12.190 --> 00:07:16.410
<v Aaron van Wirdum>Right. So when you download Bitcoin Core the software, Bitcoin Core 20 is the

00:07:16.410 --> 00:07:17.230
<v Aaron van Wirdum>newest one I guess.

00:07:17.230 --> 00:07:17.470
<v Sjors Provoost>Yep.

00:07:17.470 --> 00:07:23.280
<v Aaron van Wirdum>Then you actually download well in this case not OpenSSL anymore but you... For

00:07:23.280 --> 00:07:27.020
<v Aaron van Wirdum>Bitcoin 19, you actually downloaded the whole OpenSSL library.

00:07:27.260 --> 00:07:27.820
<v Sjors Provoost>Yeah, that's correct.

00:07:28.040 --> 00:07:33.440
<v Aaron van Wirdum>And then it's hosted on your computer from that point on. You have the library on

00:07:33.440 --> 00:07:34.760
<v Aaron van Wirdum>your own computer.

00:07:35.180 --> 00:07:38.740
<v Sjors Provoost>There's two ways to go about that. You can have a library sitting on your

00:07:38.740 --> 00:07:42.440
<v Sjors Provoost>computer already. And then software can say, let me just see if I can find that

00:07:42.440 --> 00:07:47.440
<v Sjors Provoost>library. And I'll use that. Then your download gets smaller. But the problem is

00:07:47.440 --> 00:07:52.420
<v Sjors Provoost>that libraries change. And so you don't want to be surprised by what's on the

00:07:52.420 --> 00:07:54.200
<v Sjors Provoost>computer, especially with cryptographic stuff.

00:07:54.740 --> 00:07:55.220
<v Aaron van Wirdum>Right.

00:07:55.520 --> 00:07:59.520
<v Sjors Provoost>And even if you include it in the download, you can be surprised by what happens

00:07:59.520 --> 00:08:02.760
<v Sjors Provoost>to the library because somebody else is maintaining that library. If you're not

00:08:02.760 --> 00:08:06.120
<v Sjors Provoost>paying attention to what that other person is doing, they might break something.

00:08:06.590 --> 00:08:07.370
<v Sjors Provoost>Very bad.

00:08:07.590 --> 00:08:11.990
<v Aaron van Wirdum>Right. So in the case of let's stick to Bitcoin 19 and Bitcoin core 19.

00:08:12.290 --> 00:08:16.490
<v Sjors Provoost>Well, in this case, maybe take an older one because I think it was Bitcoin core 0

00:08:16.490 --> 00:08:17.290
<v Sjors Provoost>.8 or something.

00:08:17.990 --> 00:08:20.950
<v Aaron van Wirdum>Let's take Bitcoin core. I don't know where you're going with this, but let's

00:08:20.950 --> 00:08:21.470
<v Aaron van Wirdum>take that one.

00:08:21.910 --> 00:08:22.030
<v Sjors Provoost>Yep.

00:08:22.350 --> 00:08:25.210
<v Aaron van Wirdum>So someone else is maintaining this library.

00:08:25.490 --> 00:08:25.610
<v Sjors Provoost>Yeah.

00:08:26.230 --> 00:08:28.250
<v Aaron van Wirdum>Bitcoin core developers are maintaining Bitcoin.

00:08:28.710 --> 00:08:28.850
<v Sjors Provoost>Yep.

00:08:29.070 --> 00:08:32.110
<v Aaron van Wirdum>They write something in the code. They use some part of the library. You download

00:08:32.110 --> 00:08:37.950
<v Aaron van Wirdum>the library from the Bitcoin core code. a part of libraries

00:08:37.950 --> 00:08:43.110
<v Aaron van Wirdum>used and then the Bitcoin Core developers may not have noticed some change

00:08:43.110 --> 00:08:48.210
<v Aaron van Wirdum>that happened in the library and all of the sudden the stuff that they wanted

00:08:48.210 --> 00:08:52.110
<v Aaron van Wirdum>Bitcoin Core to do isn't actually doing what they wanted Bitcoin Core to do

00:08:52.110 --> 00:08:55.650
<v Aaron van Wirdum>because the library wasn't doing what they thought it would do because someone

00:08:55.650 --> 00:08:58.870
<v Aaron van Wirdum>else was maintaining the library. Is that a correct summary?

00:08:59.230 --> 00:09:02.650
<v Sjors Provoost>Yeah, that's right. And to clarify what specifically happened here.

00:09:02.990 --> 00:09:08.210
<v Aaron van Wirdum>You picked Bitcoin Core 8 because there was a specific example you wanted to go to.

00:09:08.350 --> 00:09:10.430
<v Sjors Provoost>Yeah, I might be wrong about the number because Bitcoin Core 8 had a different

00:09:10.430 --> 00:09:16.390
<v Sjors Provoost>problem. But sort of around that time, there was another bug in OpenSSL that

00:09:16.390 --> 00:09:19.890
<v Sjors Provoost>I believe was unrelated to the problem that happened. But they basically had to

00:09:19.890 --> 00:09:22.830
<v Sjors Provoost>upgrade OpenSSL because the old version was simply not safe.

00:09:24.260 --> 00:09:28.380
<v Sjors Provoost>Unbeknownst to the core devs, there was another change in OpenSSL when they

00:09:28.380 --> 00:09:33.280
<v Sjors Provoost>upgraded. And in particular, this was about when you see a signature, do you

00:09:33.280 --> 00:09:34.300
<v Sjors Provoost>consider it valid or not?

00:09:35.590 --> 00:09:39.810
<v Sjors Provoost>And the original version of OpenSSL was pretty relaxed. So it would accept

00:09:39.810 --> 00:09:43.730
<v Sjors Provoost>signatures as valid, even if they did not meet the exact spec. Now, they wouldn't

00:09:43.730 --> 00:09:47.490
<v Sjors Provoost>be signed by somebody else, so it wasn't about stealing funds. But you could be a

00:09:47.490 --> 00:09:52.250
<v Sjors Provoost>little bit sloppy about maybe you add a byte to the signature or maybe not. So

00:09:52.250 --> 00:09:56.750
<v Sjors Provoost>the notation could be a bit sloppy. And the new version was very picky. Now, if

00:09:56.750 --> 00:10:00.170
<v Sjors Provoost>you use Bitcoin software to create a transaction, that was not a problem. Because

00:10:00.170 --> 00:10:03.950
<v Sjors Provoost>any Bitcoin transaction was signed very strictly, according to the protocol.

00:10:05.250 --> 00:10:10.150
<v Sjors Provoost>But if you're now validating these transactions, if you use old software and you

00:10:10.150 --> 00:10:13.430
<v Sjors Provoost>would see a sloppy version that was made with some other piece of software, the

00:10:13.430 --> 00:10:16.890
<v Sjors Provoost>old software would be fine. The new software would say it's invalid. So all of a

00:10:16.890 --> 00:10:18.250
<v Sjors Provoost>sudden you have an accidental soft fork.

00:10:18.750 --> 00:10:20.510
<v Aaron van Wirdum>Right. And that's what actually happens.

00:10:20.830 --> 00:10:22.030
<v Sjors Provoost>Well, yes.

00:10:22.530 --> 00:10:25.050
<v Aaron van Wirdum>That's the BIP-66 one?

00:10:25.250 --> 00:10:25.450
<v Sjors Provoost>Right.

00:10:25.630 --> 00:10:26.810
<v Aaron van Wirdum>Is that what we're talking about here?

00:10:27.010 --> 00:10:31.990
<v Sjors Provoost>Correct. BIP-66 was introduced. Because people became aware of this problem. At

00:10:31.990 --> 00:10:34.810
<v Sjors Provoost>least some of the developers became aware of this problem. So they knew there was

00:10:34.810 --> 00:10:39.430
<v Sjors Provoost>an accidental software time bomb, basically, in the code. And so they proposed

00:10:39.430 --> 00:10:43.770
<v Sjors Provoost>BIP66 as saying, oh, by the way, we should be more strict about what these

00:10:43.770 --> 00:10:47.590
<v Sjors Provoost>signatures look like. Without saying, oh, by the way, there's a bug in OpenSSL,

00:10:47.670 --> 00:10:48.730
<v Sjors Provoost>so we'd better do this now.

00:10:48.990 --> 00:10:53.470
<v Aaron van Wirdum>Oh, it was like a secret bug fix of a problem with OpenSSL? I don't think I knew

00:10:53.470 --> 00:10:54.350
<v Aaron van Wirdum>that. Okay.

00:10:54.630 --> 00:10:59.050
<v Sjors Provoost>Well, yeah. I mean, OpenSSL essentially improved itself by becoming more strict,

00:10:59.070 --> 00:11:01.610
<v Sjors Provoost>but that made it a consensus change.

00:11:01.750 --> 00:11:01.890
<v Aaron van Wirdum>Right.

00:11:02.050 --> 00:11:05.390
<v Sjors Provoost>Because what's consensus code? It's also whatever your libraries are doing.

00:11:05.610 --> 00:11:06.090
<v Aaron van Wirdum>Right. Yep.

00:11:06.410 --> 00:11:10.830
<v Sjors Provoost>So basically, OpenSSL introduced the soft fork, but without saying, oh, you know,

00:11:11.010 --> 00:11:14.590
<v Sjors Provoost>there's no deployment date in the OpenSSL update. It just randomly happened.

00:11:14.850 --> 00:11:20.470
<v Aaron van Wirdum>Right. So that's a great example of why a dependency, because that's the official

00:11:20.470 --> 00:11:21.290
<v Aaron van Wirdum>term, is a problem.

00:11:21.630 --> 00:11:21.790
<v Sjors Provoost>Exactly.

00:11:21.950 --> 00:11:26.560
<v Aaron van Wirdum>This is a good example of that. And there have been more problems with OpenSSL, I think.

00:11:26.700 --> 00:11:30.540
<v Sjors Provoost>I mean, OpenSSL is famous for vulnerabilities. And, you know, the main, I think,

00:11:31.000 --> 00:11:34.320
<v Sjors Provoost>big reason behind that is that these libraries are used by everyone for decades,

00:11:34.320 --> 00:11:38.960
<v Sjors Provoost>but they're only maintained by one guy in Germany who doesn't get funded.

00:11:39.260 --> 00:11:39.660
<v Aaron van Wirdum>Right.

00:11:39.860 --> 00:11:42.940
<v Sjors Provoost>Just like curl, I think, is another famous example of that. It's like a library

00:11:42.940 --> 00:11:47.340
<v Sjors Provoost>that downloads files. curl, it's used everywhere. It's probably used in a space

00:11:47.340 --> 00:11:51.380
<v Sjors Provoost>shuttle, but there's just one guy that maintains it and nobody's helping.

00:11:51.800 --> 00:11:52.120
<v Aaron van Wirdum>Right.

00:11:52.320 --> 00:11:55.440
<v Sjors Provoost>And it's not good when the entire internet relies on it. And in the case of

00:11:55.440 --> 00:11:58.220
<v Sjors Provoost>OpenSSL, yeah, there have been plenty of bugs, and it's very easy to make

00:11:58.220 --> 00:11:59.980
<v Sjors Provoost>mistakes with cryptographic code, you know.

00:12:00.500 --> 00:12:00.680
<v Aaron van Wirdum>Yeah.

00:12:00.760 --> 00:12:06.780
<v Sjors Provoost>You forget, and it's written in C, so you forget a semicolon. Whoops.

00:12:07.450 --> 00:12:07.810
<v Aaron van Wirdum>Right.

00:12:08.250 --> 00:12:11.310
<v Sjors Provoost>Now you're skipping a line. So one of the bugs that was called Heartbleed.

00:12:11.470 --> 00:12:13.590
<v Aaron van Wirdum>Yeah, that was fairly recent, a couple of years ago.

00:12:13.710 --> 00:12:19.090
<v Sjors Provoost>Yeah, a couple of years ago. I think it was a missing colon or like literally

00:12:19.090 --> 00:12:20.670
<v Sjors Provoost>just a one character mistake.

00:12:20.890 --> 00:12:22.570
<v Aaron van Wirdum>Yeah. And it affected basically.

00:12:22.930 --> 00:12:25.710
<v Sjors Provoost>Yeah, it allowed you to log into any computer on the internet.

00:12:25.830 --> 00:12:26.510
<v Aaron van Wirdum>Affected everything.

00:12:26.930 --> 00:12:26.990
<v Sjors Provoost>Without a password.

00:12:27.310 --> 00:12:28.130
<v Aaron van Wirdum>Yeah. Right.

00:12:28.430 --> 00:12:31.790
<v Sjors Provoost>That's a sort of severity. And something like that in Bitcoin, of course, you

00:12:31.790 --> 00:12:34.870
<v Sjors Provoost>know, could mean, oh, now we have a problem. Everybody can just steal all the

00:12:34.870 --> 00:12:40.500
<v Sjors Provoost>money. So eventually, well, at the same time, Pieter Wuille was working on

00:12:40.500 --> 00:12:41.500
<v Sjors Provoost>a library.

00:12:41.780 --> 00:12:47.740
<v Aaron van Wirdum>For our American and English listeners, that's Pieter Wuille, or however

00:12:47.740 --> 00:12:48.860
<v Aaron van Wirdum>they want to pronounce it.

00:12:49.020 --> 00:12:49.700
<v Sjors Provoost>Yeah, or sipa.

00:12:51.460 --> 00:12:52.720
<v Aaron van Wirdum>Pieter Wuille, go on.

00:12:52.880 --> 00:12:57.100
<v Sjors Provoost>He was working on a library, so a piece of software, that was specifically

00:12:57.100 --> 00:13:02.750
<v Sjors Provoost>designed to create and verify Bitcoin signatures. And his original motivation

00:13:02.750 --> 00:13:05.350
<v Sjors Provoost>was just to do it faster than OpenSSL.

00:13:05.790 --> 00:13:10.450
<v Aaron van Wirdum>Okay. So it wasn't a security motivation. It was just a performance improvement

00:13:10.450 --> 00:13:10.930
<v Aaron van Wirdum>motivation.

00:13:11.150 --> 00:13:15.090
<v Sjors Provoost>Exactly. He explains this in a podcast he did with Chaincode. So if you Google

00:13:15.090 --> 00:13:19.010
<v Sjors Provoost>that, it might be in the show notes. Basically, he wanted to make it, I think,

00:13:19.090 --> 00:13:23.970
<v Sjors Provoost>about four times faster. And he could try and modify the OpenSSL code itself. But

00:13:23.970 --> 00:13:29.510
<v Sjors Provoost>apparently it's like such a nightmare to change any of that code. And also... The

00:13:29.510 --> 00:13:32.850
<v Sjors Provoost>OpenSSL code is very generic. It has to support all different kinds of

00:13:32.850 --> 00:13:36.770
<v Sjors Provoost>cryptography. So it's more difficult if you want to change anything, you have to

00:13:36.770 --> 00:13:41.610
<v Sjors Provoost>be very abstract in all the things you do. It's just like when you write a law.

00:13:41.810 --> 00:13:45.210
<v Sjors Provoost>You can't just say, John can't go to the supermarket. You have to say something

00:13:45.210 --> 00:13:49.750
<v Sjors Provoost>like, well, anybody over the 20 centimeters in size cannot go to a supermarket.

00:13:49.770 --> 00:13:53.450
<v Sjors Provoost>So it's very difficult to write these abstract documents. So he basically wrote

00:13:53.450 --> 00:13:58.650
<v Sjors Provoost>it from scratch specifically for that curve. And it was added to Bitcoin Core, I

00:13:58.650 --> 00:14:03.730
<v Sjors Provoost>think pretty early, but just to verify signatures and then later on also to

00:14:03.730 --> 00:14:09.110
<v Sjors Provoost>create signatures. And that coincided with this security vulnerability. So it was

00:14:09.110 --> 00:14:12.290
<v Sjors Provoost>a good, but I don't think it was a cause of it. It was sort of around the same

00:14:12.290 --> 00:14:16.150
<v Sjors Provoost>time. It's like, okay, we've had this near miss, like we could have had a serious

00:14:16.150 --> 00:14:19.790
<v Sjors Provoost>problem. Let's not use OpenSSL for that critical stuff anymore.

00:14:20.130 --> 00:14:24.750
<v Aaron van Wirdum>Yeah. And so then the goal was to get rid of that. Dependent. Now I forgot the word.

00:14:25.050 --> 00:14:25.330
<v Sjors Provoost>Dependency.

00:14:26.030 --> 00:14:31.410
<v Aaron van Wirdum>Exactly. And write a whole new cryptographic software library for Bitcoin.

00:14:32.210 --> 00:14:34.310
<v Sjors Provoost>Right. Just the curve.

00:14:34.490 --> 00:14:38.130
<v Aaron van Wirdum>Just an elliptic curve. Just the thing that's used for signatures. Yeah.

00:14:38.310 --> 00:14:41.710
<v Sjors Provoost>Because there's other cryptographic code in the Bitcoin core code base. For

00:14:41.710 --> 00:14:46.030
<v Sjors Provoost>example, SHA-256 is in there and a few other curves. And I think those were

00:14:46.030 --> 00:14:49.570
<v Sjors Provoost>originally also from OpenSSL. But those things are a little bit less scary. Like

00:14:49.570 --> 00:14:54.130
<v Sjors Provoost>you can implement SHA-256 in a day. If you're bored in any programming language.

00:14:54.350 --> 00:14:57.650
<v Aaron van Wirdum>Does it still use libraries for that though? Or was that rewritten?

00:14:58.030 --> 00:15:03.990
<v Sjors Provoost>No, so SHA256, as far as I know, is... directly in the code so

00:15:03.990 --> 00:15:07.190
<v Sjors Provoost>it's just it's just copy pasted from somewhere and then improved.

00:15:07.190 --> 00:15:11.490
<v Aaron van Wirdum>Right, got it. Okay, so libsec 256 am I saying that right?

00:15:11.490 --> 00:15:13.310
<v Sjors Provoost>libsecp256k1

00:15:13.310 --> 00:15:18.350
<v Aaron van Wirdum>Thank you. that was to get rid... So it was meant as a performance improvement

00:15:18.350 --> 00:15:24.270
<v Aaron van Wirdum>then it was pivoted to actually be a new library for bitcoin or

00:15:24.270 --> 00:15:29.350
<v Aaron van Wirdum>at least sort of bitcoin specific library to get rid of this dependency you

00:15:29.350 --> 00:15:34.750
<v Aaron van Wirdum>mentioned this before but Isn't that also a risk? Like rolling your own crypto?

00:15:35.110 --> 00:15:39.850
<v Sjors Provoost>Absolutely. So the fact that this thing was, like this was reviewed by a lot of

00:15:39.850 --> 00:15:44.670
<v Sjors Provoost>people, a lot of good cryptographers before adding it. And I think it was also

00:15:44.670 --> 00:15:50.590
<v Sjors Provoost>compared against OpenSSL in terms of like using the same tests. But yeah, at

00:15:50.590 --> 00:15:54.430
<v Sjors Provoost>some point, I mean, at some point you have to take that risk because the other

00:15:54.430 --> 00:15:56.810
<v Sjors Provoost>one is like just waiting for OpenSSL to explode.

00:15:57.090 --> 00:16:00.110
<v Aaron van Wirdum>Plus it was Pieter Wuille there, so can't really go wrong with that.

00:16:00.580 --> 00:16:05.160
<v Sjors Provoost>Well, you know, you don't want to have proof of Wuille. But a lot of very smart

00:16:05.160 --> 00:16:08.840
<v Sjors Provoost>people looked at it. Probably the same people who would also look at OpenSSL. So

00:16:08.840 --> 00:16:13.120
<v Sjors Provoost>that's good. But you don't want to make a habit of this. And in fact, they do

00:16:13.120 --> 00:16:16.620
<v Sjors Provoost>constantly make very small tweaks to that library to make it a little bit faster.

00:16:16.780 --> 00:16:19.620
<v Sjors Provoost>But you want to be very careful with that.

00:16:19.900 --> 00:16:23.640
<v Aaron van Wirdum>Right. Okay, so that's the library. Bitcoin has its own library now. Is this used

00:16:23.640 --> 00:16:24.880
<v Aaron van Wirdum>by any other programs?

00:16:25.160 --> 00:16:28.160
<v Sjors Provoost>But keep in mind, it's turtles all the way down, right? Because OpenSSL is also

00:16:28.160 --> 00:16:29.100
<v Sjors Provoost>just written by people.

00:16:29.690 --> 00:16:30.190
<v Aaron van Wirdum>Sure.

00:16:30.430 --> 00:16:32.550
<v Sjors Provoost>So everything is an implementation at some point.

00:16:32.770 --> 00:16:33.070
<v Aaron van Wirdum>Sure, sure.

00:16:34.070 --> 00:16:35.810
<v Sjors Provoost>Okay. So your question?

00:16:35.970 --> 00:16:39.870
<v Aaron van Wirdum>I guess my first question would be, is this library used by anything other than Bitcoin?

00:16:40.150 --> 00:16:45.130
<v Sjors Provoost>Yes. So this library is, I just heard it on a podcast with Vitalik. It's also

00:16:45.130 --> 00:16:49.710
<v Sjors Provoost>used by Ethereum. So, and a whole bunch of other cryptocurrencies. Basically any

00:16:49.710 --> 00:16:55.550
<v Sjors Provoost>cryptocurrencies that uses the secp256k1 elliptic curve. which is just

00:16:55.550 --> 00:16:57.130
<v Sjors Provoost>a nice mathematical object.

00:16:57.350 --> 00:17:00.970
<v Aaron van Wirdum>Right. Mostly cryptocurrencies, though. Only cryptocurrencies. It's pretty

00:17:00.970 --> 00:17:02.430
<v Aaron van Wirdum>cryptocurrency-specific, at least.

00:17:02.490 --> 00:17:05.710
<v Sjors Provoost>Yeah, I'm not aware of any non-cryptocurrency project that uses it. It could,

00:17:06.030 --> 00:17:10.170
<v Sjors Provoost>right? It's just a library that allows you to sign stuff, sign messages, and

00:17:10.170 --> 00:17:14.670
<v Sjors Provoost>verify the signature on a message. So you could write an encrypted chat

00:17:14.670 --> 00:17:19.490
<v Sjors Provoost>application that uses this curve if you wanted to. But I don't know. I guess the

00:17:19.490 --> 00:17:23.450
<v Sjors Provoost>encrypted chat applications out there might have their own curve that they use.

00:17:23.740 --> 00:17:26.480
<v Sjors Provoost>for their thing. I don't know what Signal uses but they could yeah.

00:17:26.900 --> 00:17:31.440
<v Aaron van Wirdum>Okay, so that's libsec. I keep having to pronounce this.

00:17:31.600 --> 00:17:33.780
<v Sjors Provoost>Yeah, we just splice it in the audio later.

00:17:33.900 --> 00:17:37.680
<v Aaron van Wirdum>I'll just call it libsec. Is there anything else that's called libsec that would

00:17:37.680 --> 00:17:38.540
<v Aaron van Wirdum>confuse people?

00:17:38.700 --> 00:17:39.280
<v Sjors Provoost>libsecp.

00:17:39.560 --> 00:17:44.240
<v Aaron van Wirdum>libsecp. Okay, so libsecp. Is that everything we need to know about libsecp?

00:17:44.500 --> 00:17:45.320
<v Sjors Provoost>I think so.

00:17:45.740 --> 00:17:49.420
<v Aaron van Wirdum>Yeah. Okay, so BIP340 was merged, which is Schnorr.

00:17:49.960 --> 00:17:50.240
<v Sjors Provoost>Exactly.

00:17:50.580 --> 00:17:52.360
<v Aaron van Wirdum>This has been in development for a long time as well.

00:17:52.540 --> 00:17:52.800
<v Sjors Provoost>Yep.

00:17:53.000 --> 00:17:54.300
<v Aaron van Wirdum>I think for years, right?

00:17:54.620 --> 00:17:54.840
<v Sjors Provoost>Correct.

00:17:55.060 --> 00:17:59.700
<v Aaron van Wirdum>So this is also a new implementation of Schnorr. Is this the first time Schnorr

00:17:59.700 --> 00:18:03.340
<v Aaron van Wirdum>has been included in any library? Because you just mentioned that it wasn't.

00:18:03.340 --> 00:18:06.580
<v Sjors Provoost>I don't know about any library, but at least at the time when Bitcoin was

00:18:06.580 --> 00:18:10.880
<v Sjors Provoost>created, there was no library for Schnorr. Or at least it wasn't in OpenSSL,

00:18:11.000 --> 00:18:13.880
<v Sjors Provoost>which is like a widely tested library. You wouldn't just want to randomly

00:18:13.880 --> 00:18:16.100
<v Sjors Provoost>download, oh, look, somebody implemented Schnorr.

00:18:16.500 --> 00:18:16.640
<v Aaron van Wirdum>Right.

00:18:17.020 --> 00:18:23.020
<v Sjors Provoost>So what happened is, I think Satoshi was aware of Schnorr, but

00:18:23.020 --> 00:18:26.960
<v Sjors Provoost>there was a patent on it. And there was no implementation. So it's kind of both

00:18:26.960 --> 00:18:30.060
<v Sjors Provoost>of these things. Because I think the patent was actually expired in 2008.

00:18:30.360 --> 00:18:32.040
<v Aaron van Wirdum>I think it just lapsed or something, yeah.

00:18:32.760 --> 00:18:36.060
<v Sjors Provoost>But either way, you don't just want to write the stuff from scratch. And if

00:18:36.060 --> 00:18:40.260
<v Sjors Provoost>you're trying to develop a world-changing thing, you don't want to then spend

00:18:40.260 --> 00:18:44.100
<v Sjors Provoost>three years just implementing the cryptography, given how long it takes to really

00:18:44.100 --> 00:18:49.020
<v Sjors Provoost>do this. But actually, Schnorr is simpler. And I think we may have explained this

00:18:49.020 --> 00:18:49.900
<v Sjors Provoost>in an earlier episode.

00:18:50.100 --> 00:18:51.500
<v Aaron van Wirdum>You mean simpler than?

00:18:51.760 --> 00:18:52.700
<v Sjors Provoost>Than ECDSA.

00:18:54.740 --> 00:19:00.160
<v Aaron van Wirdum>Which is the elliptic curve algorithm that Bitcoin currently uses.

00:19:00.320 --> 00:19:03.860
<v Sjors Provoost>Right, and which the libsecp library implements. But the thing is, you have the

00:19:03.860 --> 00:19:07.920
<v Sjors Provoost>same elliptic curve, but then in order to make a signature, you have to do

00:19:07.920 --> 00:19:12.370
<v Sjors Provoost>slightly different... calculations with it. So that also means that the change

00:19:12.370 --> 00:19:18.130
<v Sjors Provoost>for Schnorr is not as complicated as, say, the initial version of libsecp was.

00:19:18.430 --> 00:19:23.670
<v Sjors Provoost>The initial version of libsecp had to implement the curve, all the operations you

00:19:23.670 --> 00:19:28.500
<v Sjors Provoost>can do on a curve, like addition and multiplication, and then implement the

00:19:28.500 --> 00:19:33.720
<v Sjors Provoost>signature algorithm of ECDSA. But in order to do Schnorr, you just need to do the

00:19:33.720 --> 00:19:37.880
<v Sjors Provoost>signature algorithm for Schnorr. You don't have to do all the math, the basic

00:19:37.880 --> 00:19:41.880
<v Sjors Provoost>foundational math. So it's not a huge change. It's not like adding a whole new

00:19:41.880 --> 00:19:45.760
<v Sjors Provoost>curve to it. It would be much more difficult to add, say, a different elliptic

00:19:45.760 --> 00:19:50.120
<v Sjors Provoost>curve or even a completely different kind of curve. than it is to change just

00:19:50.120 --> 00:19:54.620
<v Sjors Provoost>from ECDSA to Schnorr. It's a different way of signing. And in fact, a simpler

00:19:54.620 --> 00:19:55.200
<v Sjors Provoost>way of signing.

00:19:55.560 --> 00:20:00.960
<v Aaron van Wirdum>So this was implemented again by Pieter Wuille, I assume. Well, I know. Or, right?

00:20:01.320 --> 00:20:04.640
<v Sjors Provoost>The spec was written by him. I think he also wrote most of the implementation,

00:20:04.980 --> 00:20:07.740
<v Sjors Provoost>but there's a lot of people on top of that.

00:20:07.960 --> 00:20:12.580
<v Aaron van Wirdum>Sure. And that was merged this week. So what does that mean exactly? Where does

00:20:12.580 --> 00:20:13.260
<v Aaron van Wirdum>this get us?

00:20:13.420 --> 00:20:18.260
<v Sjors Provoost>Right. So what that means is there now is an updated version of this library. But

00:20:18.260 --> 00:20:22.740
<v Sjors Provoost>nobody is using that library yet. And another change is that Bitcoin Core was

00:20:22.740 --> 00:20:27.440
<v Sjors Provoost>changed, I think, a few days ago to include that new version of the library.

00:20:27.700 --> 00:20:27.860
<v Aaron van Wirdum>Right.

00:20:28.040 --> 00:20:30.420
<v Sjors Provoost>To include it, not to actually use it in any way.

00:20:30.620 --> 00:20:34.980
<v Aaron van Wirdum>So the first major release of Bitcoin Core, when you download that, you'll

00:20:34.980 --> 00:20:37.100
<v Aaron van Wirdum>download the library that includes Schnorr.

00:20:37.360 --> 00:20:41.720
<v Sjors Provoost>Exactly. Because the usual process is stuff gets merged into the master branch on

00:20:41.720 --> 00:20:46.580
<v Sjors Provoost>GitHub. And every six months or so, we say, okay, let's stop at this point and

00:20:46.580 --> 00:20:50.860
<v Sjors Provoost>release whatever is in there. And so next time that'll include the Schnorr code.

00:20:51.020 --> 00:20:54.440
<v Sjors Provoost>Yeah, it'll be in there. It might not do anything. It might have a few tests that

00:20:54.440 --> 00:20:57.320
<v Sjors Provoost>try it. If you don't run the tests, you're not going to run it.

00:20:57.640 --> 00:21:01.000
<v Aaron van Wirdum>Yeah, the next Bitcoin Core release is not going to use Schnorr yet, is your

00:21:01.000 --> 00:21:03.200
<v Aaron van Wirdum>prediction here. That's your bold prediction.

00:21:03.600 --> 00:21:08.550
<v Sjors Provoost>I would say it would be extremely reckless if it did. But there are sources that

00:21:08.550 --> 00:21:12.570
<v Sjors Provoost>use it, right? A certain Bcash coin uses Schnorr, I believe.

00:21:12.890 --> 00:21:13.810
<v Aaron van Wirdum>Oh, yeah, I think so.

00:21:13.970 --> 00:21:17.830
<v Sjors Provoost>But the actual spec for Schnorr was changed a little bit. So I don't know if

00:21:17.830 --> 00:21:20.870
<v Sjors Provoost>they're going to change along with it or not. Not a huge change.

00:21:21.170 --> 00:21:25.570
<v Aaron van Wirdum>So anyways, it's going to be included in the library. Next time you download it,

00:21:25.650 --> 00:21:28.850
<v Aaron van Wirdum>you're downloading this. But it doesn't actually do anything probably or not

00:21:28.850 --> 00:21:30.030
<v Aaron van Wirdum>anything too important.

00:21:30.370 --> 00:21:30.490
<v Sjors Provoost>Right.

00:21:31.680 --> 00:21:36.220
<v Aaron van Wirdum>But that would be a next step then. I want to excite our audience, Sjors. We're

00:21:36.220 --> 00:21:37.000
<v Aaron van Wirdum>getting somewhere, right?

00:21:37.360 --> 00:21:37.760
<v Sjors Provoost>Yeah, we are.

00:21:38.420 --> 00:21:39.360
<v Aaron van Wirdum>That's the plan, right?

00:21:39.660 --> 00:21:45.650
<v Sjors Provoost>So the idea here, of course, is to have Schnorr as part of Taproot. So the entire

00:21:45.650 --> 00:21:49.630
<v Sjors Provoost>Taproot thing, there are already pull requests that describe what it's supposed

00:21:49.630 --> 00:21:54.330
<v Sjors Provoost>to do that are not completely finished, but pretty far along. So maybe they'll go

00:21:54.330 --> 00:21:57.810
<v Sjors Provoost>in the next version, so not in the upcoming one, but in the next one. What I

00:21:57.810 --> 00:22:03.290
<v Sjors Provoost>would imagine happens is that it gets added not to mainnet, probably not even to

00:22:03.290 --> 00:22:07.690
<v Sjors Provoost>testnet, but to this new thing called Signet, which is a whole new... type of way

00:22:07.690 --> 00:22:11.310
<v Sjors Provoost>to do testnet, which we can do another episode about. But basically, it'll go in

00:22:11.310 --> 00:22:17.010
<v Sjors Provoost>some innocent way. So maybe there's tests for it, you know, tests for

00:22:17.010 --> 00:22:20.230
<v Sjors Provoost>everything Taproot-related, and then anybody who knows how to compile code can

00:22:20.230 --> 00:22:25.490
<v Sjors Provoost>just flip a switch and try it on their own machine. But it won't be on mainnet,

00:22:25.610 --> 00:22:30.550
<v Sjors Provoost>or probably not even on testnet. And then maybe next version, you know, this

00:22:30.550 --> 00:22:33.170
<v Sjors Provoost>stuff takes time. And then even though it's in there...

00:22:33.170 --> 00:22:34.570
<v Aaron van Wirdum>Sure, this is not exciting our audience.

00:22:35.400 --> 00:22:37.320
<v Sjors Provoost>Well, our audience...

00:22:37.320 --> 00:22:39.840
<v Aaron van Wirdum>Gotta pump it. Gotta pump this coin.

00:22:40.100 --> 00:22:44.360
<v Sjors Provoost>I'm pumping low time preference. This stuff takes a long, long time. But

00:22:44.360 --> 00:22:49.940
<v Sjors Provoost>basically, you add all the code in it, then you make... So everything is in

00:22:49.940 --> 00:22:54.280
<v Sjors Provoost>there, but you don't activate it yet. And then the next time... You decide on

00:22:54.280 --> 00:22:56.960
<v Sjors Provoost>activation mechanisms, and even those mechanisms might take a while.

00:22:57.360 --> 00:23:00.840
<v Aaron van Wirdum>That's a whole debate on its own, which we did an episode about, right?

00:23:01.100 --> 00:23:01.360
<v Sjors Provoost>Yes.

00:23:01.720 --> 00:23:06.120
<v Aaron van Wirdum>If I'm not misremembering. Okay, so that's what a library is. That's what a

00:23:06.120 --> 00:23:11.940
<v Aaron van Wirdum>libsecp256k1 library specifically. Now, you also know what Schnorr

00:23:11.940 --> 00:23:16.730
<v Aaron van Wirdum>is. Well, actually, we didn't even get into what Schnorr is, but we get... Did we

00:23:16.730 --> 00:23:19.610
<v Aaron van Wirdum>do that in a previous episode? Sure, go for it.

00:23:19.830 --> 00:23:20.750
<v Sjors Provoost>It's simpler.

00:23:20.800 --> 00:23:21.640
<v Aaron van Wirdum>What Schnorr actually...

00:23:21.880 --> 00:23:26.090
<v Sjors Provoost>So what happened is there was this patent on this very simple system called

00:23:26.090 --> 00:23:30.990
<v Sjors Provoost>Schnorr by a person called Schnorr. And it was very nice. It was a good way to

00:23:30.990 --> 00:23:36.010
<v Sjors Provoost>make electronic signatures, but it was a patent on it. So people came up with a

00:23:36.010 --> 00:23:39.890
<v Sjors Provoost>way to convolute the design, make it more complicated, such that it would no

00:23:39.890 --> 00:23:43.710
<v Sjors Provoost>longer fall under the patent. So when the lawyer said, okay, this looks obscure

00:23:43.710 --> 00:23:46.750
<v Sjors Provoost>enough, so they were just adding numbers to it and subtracting things, just

00:23:46.750 --> 00:23:50.550
<v Sjors Provoost>making it more complicated. And then it didn't violate the patent, and so they

00:23:50.550 --> 00:23:56.160
<v Sjors Provoost>shipped it. But now we ended up with this horrible thing. That is basically proof

00:23:56.160 --> 00:24:00.320
<v Sjors Provoost>of lawyer, convoluted mess. And now that the patent has expired, we just go right

00:24:00.320 --> 00:24:03.780
<v Sjors Provoost>back to the original design, which is much better. And mainly it's better because

00:24:03.780 --> 00:24:09.040
<v Sjors Provoost>you can add signatures much more easily. And adding signatures is very nice.

00:24:09.200 --> 00:24:11.380
<v Aaron van Wirdum>Yeah, you could perform math on it.

00:24:12.050 --> 00:24:16.510
<v Sjors Provoost>Yeah, you could perform math on the original one, but you'd be able to publish

00:24:16.510 --> 00:24:18.750
<v Sjors Provoost>papers just on the ability to add two numbers.

00:24:19.090 --> 00:24:24.900
<v Aaron van Wirdum>Right. Yeah, so for the layman listener, you know, performing math on it just

00:24:24.900 --> 00:24:29.880
<v Aaron van Wirdum>means you can do cool mathematical tricks, like add numbers to both the signature

00:24:29.880 --> 00:24:34.880
<v Aaron van Wirdum>or both the public key and the private key, and then it still adds up and still

00:24:34.880 --> 00:24:37.900
<v Aaron van Wirdum>works, or you can add signatures or like all that kind of cool stuff.

00:24:37.940 --> 00:24:41.360
<v Sjors Provoost>Yeah, which in the end translates to more privacy and less block space usage. So

00:24:41.360 --> 00:24:41.820
<v Sjors Provoost>it's all good.

00:24:42.160 --> 00:24:46.450
<v Aaron van Wirdum>Nice. And that's included in the libsec. This is the last time I'm going to

00:24:46.450 --> 00:24:52.350
<v Aaron van Wirdum>pronounce this. libsecp256k1 library. And that

00:24:52.350 --> 00:24:57.230
<v Aaron van Wirdum>means we're getting ready. We're getting ready to pump … [unclear] the bull’s

00:24:57.230 --> 00:24:58.830
<v Aaron van Wirdum>warming up. Is that right?

00:24:59.310 --> 00:25:00.270
<v Sjors Provoost>I'm sure it is.

00:25:00.960 --> 00:25:02.840
<v Aaron van Wirdum>Okay, then I think this was the episode, wasn't it?

00:25:03.040 --> 00:25:05.960
<v Sjors Provoost>Yep. Thank you for listening to the Van Wirdum Sjorsnado.

00:25:06.400 --> 00:25:06.820
<v Aaron van Wirdum>There you go.

