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

00:00:20.780 --> 00:00:23.180
<v Aaron van Wirdum>Live from Utrecht, this is Bitcoin.

00:00:23.920 --> 00:00:24.600
<v Sjors Provoost>Explained.

00:00:25.000 --> 00:00:25.940
<v Aaron van Wirdum>Sjors, we're back.

00:00:28.540 --> 00:00:34.360
<v Aaron van Wirdum>I know what you've been waiting for. It's my voice of an angel.

00:00:35.050 --> 00:00:40.580
<v Aaron van Wirdum>It's time for... Sjors stacks sats, Sjors stacks sats, Sjors

00:00:40.580 --> 00:00:42.000
<v Aaron van Wirdum>stacks sats.

00:00:42.580 --> 00:00:47.740
<v Sjors Provoost>OMG. So yeah, we have a couple, but they're not super distinct. One says from

00:00:47.740 --> 00:00:53.600
<v Sjors Provoost>Farscapian, 32,000 sats. You guys are the best. That's always

00:00:53.600 --> 00:00:59.100
<v Sjors Provoost>nice. And we have one that says the boost didn't work. Your node loses.

00:00:59.460 --> 00:01:01.480
<v Sjors Provoost>And then they try it again.

00:01:02.790 --> 00:01:05.390
<v Sjors Provoost>And then it did work. So the problem is I run my own...

00:01:05.390 --> 00:01:08.090
<v Aaron van Wirdum>It doesn't work. How did you get it? How can you read it?

00:01:08.210 --> 00:01:13.580
<v Sjors Provoost>So there's a difference between sending the boost and it actually... And I

00:01:13.580 --> 00:01:18.180
<v Sjors Provoost>think... Yeah, what happens is the boost is split. So part of it goes to me, most

00:01:18.180 --> 00:01:22.900
<v Sjors Provoost>of it, and then 1% or so goes to the Fountain app, probably.

00:01:23.870 --> 00:01:28.970
<v Sjors Provoost>Depending on what podcast player is working. And it's not atomic. So the 1% to

00:01:28.970 --> 00:01:32.450
<v Sjors Provoost>Fountain app will work, but if the payment to me doesn't work, then they only

00:01:32.450 --> 00:01:35.090
<v Sjors Provoost>paid 1%, but they got to say their boost.

00:01:36.480 --> 00:01:37.100
<v Aaron van Wirdum>I see.

00:01:37.300 --> 00:01:41.320
<v Sjors Provoost>So that's not ideal. Ideally, it should completely work or completely fail.

00:01:41.320 --> 00:01:42.520
<v Aaron van Wirdum>It should be atomic, yeah.

00:01:42.980 --> 00:01:47.140
<v Sjors Provoost>But it's all new. And the problem is because I run my own node, not everybody is

00:01:47.140 --> 00:01:49.660
<v Sjors Provoost>able to make a payment to my node, and so they might fail.

00:01:50.580 --> 00:01:56.370
<v Aaron van Wirdum>Right. Okay, Sjors, stacks sats. Sjors, today we're going to

00:01:56.370 --> 00:01:58.330
<v Aaron van Wirdum>discuss Milk Sad.

00:01:59.030 --> 00:01:59.670
<v Sjors Provoost>Milk Sad.

00:01:59.950 --> 00:02:03.610
<v Aaron van Wirdum>So Milk Sad is, what is Milk Sad?

00:02:04.080 --> 00:02:08.360
<v Sjors Provoost>Well, it's the first two words of a very, very unsafe mnemonic.

00:02:09.990 --> 00:02:11.710
<v Aaron van Wirdum>Yes, and...

00:02:11.710 --> 00:02:17.890
<v Sjors Provoost>It's also the name of, the working name of a security disclosure that was in progress.

00:02:18.030 --> 00:02:19.730
<v Aaron van Wirdum>For the same reason.

00:02:20.930 --> 00:02:25.330
<v Sjors Provoost>Yes, well yeah they they found the security bug which is related to this Milk Sad

00:02:25.330 --> 00:02:28.190
<v Sjors Provoost>and they needed a working name for it and they picked this working name and I

00:02:28.190 --> 00:02:29.310
<v Sjors Provoost>guess it was it stuck.

00:02:29.720 --> 00:02:34.910
<v Aaron van Wirdum>Right, and it has to do with Libbitcoin that was that was…

00:02:34.910 --> 00:02:39.190
<v Aaron van Wirdum>So I'm not sure if this is the right way to put it I guess that's what we're

00:02:39.190 --> 00:02:45.190
<v Aaron van Wirdum>gonna get on in this episode is it a bug in Libbitcoin

00:02:45.190 --> 00:02:46.370
<v Aaron van Wirdum>is that what it is?

00:02:46.900 --> 00:02:52.300
<v Sjors Provoost>Well, there seems to be a difference of opinion as to whether it's a bug or not.

00:02:52.480 --> 00:02:55.900
<v Sjors Provoost>It's certainly a way to use Libbitcoin such that you lose money.

00:02:56.460 --> 00:03:00.480
<v Aaron van Wirdum>But someone published a CVE about it.

00:03:00.680 --> 00:03:00.800
<v Sjors Provoost>Yes.

00:03:00.800 --> 00:03:02.620
<v Aaron van Wirdum>That's for sure. So what's a CVE?

00:03:02.840 --> 00:03:07.920
<v Sjors Provoost>So a CVE is a, I forgot what the word stands for, but it has, I think it's like

00:03:07.920 --> 00:03:13.920
<v Sjors Provoost>vulnerability, blah, blah, blah. It's basically a list, a public list of

00:03:13.920 --> 00:03:15.200
<v Sjors Provoost>known security issues.

00:03:16.250 --> 00:03:21.250
<v Aaron van Wirdum>Right. So there was a security issue with Libbitcoin. I guess that would be a

00:03:21.250 --> 00:03:23.550
<v Aaron van Wirdum>pretty objective, fair way to put it there.

00:03:23.750 --> 00:03:27.150
<v Sjors Provoost>Yeah, I definitely think so. I mean, one other way you could put it is like it's

00:03:27.150 --> 00:03:30.690
<v Sjors Provoost>a security vulnerability involving Libbitcoin.

00:03:32.240 --> 00:03:36.460
<v Sjors Provoost>That kind of leaves it open of whose fault it is. And it is a bit complicated.

00:03:36.880 --> 00:03:42.600
<v Aaron van Wirdum>Right. In any case, something happens and we're going to talk about it. Yeah.

00:03:42.800 --> 00:03:47.960
<v Aaron van Wirdum>And it has to do with Libbitcoin. That one is for sure. It has something to do

00:03:47.960 --> 00:03:48.620
<v Aaron van Wirdum>with Libbitcoin.

00:03:48.880 --> 00:03:49.220
<v Sjors Provoost>That's right.

00:03:49.340 --> 00:03:52.640
<v Aaron van Wirdum>Or is there still nuance left there? No, this definitely has something to do with

00:03:52.640 --> 00:03:56.960
<v Aaron van Wirdum>Libbitcoin. So what is Libbitcoin, Sjors? Let's start there.

00:03:57.180 --> 00:04:01.360
<v Sjors Provoost>It's a library that is able to... It does a bunch of things. One of the things

00:04:01.360 --> 00:04:05.020
<v Sjors Provoost>it's able to do is... It's a node, so it can sync the whole Bitcoin blockchain.

00:04:05.240 --> 00:04:09.540
<v Sjors Provoost>But it's also a collection of tools that you can use without using the node. For

00:04:09.540 --> 00:04:15.520
<v Sjors Provoost>example, to create a wallet or to do blockchain

00:04:15.520 --> 00:04:16.720
<v Sjors Provoost>exploration stuff, I think.

00:04:17.040 --> 00:04:22.350
<v Aaron van Wirdum>Yeah, so it's a software library. It's not an actual library. Yeah,

00:04:23.110 --> 00:04:24.410
<v Sjors Provoost>Definitely not an actual library.

00:04:26.450 --> 00:04:32.430
<v Sjors Provoost>And so it was quite popular. I think it peaked sort of in 2015 when most people

00:04:32.430 --> 00:04:36.930
<v Sjors Provoost>were working on it. And I think it was at the time also used for certain stealth

00:04:36.930 --> 00:04:37.950
<v Sjors Provoost>wallet projects.

00:04:38.540 --> 00:04:44.240
<v Aaron van Wirdum>Yeah, it was started by Amir Taaki and it was sort of the first non-Bitcoin Core

00:04:44.240 --> 00:04:48.800
<v Aaron van Wirdum>implementation of Bitcoin. And then at some point Amir himself used it for

00:04:48.800 --> 00:04:53.420
<v Aaron van Wirdum>DarkWallet, which was sort of the first really privacy-focused Bitcoin wallet,

00:04:53.640 --> 00:04:59.320
<v Aaron van Wirdum>which is now defunct. But it's basically a collection of tools that you can use

00:04:59.320 --> 00:05:05.060
<v Aaron van Wirdum>if you're building Bitcoin applications or anything. If you're writing Bitcoin

00:05:05.060 --> 00:05:10.210
<v Aaron van Wirdum>software, you can take stuff from... the Libbitcoin library, right, is that a

00:05:10.210 --> 00:05:10.690
<v Aaron van Wirdum>good summary?

00:05:10.690 --> 00:05:14.350
<v Sjors Provoost>Exactly, and when I say it peaked is because if you look at GitHub you can see a

00:05:14.350 --> 00:05:18.430
<v Sjors Provoost>history of when there was most of the activity, most of the commits etc, and that

00:05:18.430 --> 00:05:23.930
<v Sjors Provoost>really was many many many years ago. And over the last years it has been somewhat

00:05:23.930 --> 00:05:27.750
<v Sjors Provoost>maintained but not super actively, right so right now if you wanted to pick a

00:05:27.750 --> 00:05:31.590
<v Sjors Provoost>library to use for any Bitcoin project you may want to look for other projects.

00:05:32.030 --> 00:05:36.530
<v Aaron van Wirdum>Yeah, right now, Eric Voskuil is the lead maintainer of Libbitcoin. He took over

00:05:36.530 --> 00:05:38.370
<v Aaron van Wirdum>from Amir, I think, in 2015.

00:05:38.690 --> 00:05:39.710
<v Sjors Provoost>Yeah, that's a long time ago, too.

00:05:40.490 --> 00:05:44.330
<v Aaron van Wirdum>Yeah, and when you say it was at its peak, so it sounds like what you mean is

00:05:44.330 --> 00:05:46.310
<v Aaron van Wirdum>peak of development activity.

00:05:46.690 --> 00:05:46.830
<v Sjors Provoost>Yeah.

00:05:46.970 --> 00:05:49.030
<v Aaron van Wirdum>Not necessarily usage.

00:05:49.290 --> 00:05:50.050
<v Sjors Provoost>Usage we don't know.

00:05:50.150 --> 00:05:50.850
<v Aaron van Wirdum>Yeah, right.

00:05:51.230 --> 00:05:55.050
<v Sjors Provoost>Other than from this bug, which might give some indication, but it's like not

00:05:55.050 --> 00:05:57.350
<v Sjors Provoost>even the main usage of it, so it doesn't really say anything.

00:05:57.840 --> 00:06:02.300
<v Aaron van Wirdum>Okay, now you just call it a bug. So you think it's a bug, Sjors?

00:06:03.750 --> 00:06:07.830
<v Aaron van Wirdum>Yeah, I think so. How are we going to call it during the episode, throughout the

00:06:07.830 --> 00:06:08.670
<v Aaron van Wirdum>rest of the episode?

00:06:08.970 --> 00:06:12.530
<v Sjors Provoost>Either a bug or an extremely poorly named command.

00:06:12.810 --> 00:06:18.210
<v Aaron van Wirdum>Okay, we're just going to call it a bug then. I think that's an easy word to use.

00:06:18.430 --> 00:06:22.230
<v Aaron van Wirdum>I think Eric Voskuil will not be happy with that, but I think that's the word

00:06:22.230 --> 00:06:26.910
<v Aaron van Wirdum>we're going to use. So what is this bug? What's the bug?

00:06:27.370 --> 00:06:32.850
<v Sjors Provoost>Okay, so basically there's a command at the moment called bx seed, where bx is

00:06:32.850 --> 00:06:37.230
<v Sjors Provoost>the name of the computer program, the library, and seed says, well, what do you

00:06:37.230 --> 00:06:38.390
<v Sjors Provoost>think that command means?

00:06:39.920 --> 00:06:45.640
<v Aaron van Wirdum>I think it means a Bitcoin seed, but I don't know what the command itself does.

00:06:46.040 --> 00:06:48.680
<v Sjors Provoost>Yeah, so it basically generates a Bitcoin seed.

00:06:48.920 --> 00:06:49.160
<v Aaron van Wirdum>Right.

00:06:49.720 --> 00:06:54.850
<v Sjors Provoost>Except that it does so in an extremely insecure way. And then somewhere in the

00:06:54.850 --> 00:06:59.550
<v Sjors Provoost>documentation with some wording that you might, if you read it, means don't use

00:06:59.550 --> 00:07:01.070
<v Sjors Provoost>this, but not really.

00:07:01.430 --> 00:07:02.250
<v Aaron van Wirdum>Okay, wait.

00:07:02.670 --> 00:07:07.390
<v Sjors Provoost>So basically it generates a seed, but the problem is the seed is based on an

00:07:07.390 --> 00:07:09.850
<v Sjors Provoost>insecure pseudorandom number generator.

00:07:10.530 --> 00:07:15.890
<v Aaron van Wirdum>Let me break this down to see if I understand correctly. So Libbitcoin is a

00:07:15.890 --> 00:07:21.400
<v Aaron van Wirdum>Bitcoin library. So there's all kinds of different parts of Bitcoin.

00:07:22.400 --> 00:07:27.120
<v Sjors Provoost>Yeah, I think it has commands to change say if you start with a seed has maybe a

00:07:27.120 --> 00:07:30.440
<v Sjors Provoost>way to turn it into a private key or in a public key or in an address. Or

00:07:30.440 --> 00:07:35.840
<v Aaron van Wirdum>Yeah you're writing a software application, and you say I need this Bitcoin, I

00:07:35.840 --> 00:07:40.940
<v Aaron van Wirdum>need to check if blocks are valid, well maybe that's a very big thing, but I need

00:07:40.940 --> 00:07:45.620
<v Aaron van Wirdum>to do something. Let's get it from this library. And what you're if I'm

00:07:45.620 --> 00:07:49.660
<v Aaron van Wirdum>understanding you correctly, one of the things you could get from this library is

00:07:50.300 --> 00:07:52.160
<v Aaron van Wirdum>I need to generate a seed.

00:07:52.160 --> 00:07:52.540
<v Sjors Provoost>Yes.

00:07:52.540 --> 00:07:57.320
<v Aaron van Wirdum>Okay so that was the specific thing that was in the library that was the name of

00:07:57.320 --> 00:08:02.740
<v Aaron van Wirdum>the specific thing in the library that was you would put it in your software if

00:08:02.740 --> 00:08:03.320
<v Aaron van Wirdum>you needed to?

00:08:03.320 --> 00:08:06.180
<v Sjors Provoost>I don't know if people would put it in the software they would just type the

00:08:06.180 --> 00:08:09.980
<v Sjors Provoost>commands as they were creating their own as they were manually processing

00:08:09.980 --> 00:08:10.700
<v Sjors Provoost>something in Bitcoin.

00:08:12.220 --> 00:08:16.860
<v Aaron van Wirdum>Right. I mean, this is where my lack of, I've never developed like a wallet or

00:08:16.860 --> 00:08:21.280
<v Aaron van Wirdum>anything else. So I'm still sort of struggling with how libraries work.

00:08:21.480 --> 00:08:24.200
<v Sjors Provoost>Yeah, in this case, I think a library is generally something that's used by

00:08:24.200 --> 00:08:28.680
<v Sjors Provoost>another computer program. And I think in this case, I think this is more like a

00:08:28.680 --> 00:08:34.140
<v Sjors Provoost>tool set. It's like a bunch of commands, utilities that you as a user would

00:08:34.140 --> 00:08:39.000
<v Sjors Provoost>manually use to process something. So you just type something like, well, this command.

00:08:39.230 --> 00:08:45.190
<v Aaron van Wirdum>Okay you're at the entire library is on your computer, and then it's sort of some

00:08:45.190 --> 00:08:48.870
<v Aaron van Wirdum>other software program you're using sort of refers to that library or you

00:08:48.870 --> 00:08:53.330
<v Aaron van Wirdum>yourself refer to it, or you yourself and then it sort of goes to the library and

00:08:53.330 --> 00:08:57.970
<v Aaron van Wirdum>uses that yeah it am I put it saying right? Okay so now I understand that part I

00:08:57.970 --> 00:09:03.610
<v Aaron van Wirdum>think. And this thing in this library was sort of specifically labeled

00:09:03.610 --> 00:09:05.170
<v Aaron van Wirdum>generate a seed

00:09:05.170 --> 00:09:06.330
<v Sjors Provoost>It was labeled seed.

00:09:06.330 --> 00:09:08.410
<v Aaron van Wirdum>It was labeled seed, Okay.

00:09:08.410 --> 00:09:11.590
<v Sjors Provoost>It wasn't labeled super unsafe seed don't use this.

00:09:11.590 --> 00:09:17.350
<v Aaron van Wirdum>Right, okay, then, the next question is

00:09:17.350 --> 00:09:22.610
<v Aaron van Wirdum>why... So you're saying it was super unsafe to use. So why was it super unsafe to use?

00:09:22.690 --> 00:09:27.030
<v Sjors Provoost>Yeah, and the nuance there is that it started out as probably reasonably safe and

00:09:27.030 --> 00:09:30.570
<v Sjors Provoost>it became unsafe later on. So we'll get into, I guess, in the history of that.

00:09:30.670 --> 00:09:36.530
<v Sjors Provoost>But the unsafety lies in that there's only 2 to the power 32 possible

00:09:36.530 --> 00:09:41.160
<v Sjors Provoost>seeds that it can generate. So about 4 billion different seeds that it can

00:09:41.160 --> 00:09:46.890
<v Sjors Provoost>generate. Which is not a lot. Normally, your seed will have 128 bits in it,

00:09:47.050 --> 00:09:52.810
<v Sjors Provoost>which is 2 to the power of 128. That is probably more possible seeds than the

00:09:52.810 --> 00:09:57.760
<v Sjors Provoost>number of molecules in the universe, which I think is like 10 to the power of

00:09:57.760 --> 00:10:03.490
<v Sjors Provoost>100. Anyway, but in this case, it only generates 4 billion possible

00:10:03.490 --> 00:10:09.430
<v Sjors Provoost>seeds. And then if you know that given a seed, so given the 12 words or 24 words,

00:10:10.590 --> 00:10:15.790
<v Sjors Provoost>you know how to get to the first normal Bitcoin address, right? You do a bunch of

00:10:15.790 --> 00:10:21.370
<v Sjors Provoost>derivations. Then you can basically take every possible seed and calculate the

00:10:21.370 --> 00:10:24.610
<v Sjors Provoost>first address and the first private key of that address and just look at the

00:10:24.610 --> 00:10:26.030
<v Sjors Provoost>blockchain and see if there's coins there.

00:10:27.490 --> 00:10:31.010
<v Aaron van Wirdum>So that would take probably...

00:10:31.010 --> 00:10:32.750
<v Sjors Provoost>A couple of hours on the laptop.

00:10:33.090 --> 00:10:35.130
<v Aaron van Wirdum>On a regular laptop you can, right.

00:10:35.490 --> 00:10:37.930
<v Sjors Provoost>Then if you want to be a little bit more sophisticated, let's say you want to

00:10:37.930 --> 00:10:42.040
<v Sjors Provoost>find the first 100 addresses. Maybe it takes a few days but…

00:10:42.040 --> 00:10:47.960
<v Aaron van Wirdum>Okay, so to spell out the problem, it would mean, it would

00:10:47.960 --> 00:10:53.910
<v Aaron van Wirdum>basically mean that anyone can just calculate any Bitcoin

00:10:53.910 --> 00:10:59.890
<v Aaron van Wirdum>address that anyone could have possibly generated using that

00:10:59.890 --> 00:11:00.850
<v Aaron van Wirdum>command right?

00:11:00.850 --> 00:11:01.650
<v Sjors Provoost>Yeah.

00:11:02.380 --> 00:11:06.120
<v Aaron van Wirdum>And this is what happened recently, I think.

00:11:06.660 --> 00:11:10.660
<v Sjors Provoost>Yeah, so what's interesting is that, yeah, so it was discovered because some

00:11:10.660 --> 00:11:14.920
<v Sjors Provoost>people lost their money very suddenly and they talked to some security experts

00:11:14.920 --> 00:11:18.380
<v Sjors Provoost>and there were two different people and it turned out when they looked at how

00:11:18.380 --> 00:11:21.020
<v Sjors Provoost>they made their wallet originally, they were using that command.

00:11:21.360 --> 00:11:26.580
<v Aaron van Wirdum>To be clear, I mean, this is obvious probably to anyone listening, but this is

00:11:26.580 --> 00:11:32.340
<v Aaron van Wirdum>basically the worst thing that can [unclear]— be

00:11:32.340 --> 00:11:34.800
<v Aaron van Wirdum>in a Bitcoin wallet.

00:11:35.140 --> 00:11:39.960
<v Sjors Provoost>It falls in a, yeah, so these would probably be people who made their own wallet,

00:11:40.280 --> 00:11:44.000
<v Sjors Provoost>right? Not people using a normal wallet software out there, but they thought,

00:11:44.080 --> 00:11:47.520
<v Sjors Provoost>hey, I'm going to try and make my own wallet. I'm going to make my own keys.

00:11:47.760 --> 00:11:51.640
<v Sjors Provoost>Maybe they use the hardware wallet and they didn't trust the hardware wallet

00:11:51.640 --> 00:11:57.260
<v Sjors Provoost>itself to generate a reliable random number. And so they would use this tool to

00:11:57.260 --> 00:12:00.180
<v Sjors Provoost>create the seed and then they would manually enter the seed into the hardware

00:12:00.180 --> 00:12:05.050
<v Sjors Provoost>wallet. I think the case that the article demonstrates was from somebody who did

00:12:05.050 --> 00:12:08.950
<v Sjors Provoost>that. Like, they had an air-gapped computer, so they knew pretty sure that

00:12:08.950 --> 00:12:12.990
<v Sjors Provoost>whatever seed was generated was not exposed to the internet, and they manually

00:12:12.990 --> 00:12:16.510
<v Sjors Provoost>entered it into a hardware wallet and then nuked the air-gapped computer.

00:12:17.780 --> 00:12:18.880
<v Aaron van Wirdum>Right. Okay.

00:12:19.060 --> 00:12:23.140
<v Sjors Provoost>But if your seed is unsafe, then it doesn't matter that you use a hardware wallet.

00:12:24.400 --> 00:12:29.280
<v Aaron van Wirdum>Yeah, exactly. That's why this is the worst thing that can be in a Bitcoin wallet.

00:12:29.480 --> 00:12:33.300
<v Sjors Provoost>Yeah, and these things have happened in the past in different variations, right?

00:12:33.360 --> 00:12:36.700
<v Sjors Provoost>There was the problem of brain wallets, for example, where people would just

00:12:36.700 --> 00:12:41.120
<v Sjors Provoost>randomly pick a few words and there's just not enough words. People are not good

00:12:41.120 --> 00:12:44.520
<v Sjors Provoost>enough at really creating random words. And so people will automatically, anytime

00:12:44.520 --> 00:12:48.060
<v Sjors Provoost>somebody comes up with that same idea, somebody will automatically sweep the

00:12:48.060 --> 00:12:52.700
<v Sjors Provoost>blockchain. Now, specifically here, this was most similar to something that

00:12:52.700 --> 00:12:57.040
<v Sjors Provoost>happened to Trust Wallet. Trust Wallet, as you understand, is a wallet you should

00:12:57.040 --> 00:13:02.520
<v Sjors Provoost>trust and definitely not verify. And so people did trust it.

00:13:02.800 --> 00:13:06.700
<v Sjors Provoost>And so what happened there is they were using, again, they were using this

00:13:06.700 --> 00:13:11.980
<v Sjors Provoost>insecure random number generator. I think it was called Mers… Twist, some twist.

00:13:12.100 --> 00:13:17.540
<v Sjors Provoost>I forgot which twist. And that was pretty much the exact same mistake as what was

00:13:17.540 --> 00:13:18.500
<v Sjors Provoost>happening in Libbitcoin.

00:13:19.000 --> 00:13:23.300
<v Aaron van Wirdum>But not... The same thing. It wasn't Libbitcoin they used, right?

00:13:23.380 --> 00:13:27.100
<v Sjors Provoost>No, no, exactly. Trust did not use Libbitcoin. They just used the same random

00:13:27.100 --> 00:13:27.780
<v Sjors Provoost>number generator.

00:13:30.280 --> 00:13:30.720
<v Sjors Provoost>However...

00:13:30.720 --> 00:13:31.980
<v Aaron van Wirdum>Well, not random.

00:13:32.480 --> 00:13:35.720
<v Sjors Provoost>Yeah, but they said pseudo-random number generator. So the idea of a

00:13:35.720 --> 00:13:40.380
<v Sjors Provoost>pseudo-random number generator is that it produces numbers that look random, but

00:13:40.380 --> 00:13:44.720
<v Sjors Provoost>fundamentally they're not random. And that's not necessarily bad. Computers

00:13:44.720 --> 00:13:47.460
<v Sjors Provoost>sometimes do that, but not with 32 bits.

00:13:49.080 --> 00:13:53.940
<v Sjors Provoost>But the thing is, if you use with Trust Wallet, basically the same idea, somebody

00:13:53.940 --> 00:13:57.780
<v Sjors Provoost>could guess all the private keys and Ledger Donjon, the organization within

00:13:57.780 --> 00:13:58.580
<v Sjors Provoost>Ledger, did that.

00:13:59.120 --> 00:13:59.720
<v Aaron van Wirdum>Right.

00:13:59.700 --> 00:14:05.600
<v Sjors Provoost>So it uses the same algorithm, but with a slight difference in how it's

00:14:05.600 --> 00:14:09.100
<v Sjors Provoost>applied to the seed eventually. And that's why, even though it's the same

00:14:09.100 --> 00:14:09.960
<v Sjors Provoost>mistake,

00:14:11.200 --> 00:14:16.120
<v Sjors Provoost>the Libbitcoin coins were not found in that way. Because I think it's something

00:14:16.120 --> 00:14:19.780
<v Sjors Provoost>like you use the first part of the seed instead of the last part of the seed,

00:14:19.860 --> 00:14:20.480
<v Sjors Provoost>something like that.

00:14:21.020 --> 00:14:25.750
<v Aaron van Wirdum>Okay, so let's get into... First of all,

00:14:26.490 --> 00:14:32.470
<v Aaron van Wirdum>let's just get into the background now, I think. Because you said there's a

00:14:32.470 --> 00:14:36.770
<v Aaron van Wirdum>lot of nuance in the background, or it used to be secure and then it wasn't?

00:14:37.230 --> 00:14:42.050
<v Sjors Provoost>Yeah, so one of the things is that this command was changed.

00:14:43.010 --> 00:14:46.590
<v Sjors Provoost>So maybe we first want to explain why people were using this in the first place,

00:14:46.590 --> 00:14:50.950
<v Sjors Provoost>because that is part of the problem. There's the book called Mastering Bitcoin,

00:14:51.550 --> 00:14:57.310
<v Sjors Provoost>which is pretty good. But it had, I think inside the

00:14:57.310 --> 00:15:01.230
<v Sjors Provoost>chapter that was explaining how addresses worked, it also showed some commands of

00:15:01.230 --> 00:15:05.490
<v Sjors Provoost>how to make a private key. And one way to make a private key is using Bitcoin

00:15:05.490 --> 00:15:09.410
<v Sjors Provoost>Core. And then the second one is, oh, you can also use this other tool, which is

00:15:09.410 --> 00:15:14.350
<v Sjors Provoost>the Libbitcoin or its predecessor. And this was published in 2014 I think because

00:15:14.350 --> 00:15:15.710
<v Sjors Provoost>it was in the second edition of the book.

00:15:17.840 --> 00:15:22.360
<v Sjors Provoost>And at the time, this command seemed to be still safe.

00:15:22.560 --> 00:15:25.340
<v Aaron van Wirdum>You mean the Libbitcoin version that was in the book?

00:15:25.500 --> 00:15:29.400
<v Sjors Provoost>Yeah, or at least reasonably safe. I think they're still investigating. That

00:15:29.400 --> 00:15:32.680
<v Sjors Provoost>might not have been perfectly safe either, but not as unsafe as it is now.

00:15:32.920 --> 00:15:38.900
<v Aaron van Wirdum>Okay, who's investigating that, and why was it maybe not even safe back then? Do you know this?

00:15:39.020 --> 00:15:40.980
<v Sjors Provoost>So the Milk Sad people are looking into it.

00:15:41.140 --> 00:15:42.520
<v Aaron van Wirdum>Oh, the same people that filed this CVE?

00:15:42.520 --> 00:15:46.540
<v Sjors Provoost>Yeah, they're trying to see, like, okay, this bug is clearly, like... When it

00:15:46.540 --> 00:15:49.820
<v Sjors Provoost>became unsafe, you can see all the thefts happening. But it's possible that it

00:15:49.820 --> 00:15:53.820
<v Sjors Provoost>was already unsafe, just less unsafe. And so they're trying to see whether that

00:15:53.820 --> 00:15:54.680
<v Sjors Provoost>was also compromised.

00:15:55.140 --> 00:15:59.660
<v Aaron van Wirdum>Okay, but that sounds like it's just speculation. There's no evidence for that.

00:15:59.960 --> 00:16:05.620
<v Aaron van Wirdum>Okay, so... Presumably, or don't assume maybe, but it seemed

00:16:05.620 --> 00:16:08.280
<v Aaron van Wirdum>safe at least initially, what was in the book at first.

00:16:09.040 --> 00:16:09.360
<v Sjors Provoost>Yes.

00:16:09.740 --> 00:16:11.260
<v Aaron van Wirdum>Okay, go on.

00:16:11.400 --> 00:16:15.400
<v Sjors Provoost>Yeah, but there you can already say like, okay, if you're recommending something

00:16:15.400 --> 00:16:19.180
<v Sjors Provoost>in a book, maybe you want to put a really, really strong warning above it. I

00:16:19.180 --> 00:16:23.060
<v Sjors Provoost>think there was a warning above it in very general terms, like when you generate

00:16:23.060 --> 00:16:27.480
<v Sjors Provoost>random keys, be careful. But I think even above every command, you probably want

00:16:27.480 --> 00:16:31.390
<v Sjors Provoost>to say like, never use this. Because people go on Google and it's like, how do I

00:16:31.390 --> 00:16:35.310
<v Sjors Provoost>make a Bitcoin wallet? And Google will just return some page in a book and you

00:16:35.310 --> 00:16:38.150
<v Sjors Provoost>only look at the command and you don't look at the context and you type the

00:16:38.150 --> 00:16:43.130
<v Sjors Provoost>command. So you cannot be aggressive enough in saying, don't use this. And

00:16:43.130 --> 00:16:46.130
<v Sjors Provoost>especially if it's sitting right next to a command that uses Bitcoin Core,

00:16:46.390 --> 00:16:48.850
<v Sjors Provoost>because that might give more of the idea.

00:16:49.510 --> 00:16:55.310
<v Aaron van Wirdum>Yeah, just because there was a lot of Twitter drama around this and I didn't read

00:16:55.310 --> 00:16:55.830
<v Aaron van Wirdum>all of it.

00:16:57.260 --> 00:17:02.540
<v Aaron van Wirdum>I guess one thing that I think Voskuil mentioned in this context is that from his

00:17:02.540 --> 00:17:05.780
<v Aaron van Wirdum>part, it was not intended to be a recommendation or anything like that.

00:17:05.780 --> 00:17:09.480
<v Sjors Provoost>Yeah, that's very possible. So it's possible that Andreas wrote the book. He

00:17:09.480 --> 00:17:13.680
<v Sjors Provoost>found this other way to do it using the Libbitcoin, added it to the book as just

00:17:13.680 --> 00:17:18.460
<v Sjors Provoost>an example. I wasn't expecting people to use this for a serious wallet. Eric

00:17:18.460 --> 00:17:22.520
<v Sjors Provoost>Voskuil, of course, wasn't writing that book, so he had no way to know. Now, what

00:17:22.520 --> 00:17:26.140
<v Sjors Provoost>happened a bit later, and this is what has confused a few people, is that the

00:17:26.140 --> 00:17:30.910
<v Sjors Provoost>Libbitcoin was changed. So the commands were moved around. So the original

00:17:30.910 --> 00:17:31.990
<v Sjors Provoost>command was now different.

00:17:33.350 --> 00:17:38.650
<v Sjors Provoost>And this change was not the thing that made it unsafe, basically. This was just a

00:17:38.650 --> 00:17:42.170
<v Sjors Provoost>neutral change. It's just you have one command before, and now it's like you use

00:17:42.170 --> 00:17:43.030
<v Sjors Provoost>a slightly different command.

00:17:44.340 --> 00:17:46.060
<v Aaron van Wirdum>For the same purpose?

00:17:46.320 --> 00:17:51.560
<v Sjors Provoost>For the same purpose. So the command bx seed now was something like sx newkey.

00:17:52.200 --> 00:17:55.680
<v Sjors Provoost>It was just the same idea, just slightly different words to do the same thing.

00:17:57.080 --> 00:18:03.170
<v Aaron van Wirdum>Okay, wait. Okay, so the name, but was the current name already in the library as well?

00:18:05.160 --> 00:18:09.950
<v Sjors Provoost>No, so the library itself was changed. So what happened is this book was written

00:18:09.950 --> 00:18:14.150
<v Sjors Provoost>based on an old version of the library. The library was changed. And then Eric

00:18:14.150 --> 00:18:18.550
<v Sjors Provoost>went back to the book, basically, to the GitHub repository where the book is,

00:18:18.630 --> 00:18:23.130
<v Sjors Provoost>because the book is open source, and basically changed all the commands to use

00:18:23.130 --> 00:18:24.510
<v Sjors Provoost>the new version of the library.

00:18:25.650 --> 00:18:30.510
<v Aaron van Wirdum>Okay, so that would mean that, sorry, what was this part of the library code that

00:18:30.510 --> 00:18:33.510
<v Aaron van Wirdum>this episode is about? bx seed or something?

00:18:33.630 --> 00:18:37.110
<v Sjors Provoost>Yeah, bx seed, that's the command. And it was a slightly different command before.

00:18:39.960 --> 00:18:44.600
<v Aaron van Wirdum>So was bx seed in the library back in 2013, whatever?

00:18:45.440 --> 00:18:49.540
<v Sjors Provoost>No, at the time it was called sx newkey, but it was the same thing. It was

00:18:49.540 --> 00:18:53.260
<v Sjors Provoost>basically the same, essentially the same code, just with a different name. The

00:18:53.260 --> 00:18:56.320
<v Sjors Provoost>library had a different name, the command had a different name, but it was doing the same thing.

00:18:56.400 --> 00:18:57.440
<v Aaron van Wirdum>And what was in the book?

00:18:57.860 --> 00:19:00.160
<v Sjors Provoost>It was using the original one, the sx newkey.

00:19:00.600 --> 00:19:04.020
<v Aaron van Wirdum>Okay, yes. But that was already insecure then, right?

00:19:04.750 --> 00:19:06.290
<v Sjors Provoost>Not as insecure as it is now.

00:19:07.110 --> 00:19:11.050
<v Aaron van Wirdum>I mean, I guess I don't understand why, but hopefully our listeners do.

00:19:11.230 --> 00:19:16.380
<v Sjors Provoost>When Andreas wrote the book initially in 2014, the command was probably secure or

00:19:16.380 --> 00:19:17.480
<v Sjors Provoost>at least not as insecure.

00:19:18.870 --> 00:19:19.330
<v Sjors Provoost>Yeah?

00:19:19.570 --> 00:19:19.850
<v Aaron van Wirdum>Yes.

00:19:20.790 --> 00:19:25.730
<v Sjors Provoost>Then, as far as we know, nothing was stolen back in those days. Then the library

00:19:25.730 --> 00:19:30.330
<v Sjors Provoost>was changed, just the change of the commands. That did not change anything about

00:19:30.330 --> 00:19:35.230
<v Sjors Provoost>the safety. That happened later. So what happened is because the library was

00:19:35.230 --> 00:19:39.830
<v Sjors Provoost>changed, Eric would go to the book and say, hey, this library has changed. Please

00:19:39.830 --> 00:19:40.950
<v Sjors Provoost>use these new commands now.

00:19:42.350 --> 00:19:47.380
<v Sjors Provoost>And there was otherwise a completely neutral change. But I think some people

00:19:47.380 --> 00:19:52.700
<v Sjors Provoost>interpreted it as if he added that library to the book himself. But it wasn't

00:19:52.700 --> 00:19:55.580
<v Sjors Provoost>Eric adding the library to the book. Andreas did that in the original version.

00:19:56.390 --> 00:19:59.130
<v Sjors Provoost>Eric was just saying, okay, if you're using my library, that's great, but it's

00:19:59.130 --> 00:20:00.830
<v Sjors Provoost>changing, so use these new commands.

00:20:01.030 --> 00:20:05.050
<v Aaron van Wirdum>I guess my question or what I'm trying to get at, and maybe you were answering

00:20:05.050 --> 00:20:11.000
<v Aaron van Wirdum>something completely different, is why does this insecure code exist in

00:20:11.000 --> 00:20:14.700
<v Aaron van Wirdum>the first place? What is it for? Why would that even be a thing?

00:20:14.880 --> 00:20:17.600
<v Sjors Provoost>Well, this happened later, right? So what happened later is...

00:20:17.600 --> 00:20:18.440
<v Aaron van Wirdum>You're getting there?

00:20:18.600 --> 00:20:18.780
<v Sjors Provoost>Yeah.

00:20:18.920 --> 00:20:19.460
<v Aaron van Wirdum>Okay, great.

00:20:19.640 --> 00:20:24.100
<v Sjors Provoost>Another new version of the library came out. And that one made it unsafe. So the

00:20:24.100 --> 00:20:28.980
<v Sjors Provoost>command didn't change, bx seed, still bx seed, but now suddenly it was changing.

00:20:29.220 --> 00:20:31.300
<v Sjors Provoost>It was producing these 32-bit random things.

00:20:33.340 --> 00:20:38.300
<v Sjors Provoost>So basically you have a book that's pointing to a library and people are using

00:20:38.300 --> 00:20:41.920
<v Sjors Provoost>that command because everybody reads that book, you know, and then at some point

00:20:41.920 --> 00:20:45.060
<v Sjors Provoost>something changes in the library. And so new people who are new in reading the

00:20:45.060 --> 00:20:49.100
<v Sjors Provoost>book will actually do something that's unsafe, even though people who read the

00:20:49.100 --> 00:20:51.480
<v Sjors Provoost>book two years earlier would have been fine, probably.

00:20:53.350 --> 00:20:53.910
<v Aaron van Wirdum>Okay.

00:20:53.910 --> 00:20:56.910
<v Sjors Provoost>Because you know yeah, the book doesn't control what's on the internet so you just…

00:20:56.910 --> 00:21:02.830
<v Aaron van Wirdum>Right I get that. Okay that makes sense. Why does this

00:21:02.830 --> 00:21:08.750
<v Aaron van Wirdum>insecure code exist or I mean maybe I mean there's tons of… I'm just my question

00:21:08.750 --> 00:21:12.970
<v Aaron van Wirdum>is basically is there a good reason for this to exist potentially?

00:21:12.970 --> 00:21:18.190
<v Sjors Provoost>No, I mean I think when the code was originally when that particular pseudo

00:21:18.190 --> 00:21:22.390
<v Sjors Provoost>random number generator was designed is probably 20 years ago I think people

00:21:22.390 --> 00:21:25.450
<v Sjors Provoost>thought it was secure, and then security researchers found out it was not secure.

00:21:25.710 --> 00:21:27.610
<v Sjors Provoost>And since then you should just never use it.

00:21:27.790 --> 00:21:32.810
<v Aaron van Wirdum>So from what I understand, and of course you should correct me if I'm wrong, but

00:21:32.810 --> 00:21:38.610
<v Aaron van Wirdum>I thought that basically the only randomness, which is then obviously

00:21:38.610 --> 00:21:41.410
<v Aaron van Wirdum>not random was that it would only use like a timestamp.

00:21:41.750 --> 00:21:45.480
<v Sjors Provoost>Yeah. Effectively. I think it uses. A timestamp.

00:21:45.580 --> 00:21:50.520
<v Aaron van Wirdum>I guess at this point, we've discussed this before, so I think, so we don't need

00:21:50.520 --> 00:21:52.960
<v Aaron van Wirdum>to get into detail exactly about all of this.

00:21:53.060 --> 00:21:56.840
<v Sjors Provoost>But I think it's a timestamp in milliseconds or in millions of a second, actually.

00:21:57.100 --> 00:22:00.940
<v Aaron van Wirdum>Yes, but that's the thing, right? So if you want to generate random numbers on

00:22:00.940 --> 00:22:02.940
<v Aaron van Wirdum>the computer, the question is, how do you do that?

00:22:03.080 --> 00:22:03.320
<v Sjors Provoost>Yes.

00:22:03.560 --> 00:22:07.900
<v Aaron van Wirdum>And you usually use multiple inputs for that.

00:22:08.100 --> 00:22:09.020
<v Sjors Provoost>Including a timestamp.

00:22:09.140 --> 00:22:12.880
<v Aaron van Wirdum>Including a timestamp. But if you use only a timestamp, that's a problem because

00:22:12.880 --> 00:22:15.320
<v Aaron van Wirdum>then... people can just try every time.

00:22:15.560 --> 00:22:16.780
<v Sjors Provoost>Yeah, but I think in this case...

00:22:16.780 --> 00:22:19.280
<v Aaron van Wirdum>Try every millisecond or whatever and find, right?

00:22:19.740 --> 00:22:23.120
<v Sjors Provoost>Yes, but in this case, I don't think the problem was using a timestamp. The

00:22:23.120 --> 00:22:24.820
<v Sjors Provoost>problem was only using 32 bits.

00:22:25.480 --> 00:22:27.380
<v Aaron van Wirdum>Okay, and that's not the same thing necessarily.

00:22:27.460 --> 00:22:31.180
<v Sjors Provoost>No matter what the 32 bits is, if the 32 bits is a timestamp, yeah, that's fine.

00:22:31.180 --> 00:22:35.580
<v Sjors Provoost>But if the 32 bits was the name of your pet, it's still not enough. So it's about

00:22:35.580 --> 00:22:39.520
<v Sjors Provoost>the amount of data that was being used. Now, the reason people were able to come

00:22:39.520 --> 00:22:43.980
<v Sjors Provoost>up with the Milk Sad thing is because if you set the time to zero, you can set

00:22:43.980 --> 00:22:48.320
<v Sjors Provoost>your clock to zero, which is somewhere in 1970. Then it will produce Milk Sad.

00:22:49.370 --> 00:22:53.570
<v Sjors Provoost>But you can't just hack somebody's wallet by guessing at what time they created

00:22:53.570 --> 00:22:57.910
<v Sjors Provoost>it. You just have to guess every possible number.

00:22:58.880 --> 00:23:04.320
<v Aaron van Wirdum>So you'd have to do two things. You have to try every possible number and every

00:23:04.320 --> 00:23:05.000
<v Aaron van Wirdum>possible time?

00:23:05.200 --> 00:23:08.340
<v Sjors Provoost>No, you just try every possible number. And the fact that this number happens to

00:23:08.340 --> 00:23:12.880
<v Sjors Provoost>represent a time... probably the time in milliseconds since, you know, midnight

00:23:12.880 --> 00:23:15.480
<v Sjors Provoost>or something like that. It doesn't matter what it represents.

00:23:16.060 --> 00:23:21.950
<v Aaron van Wirdum>Okay, back to my question. Is there, I guess your answer was no, but let me, so

00:23:21.950 --> 00:23:26.150
<v Aaron van Wirdum>is there a good reason for this 32-bit

00:23:27.720 --> 00:23:30.700
<v Aaron van Wirdum>code to exist? No, you say no.

00:23:30.920 --> 00:23:33.980
<v Sjors Provoost>To exist somewhere in the universe. I mean, code has been written and people

00:23:33.980 --> 00:23:39.440
<v Sjors Provoost>don't, you know, always delete it. But if it's 2015 or whenever this change is

00:23:39.440 --> 00:23:45.390
<v Sjors Provoost>made, and you want to use some random number generator, you shouldn't use this.

00:23:47.220 --> 00:23:50.700
<v Sjors Provoost>Now you could say, and I think that was the argument, well, this function was

00:23:50.700 --> 00:23:55.700
<v Sjors Provoost>never meant to be safe, so I was allowed to use a known bad library for this.

00:23:57.200 --> 00:24:00.060
<v Sjors Provoost>I think that's not a safe way to do things.

00:24:00.540 --> 00:24:06.420
<v Aaron van Wirdum>So again, for me as a non-developer, I don't really understand

00:24:07.740 --> 00:24:13.600
<v Aaron van Wirdum>how a library was written or used or so, I don't understand why why

00:24:13.600 --> 00:24:18.500
<v Aaron van Wirdum>is this code in the first place? Is there a reasonable or feasible reason why it

00:24:18.500 --> 00:24:21.160
<v Aaron van Wirdum>would even be there? That's sort of my question.

00:24:21.160 --> 00:24:27.000
<v Sjors Provoost>Presumably he just picked a way to make a random number from

00:24:27.000 --> 00:24:31.030
<v Sjors Provoost>all the possibilities out there and he picked a particularly bad one,

00:24:33.400 --> 00:24:37.460
<v Sjors Provoost>because presumably because he thought it wasn't important so it didn't have to be

00:24:37.460 --> 00:24:39.820
<v Sjors Provoost>secure so anything that's kind of random was good enough.

00:24:39.820 --> 00:24:44.360
<v Aaron van Wirdum>Okay, so why would he think it's not that important? Is there…

00:24:44.360 --> 00:24:48.820
<v Sjors Provoost>Presumably because the intention of that function that he had in mind was that

00:24:48.820 --> 00:24:51.940
<v Sjors Provoost>this function should never be used for real wallet. Should be used on testnet. So

00:24:51.940 --> 00:24:55.820
<v Sjors Provoost>on testnet you can make a wallet that's perfectly unsafe and as long as it's kind

00:24:55.820 --> 00:24:56.960
<v Sjors Provoost>of random it's good enough.

00:24:56.960 --> 00:25:01.080
<v Aaron van Wirdum>Okay, and it's easier to implement it that way or something?

00:25:01.080 --> 00:25:04.800
<v Sjors Provoost>This part I don't know, because there are probably very secure functions that are

00:25:04.800 --> 00:25:09.460
<v Sjors Provoost>just as easy. Okay but I don't know that. So it may have been some reason why,

00:25:09.460 --> 00:25:13.740
<v Sjors Provoost>because I did look at the original change itself why that change was made from

00:25:13.740 --> 00:25:17.790
<v Sjors Provoost>something that was probably secure to something that's definitely not secure. And

00:25:17.790 --> 00:25:21.510
<v Sjors Provoost>it had something to do with thread safety, which is completely unrelated to

00:25:21.510 --> 00:25:24.890
<v Sjors Provoost>randomness. It's just a general thing in programming. So he's trying to fix a bug

00:25:24.890 --> 00:25:29.230
<v Sjors Provoost>related to, I'd say, reliability of the software so that it doesn't crash.

00:25:30.620 --> 00:25:35.540
<v Sjors Provoost>And in fixing that, he switched to a different random number generator, which

00:25:35.540 --> 00:25:39.980
<v Sjors Provoost>presumably fixed the problem with reliability, just became unsafe.

00:25:40.380 --> 00:25:40.580
<v Aaron van Wirdum>Okay.

00:25:40.740 --> 00:25:44.400
<v Sjors Provoost>And again, not realizing that people were using this with real money.

00:25:46.050 --> 00:25:51.610
<v Aaron van Wirdum>Right. About that so from what I understand and

00:25:51.610 --> 00:25:55.830
<v Aaron van Wirdum>I'm again I there's no reason for me to keep repeating this, but I don't know

00:25:55.830 --> 00:26:00.650
<v Aaron van Wirdum>what… how how to develop a wallet. I don't know what process you follow. But

00:26:00.650 --> 00:26:06.000
<v Aaron van Wirdum>apparently at least somewhere it said don't use this code for

00:26:07.750 --> 00:26:13.190
<v Aaron van Wirdum>generating real money seeds or something on there was a warning it was somewhere right?

00:26:13.190 --> 00:26:14.610
<v Sjors Provoost>Pretty fake.

00:26:14.610 --> 00:26:15.770
<v Aaron van Wirdum>Fake. Okay.

00:26:15.770 --> 00:26:19.510
<v Sjors Provoost>There was a I would say a cryptic warning I I don't know the exact wording

00:26:19.510 --> 00:26:24.110
<v Sjors Provoost>anymore. It did not say literally like never ever use this for a wallet. It said

00:26:24.110 --> 00:26:29.190
<v Sjors Provoost>something indirect which I guess if you understood what it means you would have

00:26:29.190 --> 00:26:30.030
<v Sjors Provoost>known not to use it.

00:26:30.700 --> 00:26:32.560
<v Aaron van Wirdum>Okay and

00:26:33.780 --> 00:26:39.340
<v Aaron van Wirdum>Well, if you would okay I guess wouldn't anyone

00:26:39.340 --> 00:26:42.800
<v Aaron van Wirdum>develop a wallet know what that means? Apparently not.

00:26:42.800 --> 00:26:47.320
<v Sjors Provoost>Anybody who is a wallet developer, but again we're talking about people not who

00:26:47.320 --> 00:26:51.750
<v Sjors Provoost>are wallet developers but people who are just hand hand making their own keys. So

00:26:51.750 --> 00:26:55.390
<v Sjors Provoost>there's a much bigger audience. So somebody just some random dude of the internet

00:26:55.390 --> 00:26:58.750
<v Sjors Provoost>buys a hardware wallet thinks like yeah I don't trust this Ledger company to

00:26:58.750 --> 00:27:02.850
<v Sjors Provoost>generate a random number because maybe it's exactly the same type of bug right?

00:27:02.850 --> 00:27:07.190
<v Sjors Provoost>Maybe Ledger only makes one billion different keys and they know all of them and

00:27:07.190 --> 00:27:10.910
<v Sjors Provoost>one day they just rug pull everyone right? So if you're worried about that, so

00:27:10.910 --> 00:27:12.270
<v Sjors Provoost>then that guy

00:27:12.270 --> 00:27:18.110
<v Aaron van Wirdum>Would grab Mastering Bitcoin flip open the page that has this Libbitcoin seed

00:27:18.110 --> 00:27:20.410
<v Aaron van Wirdum>use that one instead of the Bitcoin Core one.

00:27:20.410 --> 00:27:25.010
<v Sjors Provoost>Yeah, or probably he would google, okay yeah manually make Bitcoin wallet, and

00:27:25.010 --> 00:27:28.210
<v Sjors Provoost>then probably Mastering Bitcoin shows up at the top or Libbitcoin shows at the

00:27:28.210 --> 00:27:31.730
<v Sjors Provoost>top because other people link to it and would use that command now that is a bad

00:27:31.730 --> 00:27:35.900
<v Sjors Provoost>process. So you can definitely blame the user. Like don't just use commands from the internet.

00:27:36.380 --> 00:27:42.160
<v Aaron van Wirdum>Okay. I guess my real question was, so you said it was a fake warning, but my

00:27:42.160 --> 00:27:43.140
<v Aaron van Wirdum>other question is...

00:27:43.140 --> 00:27:44.260
<v Sjors Provoost>Vague warning, not a fake warning.

00:27:44.660 --> 00:27:49.880
<v Aaron van Wirdum>Yeah, fake. Yeah. Pronunciation. Where was this warning? Was it at least in the

00:27:49.880 --> 00:27:50.540
<v Aaron van Wirdum>right place?

00:27:51.440 --> 00:27:55.900
<v Sjors Provoost>Arguably no. I think it was in some part of the documentation, but not in all

00:27:55.900 --> 00:27:57.960
<v Sjors Provoost>parts of the documentation. I don't know. I haven't looked at it in that much detail.

00:27:57.960 --> 00:28:02.890
<v Aaron van Wirdum>What would have been the right way to do it in your opinion? Where would it have

00:28:02.890 --> 00:28:03.710
<v Aaron van Wirdum>been or how?

00:28:04.090 --> 00:28:08.110
<v Sjors Provoost>I probably would have not called it seed, the command. I would have called it

00:28:08.110 --> 00:28:11.890
<v Sjors Provoost>something like unsafe seed, just to be completely clear that you cannot use this.

00:28:13.330 --> 00:28:16.570
<v Sjors Provoost>But of course, the problem is maybe he was working on this and completely forgot

00:28:16.570 --> 00:28:20.950
<v Sjors Provoost>that this thing was mentioned in Mastering Bitcoin and some other places. Because

00:28:20.950 --> 00:28:24.950
<v Sjors Provoost>the safest thing to do is to really sabotage it. If you rename it to unsafe seed,

00:28:25.350 --> 00:28:29.050
<v Sjors Provoost>then anybody reading the book will type seed and it will just say error. I don't

00:28:29.050 --> 00:28:32.580
<v Sjors Provoost>know what you're talking about. This command doesn't exist. And then that would

00:28:32.580 --> 00:28:35.200
<v Sjors Provoost>trigger somebody to do some reading like, hey, why is this command removed? And

00:28:35.200 --> 00:28:38.540
<v Sjors Provoost>then they would find some, maybe some more clear warning saying, you know, this

00:28:38.540 --> 00:28:40.820
<v Sjors Provoost>command was used by some people, but you really shouldn't be using it.

00:28:41.340 --> 00:28:46.840
<v Aaron van Wirdum>Okay. And to be clear, wherever the warning was and however fake it may or may

00:28:46.840 --> 00:28:51.780
<v Aaron van Wirdum>not have been, it definitely wasn't in Mastering Bitcoin. So someone who would...

00:28:51.780 --> 00:28:55.140
<v Sjors Provoost>No, exactly. I think Mastering Bitcoin said more something along the lines of

00:28:55.140 --> 00:28:59.340
<v Sjors Provoost>whenever you make your own keys, you have to be very careful what you're doing.

00:29:00.210 --> 00:29:02.750
<v Sjors Provoost>But then immediately proceeds to suggest...

00:29:02.750 --> 00:29:08.090
<v Aaron van Wirdum>Okay, and also, to be clear, so you do agree with Voskuil because

00:29:08.090 --> 00:29:11.990
<v Aaron van Wirdum>he tweeted this, is that basically any

00:29:11.990 --> 00:29:17.880
<v Aaron van Wirdum>half-competent wallet developer wouldn't—would have known not to use

00:29:17.880 --> 00:29:18.900
<v Aaron van Wirdum>it? or would [unclear] clear?

00:29:18.460 --> 00:29:23.160
<v Sjors Provoost>What do you mean by wallet developer? There's like 10 wallet developers. People

00:29:23.160 --> 00:29:28.150
<v Sjors Provoost>who actually make wallet software. Maybe those people would know, but I mean 99

00:29:28.150 --> 00:29:32.970
<v Sjors Provoost>of Bitcoin users are not wallet developers. They just make their own wallet.

00:29:32.970 --> 00:29:37.260
<v Aaron van Wirdum>I didn't I didn't make my own wallet. I just downloaded the wallet.

00:29:37.260 --> 00:29:41.540
<v Sjors Provoost>No, okay but the higher… You know the pyramid is bigger right? So the so at the

00:29:41.540 --> 00:29:45.620
<v Sjors Provoost>top of the curve you have Andrew Poelstra he does not only make his own wallet he

00:29:45.620 --> 00:29:49.700
<v Sjors Provoost>makes his own math that is used to make his own wallet right? Then you have

00:29:49.700 --> 00:29:55.360
<v Sjors Provoost>people like uh I don't know sipa, Pieter Wuille, Andrew Chow, maybe

00:29:55.360 --> 00:30:01.080
<v Sjors Provoost>myself. I work on wallet software. We're not in the same level, but someone like

00:30:01.080 --> 00:30:04.560
<v Sjors Provoost>me, I make wallets. At least I've made two in my life. I've worked on two in my

00:30:04.560 --> 00:30:06.940
<v Sjors Provoost>life. So yeah, I should not make that mistake.

00:30:07.380 --> 00:30:08.820
<v Aaron van Wirdum>Right, so how deep…

00:30:08.820 --> 00:30:11.520
<v Sjors Provoost>Arguably someone like Luke Dashjr shouldn't make that mistake.

00:30:11.520 --> 00:30:15.420
<v Aaron van Wirdum>You don't have to name a name I guess, or unless you want to but how far down

00:30:15.420 --> 00:30:20.060
<v Aaron van Wirdum>this pyramid do we need to go before like who's the target audience to fall

00:30:20.060 --> 00:30:21.840
<v Aaron van Wirdum>victim to this problem so to say?

00:30:21.840 --> 00:30:26.980
<v Sjors Provoost>Yeah, I would say anybody who question… Anybody who's paranoid enough to not

00:30:26.980 --> 00:30:32.260
<v Sjors Provoost>trust the hardware wallets and that's you know everyone who uses Bitcoin who uses

00:30:32.260 --> 00:30:35.940
<v Sjors Provoost>like who even uses a hardware wallet. And then everybody who feels confident

00:30:35.940 --> 00:30:41.360
<v Sjors Provoost>enough to type some commands, which is, you know, not everyone, but it's still a

00:30:41.360 --> 00:30:41.860
<v Sjors Provoost>lot of people.

00:30:42.380 --> 00:30:42.740
<v Aaron van Wirdum>Okay.

00:30:43.710 --> 00:30:44.550
<v Sjors Provoost>Maybe not you.

00:30:46.110 --> 00:30:47.730
<v Aaron van Wirdum>I mean, I'm not going to do that. No.

00:30:48.090 --> 00:30:51.590
<v Sjors Provoost>No, but there are plenty of people who know how to type commands. Like far, far

00:30:51.590 --> 00:30:54.610
<v Sjors Provoost>more people know how to type commands than people who understand cryptography.

00:30:56.650 --> 00:31:00.970
<v Aaron van Wirdum>Oh, I mean, I've typed a command or two in my life, but I'm not going to type

00:31:00.970 --> 00:31:03.830
<v Aaron van Wirdum>commands to generate seeds now. I don't think so.

00:31:03.870 --> 00:31:07.450
<v Sjors Provoost>No, that's fine. But I can assure you there are plenty of people who will do

00:31:07.450 --> 00:31:11.690
<v Sjors Provoost>that. So there's a very large group of people, I think, who would very easily

00:31:11.690 --> 00:31:15.250
<v Sjors Provoost>make that mistake. Now, how to prevent anyone from making that mistake? Like I

00:31:15.250 --> 00:31:19.010
<v Sjors Provoost>said, you'd have to name the command something else and maybe even like force

00:31:19.010 --> 00:31:24.090
<v Sjors Provoost>somebody to run a compiler or like put a bunch of barriers in place so people do

00:31:24.090 --> 00:31:28.280
<v Sjors Provoost>not use it by mistake. I don't know where the responsibility of the library maker

00:31:28.280 --> 00:31:29.600
<v Sjors Provoost>stops, right?

00:31:29.900 --> 00:31:30.500
<v Aaron van Wirdum>Yeah, okay.

00:31:30.920 --> 00:31:33.880
<v Sjors Provoost>It's still open source. If you use it, it is at your own risk.

00:31:35.560 --> 00:31:37.620
<v Sjors Provoost>But I don't agree with that statement.

00:31:37.800 --> 00:31:43.720
<v Aaron van Wirdum>So it sounds to me like your position is more or less the

00:31:43.720 --> 00:31:49.700
<v Aaron van Wirdum>fact that this code exists is not necessarily a problem. Like that was my sort

00:31:49.700 --> 00:31:52.340
<v Aaron van Wirdum>of first intuition. Why would this even exist at all?

00:31:52.540 --> 00:31:55.780
<v Sjors Provoost>Yeah, because somebody one day 20 years ago wrote it thinking it was safe.

00:31:55.940 --> 00:31:59.460
<v Aaron van Wirdum>Yeah, okay. So that's not necessarily a problem. However, the fact that it was...

00:32:00.390 --> 00:32:04.810
<v Aaron van Wirdum>named seed and it wasn't, like the warning wasn't clear enough, that that's really…

00:32:04.810 --> 00:32:07.670
<v Sjors Provoost>No, I think the fact that Libbitcoin used it at all was not a good choice.

00:32:07.670 --> 00:32:12.390
<v Aaron van Wirdum>Okay well that's what I was saying essentially. I mean okay that it exists in

00:32:12.390 --> 00:32:13.550
<v Aaron van Wirdum>Libbitcoin I should…

00:32:13.550 --> 00:32:16.810
<v Sjors Provoost>Yeah, exactly, the fact it exists in the universe is fine. The fact it exists in

00:32:16.810 --> 00:32:20.410
<v Sjors Provoost>Libbitcoin I I find that hard to defend. Okay maybe there was a good reason for

00:32:20.410 --> 00:32:21.670
<v Sjors Provoost>it but I don't know.

00:32:22.440 --> 00:32:25.340
<v Aaron van Wirdum>Right, okay, I mean so my my best understanding…

00:32:25.340 --> 00:32:30.100
<v Sjors Provoost>If you do use it as a Libbitcoin author you should put like not just one but like

00:32:30.100 --> 00:32:32.780
<v Sjors Provoost>infinite warnings like never ever ever ever use this.

00:32:32.780 --> 00:32:37.100
<v Aaron van Wirdum>I mean my best understanding is that it used to be testing code or something

00:32:37.100 --> 00:32:42.930
<v Aaron van Wirdum>along these lines um… But yeah, but in that case, what you're saying, it was not

00:32:42.930 --> 00:32:48.230
<v Aaron van Wirdum>labeled clearly and the warnings weren't clear enough. That's really

00:32:48.230 --> 00:32:51.330
<v Aaron van Wirdum>ultimately the problem.

00:32:51.650 --> 00:32:55.370
<v Sjors Provoost>No, but none of this would have been a problem if Mastering Bitcoin didn't point to this.

00:32:56.790 --> 00:33:01.270
<v Sjors Provoost>Because there's plenty of libraries out there that are also unsafe. Nobody uses

00:33:01.270 --> 00:33:06.030
<v Sjors Provoost>them because they're not mentioned in some famous books. So it's a combination of

00:33:06.030 --> 00:33:06.910
<v Sjors Provoost>circumstances, right?

00:33:07.230 --> 00:33:13.310
<v Aaron van Wirdum>Right. So then basically, Andreas Antonopoulos, I mean, I'm not into the blame game.

00:33:14.050 --> 00:33:15.790
<v Sjors Provoost>No, it's a combination of factors.

00:33:16.050 --> 00:33:17.570
<v Aaron van Wirdum>He's partly responsible then, right?

00:33:17.650 --> 00:33:19.590
<v Sjors Provoost>I wouldn't say responsible. It's more like Murphy's Law.

00:33:20.810 --> 00:33:25.270
<v Sjors Provoost>If only one thing goes wrong, then nobody gets hurt. But if three things go

00:33:25.270 --> 00:33:30.450
<v Sjors Provoost>wrong, like, okay, it's in a popular book, and it's a library that's well-known,

00:33:30.630 --> 00:33:33.790
<v Sjors Provoost>and then something is changed in the library that people didn't really think

00:33:33.790 --> 00:33:36.190
<v Sjors Provoost>about when they wrote the book, or even when they wrote the library. Some

00:33:36.190 --> 00:33:38.250
<v Sjors Provoost>combination of things goes wrong, and people lose money.

00:33:38.550 --> 00:33:44.120
<v Aaron van Wirdum>Okay. That sounds like a very reasonable explanation to me.

00:33:44.380 --> 00:33:46.940
<v Sjors Provoost>And then even a very small group of people lose money, right? People who are not

00:33:46.940 --> 00:33:51.100
<v Sjors Provoost>expert enough to write really safe wallet software themselves, but expert enough

00:33:51.100 --> 00:33:52.420
<v Sjors Provoost>to do something stupid.

00:33:53.400 --> 00:33:58.640
<v Aaron van Wirdum>Right. So this brings me to the next point, which I bring up. So it sounds

00:33:58.640 --> 00:34:04.260
<v Aaron van Wirdum>to me, you don't think this was intentional, as some people have

00:34:04.930 --> 00:34:09.190
<v Aaron van Wirdum>suggested or even claimed? You don't think this was an intentional attempt to

00:34:09.190 --> 00:34:13.110
<v Aaron van Wirdum>steal money by the Libbitcoin developers? That's not what you think?

00:34:13.250 --> 00:34:14.070
<v Sjors Provoost>I don't think so.

00:34:15.530 --> 00:34:18.750
<v Sjors Provoost>Would have been, I don't know, they could have stolen more if it was intentional.

00:34:19.450 --> 00:34:19.790
<v Aaron van Wirdum>Right.

00:34:22.180 --> 00:34:27.180
<v Sjors Provoost>Let's see. I mean, there's a couple of other factors here why I don't think it

00:34:27.180 --> 00:34:31.700
<v Sjors Provoost>was intentional. So I looked at one of the thefts that was listed in the article

00:34:31.700 --> 00:34:36.410
<v Sjors Provoost>on milksad.info. And they list a bunch of transactions that were probably thefts.

00:34:36.670 --> 00:34:39.610
<v Sjors Provoost>And you can click on these transactions in your mempool explorer or whatever, and

00:34:39.610 --> 00:34:42.730
<v Sjors Provoost>you can look at the input transactions. So every transaction, the theft has

00:34:42.730 --> 00:34:46.670
<v Sjors Provoost>inputs. Those are the victims. And then it has an output, which is the guy who

00:34:46.670 --> 00:34:52.630
<v Sjors Provoost>stole it, presumably. And one of these transactions takes inputs from many, many

00:34:52.630 --> 00:34:56.850
<v Sjors Provoost>different wallets. So they have addresses that are bech32, SegWit, basically, and

00:34:56.850 --> 00:34:59.990
<v Sjors Provoost>they have all the way to legacy addresses. So I clicked on a bunch of these input

00:34:59.990 --> 00:35:04.400
<v Sjors Provoost>addresses that looked old and looked at which ones are the oldest. And I found

00:35:04.400 --> 00:35:07.000
<v Sjors Provoost>addresses that were funded in 2016.

00:35:09.260 --> 00:35:09.940
<v Sjors Provoost>Let me see.

00:35:11.990 --> 00:35:16.330
<v Sjors Provoost>Yeah, December 2016 was basically the first person who put money on that address.

00:35:17.520 --> 00:35:20.860
<v Sjors Provoost>So basically people have been putting money on these addresses for years and

00:35:20.860 --> 00:35:25.100
<v Sjors Provoost>years and years and years. But then the theft happens just a month ago.

00:35:26.460 --> 00:35:30.320
<v Sjors Provoost>And that's interesting because it could have happened earlier, right? If it was a rug pull.

00:35:31.720 --> 00:35:34.480
<v Sjors Provoost>Especially it could have happened in, I don't know, a bull market instead of a

00:35:34.480 --> 00:35:40.280
<v Sjors Provoost>bear market. Like if but I don't know… Um the other factor is that

00:35:40.280 --> 00:35:41.700
<v Sjors Provoost>this theft is I…

00:35:41.700 --> 00:35:45.040
<v Aaron van Wirdum>I think your logic here if I understand it correctly, could have happened earlier

00:35:45.040 --> 00:35:51.030
<v Aaron van Wirdum>or later. Yes. Well, I mean but that doesn't prove intentionality

00:35:51.030 --> 00:35:51.970
<v Aaron van Wirdum>or not right?

00:35:51.970 --> 00:35:55.250
<v Sjors Provoost>I mean it doesn't but it suggests it. It suggests that it's not intentional

00:35:55.250 --> 00:35:59.410
<v Sjors Provoost>because the other factor I was going to mention is that about half a year ago

00:35:59.410 --> 00:36:03.210
<v Sjors Provoost>Ledger found this bug that was essentially identical minus like one little

00:36:03.210 --> 00:36:07.450
<v Sjors Provoost>detail. And so to me, the most plausible explanation is that somebody read the

00:36:07.450 --> 00:36:10.970
<v Sjors Provoost>Ledger explanation and just started thinking like, hey, are there any other

00:36:10.970 --> 00:36:14.550
<v Sjors Provoost>wallets that use this Twister thing? And they would Google around looking for

00:36:14.550 --> 00:36:17.830
<v Sjors Provoost>this Twister thing and they would probably find the Libbitcoin code. And then

00:36:17.830 --> 00:36:21.410
<v Sjors Provoost>they need a couple of months to figure out how to how to steal all that money in

00:36:21.410 --> 00:36:22.110
<v Sjors Provoost>one go without…

00:36:22.670 --> 00:36:26.510
<v Aaron van Wirdum>Right, and on the other side of that argument, you would presume...

00:36:26.510 --> 00:36:29.150
<v Sjors Provoost>Because if it was deliberate, it could have happened before the Ledger incident.

00:36:29.690 --> 00:36:32.570
<v Aaron van Wirdum>Yeah, or at least you would do it immediately after, right? Because you would

00:36:32.570 --> 00:36:34.090
<v Aaron van Wirdum>think, oh, someone's getting close.

00:36:34.250 --> 00:36:37.130
<v Sjors Provoost>Yeah, but probably you would have also taken the Ledger money.

00:36:37.800 --> 00:36:38.160
<v Aaron van Wirdum>Right.

00:36:38.420 --> 00:36:41.660
<v Sjors Provoost>Because you would have been like, huh, if I can make this backdoor, let's see who

00:36:41.660 --> 00:36:44.360
<v Sjors Provoost>else does this by accident, right?

00:36:44.620 --> 00:36:46.860
<v Aaron van Wirdum>Okay, you were going to bring up a second point?

00:36:47.000 --> 00:36:51.220
<v Sjors Provoost>And yeah, in general, I think the timeline we just explained... it's pretty

00:36:51.220 --> 00:36:54.980
<v Sjors Provoost>plausibly how something like this could happen by accident without any bad

00:36:54.980 --> 00:36:58.350
<v Sjors Provoost>intention. I don't know what my second point was. I think I just…

00:36:58.350 --> 00:37:04.200
<v Aaron van Wirdum>Okay, well I can bring up a counterpoint just to see what you think about it.

00:37:04.200 --> 00:37:09.280
<v Aaron van Wirdum>So I think um Lisa niftynei,

00:37:09.280 --> 00:37:14.920
<v Aaron van Wirdum>she tweeted some sort of graph about how uh

00:37:15.010 --> 00:37:20.130
<v Aaron van Wirdum>development activity on Libbitcoin stops basically immediately after

00:37:21.080 --> 00:37:24.720
<v Aaron van Wirdum>something related to this happened. I don't remember what it was exactly. Do you?

00:37:25.280 --> 00:37:27.540
<v Sjors Provoost>Yeah, I think after the first exploit.

00:37:28.200 --> 00:37:28.560
<v Aaron van Wirdum>Okay.

00:37:29.600 --> 00:37:34.040
<v Sjors Provoost>So this is a case of, I think what she showed was a chart that looked at the

00:37:34.040 --> 00:37:38.020
<v Sjors Provoost>commits on GitHub, like around the time of this exploit. So this would have been

00:37:38.020 --> 00:37:41.540
<v Sjors Provoost>mid-July. And I think they showed like two weeks of activity and then nothing.

00:37:42.260 --> 00:37:47.800
<v Sjors Provoost>And then there's the saying called, when in doubt, zoom out. And if you look at

00:37:47.800 --> 00:37:51.180
<v Sjors Provoost>Libbitcoin over a long period, so I did it on GitHub, if you look at it from,

00:37:51.200 --> 00:37:56.960
<v Sjors Provoost>say, 2014 and onwards, you see that it was very active in 2014, maybe

00:37:56.960 --> 00:38:01.920
<v Sjors Provoost>2015. Then it was almost dead, but with occasional spikes in activity. So every

00:38:01.920 --> 00:38:05.760
<v Sjors Provoost>six months or so, there'd be some activity. And so the fact that there was a

00:38:05.760 --> 00:38:10.820
<v Sjors Provoost>recent burst in activity that stopped, I think it's a complete coincidence. Or at

00:38:10.820 --> 00:38:14.280
<v Sjors Provoost>least it also fits the pattern. Like they don't do anything and then for a couple

00:38:14.280 --> 00:38:19.100
<v Sjors Provoost>of weeks they work on it and then it stops again. And I think it was the last

00:38:19.100 --> 00:38:19.640
<v Sjors Provoost>change.

00:38:21.130 --> 00:38:22.950
<v Sjors Provoost>No, no, the bug was introduced much earlier, right?

00:38:24.620 --> 00:38:24.880
<v Aaron van Wirdum>Yeah.

00:38:25.080 --> 00:38:28.960
<v Sjors Provoost>So the fact that it happens to have been one burst of activity, I don't know. And

00:38:28.960 --> 00:38:30.580
<v Sjors Provoost>they didn't introduce the vulnerability now.

00:38:32.410 --> 00:38:32.890
<v Aaron van Wirdum>Yeah.

00:38:33.230 --> 00:38:36.510
<v Sjors Provoost>So it wouldn't—it [unclear] be causal, because whatever the mistake was made,

00:38:36.610 --> 00:38:39.430
<v Sjors Provoost>like we said, in 2016, the first people put their money on those addresses.

00:38:39.870 --> 00:38:44.510
<v Aaron van Wirdum>Okay, so you think that's perfectly fine explained by coincidence,

00:38:44.510 --> 00:38:47.350
<v Aaron van Wirdum>if there is even this correlation?

00:38:47.350 --> 00:38:50.930
<v Sjors Provoost>Well, first of all, it fits the pattern of these bursts of activity, and second,

00:38:51.010 --> 00:38:54.490
<v Sjors Provoost>it doesn't make sense timing-wise, because the vulnerability was introduced in

00:38:54.490 --> 00:39:00.330
<v Sjors Provoost>2016 and not now. It was exploited now, but it was exploited, it was in place

00:39:00.330 --> 00:39:00.810
<v Sjors Provoost>much earlier.

00:39:02.130 --> 00:39:06.670
<v Aaron van Wirdum>Okay, um I guess I mean

00:39:06.670 --> 00:39:08.590
<v Aaron van Wirdum>obviously,

00:39:09.970 --> 00:39:15.840
<v Aaron van Wirdum>I have no way of making any sort of reliable judgment on this. I

00:39:15.840 --> 00:39:21.830
<v Aaron van Wirdum>would just be I… I mean, I would be kind of shocked if this was intentional.

00:39:22.290 --> 00:39:24.330
<v Aaron van Wirdum>I've known Eric Voskuil for so long.

00:39:24.450 --> 00:39:28.150
<v Sjors Provoost>I would also be disappointed in the sense that it was only $1 million. It's like,

00:39:28.230 --> 00:39:33.030
<v Sjors Provoost>really? 10 years, a career, 10-year career in Bitcoin and all you can do is $1

00:39:33.030 --> 00:39:38.910
<v Sjors Provoost>million? I'm not buying that. But anyway, from what I know, one

00:39:38.910 --> 00:39:43.050
<v Sjors Provoost>of the original victims, one of the more sophisticated victims that realized what

00:39:43.050 --> 00:39:46.750
<v Sjors Provoost>was going on and was able to reproduce it, filed a report with the FBI.

00:39:48.190 --> 00:39:53.040
<v Sjors Provoost>So I'm sure somebody will try to figure out where that money went to. And then

00:39:53.040 --> 00:39:57.800
<v Sjors Provoost>maybe one day we'll know who did it. But my guess is just some 16-year-old in his

00:39:57.800 --> 00:40:03.620
<v Sjors Provoost>basement, read the Ledger post, did some digging, figured out how to

00:40:03.620 --> 00:40:08.030
<v Sjors Provoost>do it from Libbitcoin, had to write some code to make sure he could do it all at

00:40:08.030 --> 00:40:10.670
<v Sjors Provoost>once. Because if you just steal it from one, people will pay attention on

00:40:10.670 --> 00:40:15.470
<v Sjors Provoost>Twitter. Somebody will figure out what happened and will basically... You get

00:40:15.470 --> 00:40:19.290
<v Sjors Provoost>this white knight effect where somebody will try to preemptively take the money,

00:40:19.510 --> 00:40:22.270
<v Sjors Provoost>put it in a safe place and then give it back to the original owners.

00:40:24.360 --> 00:40:29.390
<v Aaron van Wirdum>All right. What now? Are we at that point in the podcast or is there something

00:40:29.390 --> 00:40:29.830
<v Aaron van Wirdum>else?

00:40:30.090 --> 00:40:34.790
<v Sjors Provoost>Yeah. What now is very simple. I think the Mastering Bitcoin new edition book

00:40:34.790 --> 00:40:36.550
<v Sjors Provoost>will not recommend this particular tool.

00:40:40.490 --> 00:40:44.730
<v Sjors Provoost>That means that maybe people won't do it. And I think the tool itself has made

00:40:44.730 --> 00:40:47.630
<v Sjors Provoost>some changes to make it a little bit more clear. I'm not sure.

00:40:47.870 --> 00:40:52.390
<v Aaron van Wirdum>I mean, I guess it would be good to rename the tool as you suggested.

00:40:52.510 --> 00:40:56.710
<v Sjors Provoost>Yeah, personally, I would do something like rename the command so that anybody

00:40:56.710 --> 00:41:00.790
<v Sjors Provoost>who's been using it, it will break for them. And then they can read the manual

00:41:00.790 --> 00:41:04.210
<v Sjors Provoost>and think, do I really want to be using this? Or was this just a test that I was

00:41:04.210 --> 00:41:06.010
<v Sjors Provoost>writing and it's fine. I'll just change the command.

00:41:07.670 --> 00:41:10.310
<v Sjors Provoost>Because the problem is, of course, people will still read old editions of the

00:41:10.310 --> 00:41:15.150
<v Sjors Provoost>book. So everybody, you know, some percentage of readers will think, oh, I'll use

00:41:15.150 --> 00:41:17.580
<v Sjors Provoost>this. And you want to protect that percentage.

00:41:19.250 --> 00:41:19.730
<v Aaron van Wirdum>Right.

00:41:21.100 --> 00:41:26.750
<v Aaron van Wirdum>Okay. I think, does that conclude our episode on Milk Sad? Is

00:41:26.750 --> 00:41:32.000
<v Aaron van Wirdum>there anything we left out? Is there anything you want to add? Any hot takes?

00:41:32.320 --> 00:41:35.800
<v Sjors Provoost>Yeah. So there was the other question of whether there have been other wallets

00:41:35.800 --> 00:41:40.700
<v Sjors Provoost>with the exact same bug. This was raised on Twitter, or X or whatever it's called

00:41:40.700 --> 00:41:41.840
<v Sjors Provoost>by the time you're listening to this.

00:41:46.110 --> 00:41:50.450
<v Sjors Provoost>There's a possibility that this particular bug was made by some other wallet and

00:41:50.450 --> 00:41:54.950
<v Sjors Provoost>not all the coins that were stolen were from the Libbitcoin related stuff.

00:41:56.510 --> 00:42:02.400
<v Sjors Provoost>I think that's unlikely because as we saw, as I said before, you had the

00:42:02.400 --> 00:42:08.280
<v Sjors Provoost>Dojo—sorry, the Trust Wallet that had essentially the same bug as this

00:42:08.280 --> 00:42:12.290
<v Sjors Provoost>one. But every wallet, or it seems like every wallet has its own fingerprint. So

00:42:12.290 --> 00:42:16.250
<v Sjors Provoost>you start with this bad 32-bit randomness, and then you add your own fingerprint,

00:42:17.000 --> 00:42:21.040
<v Sjors Provoost>which is slightly different for the Trust Wallet than from Libbitcoin. And if you

00:42:21.040 --> 00:42:23.300
<v Sjors Provoost>don't know this fingerprint, you're not able to steal the money.

00:42:24.640 --> 00:42:30.360
<v Sjors Provoost>Because otherwise, the money from this situation would have been stolen

00:42:30.360 --> 00:42:35.080
<v Sjors Provoost>half a year ago. So my guess is if there's another wallet that uses the same

00:42:35.080 --> 00:42:38.420
<v Sjors Provoost>insecure way to generate random data, they probably also have a slightly

00:42:38.420 --> 00:42:40.900
<v Sjors Provoost>different fingerprint, which means that their coins would not be stolen.

00:42:43.080 --> 00:42:45.240
<v Sjors Provoost>And also nobody was able to point to one.

00:42:46.710 --> 00:42:51.590
<v Sjors Provoost>But it is possible, right? So the attackers stole coins that were protected by

00:42:51.590 --> 00:42:54.210
<v Sjors Provoost>these insecure private keys, and it's possible that there were other wallet

00:42:54.210 --> 00:42:56.410
<v Sjors Provoost>libraries out there that were generating the same keys.

00:42:58.270 --> 00:42:59.510
<v Sjors Provoost>We just don't know which one.

00:43:00.140 --> 00:43:06.120
<v Aaron van Wirdum>Right, so we understand that Trust Wallet had a bug like this, but as far as

00:43:06.120 --> 00:43:11.980
<v Aaron van Wirdum>we know, there is no other wallet implementation, no other wallet that uses, that

00:43:11.980 --> 00:43:15.840
<v Aaron van Wirdum>has the same problem. So it's basically Trust Wallet has a problem like this and

00:43:15.840 --> 00:43:21.410
<v Aaron van Wirdum>independently it's... guys that are slightly more technical than I am and use the

00:43:21.410 --> 00:43:26.410
<v Aaron van Wirdum>command line. But we don't know of another wallet, but there might be because

00:43:26.410 --> 00:43:28.070
<v Aaron van Wirdum>there's no way to tell on the blockchain.

00:43:28.350 --> 00:43:32.370
<v Sjors Provoost>There could be. However, you know, wallets are often open source. So you would

00:43:32.370 --> 00:43:36.270
<v Sjors Provoost>simply Google all the source code out there for somebody using the same Twister

00:43:36.270 --> 00:43:38.250
<v Sjors Provoost>random number generator.

00:43:40.120 --> 00:43:43.460
<v Sjors Provoost>Maybe, but there could be some closed source wallet out there that, you know,

00:43:43.660 --> 00:43:44.160
<v Sjors Provoost>uses the same thing.

00:43:44.160 --> 00:43:48.020
<v Aaron van Wirdum>We would have presumably heard it by now, don't you think? It's almost a week ago

00:43:48.020 --> 00:43:51.260
<v Aaron van Wirdum>since this CVE or since this became public.

00:43:51.820 --> 00:43:53.680
<v Sjors Provoost>I don't know from who we would hear that.

00:43:55.060 --> 00:43:56.160
<v Sjors Provoost>From whoever got there.

00:43:56.280 --> 00:44:01.530
<v Aaron van Wirdum>People on GitHub or Twitter or Reddit, I don't know. You know people.

00:44:02.000 --> 00:44:04.140
<v Aaron van Wirdum>You're a well-connected guy, Sjors.

00:44:04.050 --> 00:44:08.030
<v Sjors Provoost>If it was another open source wallet doing the exact same thing, so not just

00:44:08.030 --> 00:44:12.510
<v Sjors Provoost>using the same random number generator, but also using it in a certain way,

00:44:13.140 --> 00:44:16.580
<v Sjors Provoost>right? Because there was a difference in the way that the Trust Wallet used it

00:44:16.580 --> 00:44:20.780
<v Sjors Provoost>and the way that the Libbitcoin stuff used it. Then I guess, yeah, we would have

00:44:20.780 --> 00:44:24.280
<v Sjors Provoost>known about that. But we wouldn't know about a closed source wallet. So you can't

00:44:24.280 --> 00:44:26.080
<v Sjors Provoost>rule it out. Doesn't seem very likely though.

00:44:26.760 --> 00:44:30.160
<v Aaron van Wirdum>Okay. I think that's it. What's the moral of the story?

00:44:31.280 --> 00:44:32.320
<v Sjors Provoost>Be careful out there.

00:44:34.800 --> 00:44:36.720
<v Sjors Provoost>So thank you for listening to Bitcoin

00:44:36.720 --> 00:44:37.780
<v Aaron van Wirdum>Explained.

