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

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

00:00:22.360 --> 00:00:22.920
<v Sjors Provoost>Explained.

00:00:23.820 --> 00:00:24.420
<v Aaron van Wirdum>Hey, Sjors.

00:00:25.260 --> 00:00:25.500
<v Sjors Provoost>Yo.

00:00:25.960 --> 00:00:26.560
<v Aaron van Wirdum>Hey, Ruben.

00:00:26.920 --> 00:00:27.160
<v Ruben Somsen>Hey.

00:00:27.700 --> 00:00:32.960
<v Aaron van Wirdum>Ruben is back. I think last time in Prague, we were all in Prague last week. And

00:00:32.960 --> 00:00:38.220
<v Aaron van Wirdum>there I introduced you as our resident funky second layer expert.

00:00:38.560 --> 00:00:39.020
<v Ruben Somsen>That is right.

00:00:39.320 --> 00:00:43.620
<v Aaron van Wirdum>This week we're going to... talk about one of your new proposals, which is

00:00:43.620 --> 00:00:45.260
<v Aaron van Wirdum>actually not a second layer proposal.

00:00:45.440 --> 00:00:45.680
<v Ruben Somsen>True.

00:00:46.200 --> 00:00:48.860
<v Aaron van Wirdum>You've promoted to the base chain.

00:00:49.100 --> 00:00:50.860
<v Ruben Somsen>[unclear] Thank you.

00:00:51.180 --> 00:00:52.500
<v Sjors Provoost>Welcome to the base chain.

00:00:53.020 --> 00:00:54.620
<v Ruben Somsen>It's good to be here. Thank you.

00:00:55.180 --> 00:00:57.460
<v Aaron van Wirdum>So yeah, we're going to discuss silent payments.

00:00:57.700 --> 00:00:57.840
<v Ruben Somsen>Yep.

00:00:58.220 --> 00:01:01.580
<v Aaron van Wirdum>This is a proposal you made recently, right?

00:01:01.720 --> 00:01:03.680
<v Ruben Somsen>Yeah, it's a recent proposal, yeah.

00:01:03.920 --> 00:01:07.980
<v Aaron van Wirdum>Yeah, so you proposed this a couple months ago, but I think the general idea is

00:01:07.980 --> 00:01:13.080
<v Aaron van Wirdum>also older, right? Very old. It's based on an old idea called stealth addresses,

00:01:13.360 --> 00:01:15.820
<v Aaron van Wirdum>I think, originally proposed by Peter Todd years ago.

00:01:15.940 --> 00:01:16.520
<v Ruben Somsen>Yeah, 2014.

00:01:16.860 --> 00:01:21.610
<v Aaron van Wirdum>Right. And this is... improvement on that, an iteration on that? How would you

00:01:21.610 --> 00:01:22.210
<v Aaron van Wirdum>describe that?

00:01:22.370 --> 00:01:26.330
<v Ruben Somsen>Yeah, you could say that. So the interesting thing is that the original proposal,

00:01:26.610 --> 00:01:31.890
<v Ruben Somsen>I think the idea is kind of old, but the downside of this

00:01:31.890 --> 00:01:35.970
<v Ruben Somsen>version is that you have to do a lot of work, essentially, to recognize that you

00:01:35.970 --> 00:01:36.450
<v Ruben Somsen>got paid.

00:01:36.530 --> 00:01:37.230
<v Aaron van Wirdum>Of your version.

00:01:37.330 --> 00:01:42.390
<v Ruben Somsen>Yes. And I think in the past, it's not like people didn't think of that, but at

00:01:42.390 --> 00:01:46.710
<v Ruben Somsen>the time, it seemed like that was going to be too much work. And Bitcoin has

00:01:46.710 --> 00:01:50.050
<v Ruben Somsen>improved a lot over the years. So actually I think sort of like that that

00:01:50.050 --> 00:01:54.270
<v Ruben Somsen>thinking never got updated. Uh and now we're at the point where we can do uh

00:01:54.270 --> 00:01:59.010
<v Ruben Somsen>these these kind of the verifications of blockchain quite quickly, right and the

00:01:59.010 --> 00:02:03.750
<v Ruben Somsen>uh the the library that we use libsecp 25— 20— what—

00:02:03.750 --> 00:02:09.560
<v Ruben Somsen>256k1 Um, that library is very fast

00:02:09.560 --> 00:02:15.380
<v Ruben Somsen>now. So basically, it made it more viable than it was back in 2014.

00:02:15.700 --> 00:02:21.700
<v Sjors Provoost>And for the loyal listeners, we did an episode about libsecp256k1. I

00:02:21.700 --> 00:02:23.320
<v Sjors Provoost>think it's episode two.

00:02:24.200 --> 00:02:24.760
<v Aaron van Wirdum>Really?

00:02:25.120 --> 00:02:25.540
<v Ruben Somsen>Oh, wow.

00:02:26.630 --> 00:02:31.270
<v Aaron van Wirdum>That's short for you. You'll remember everything. Okay, so we can maybe get into

00:02:31.270 --> 00:02:36.900
<v Aaron van Wirdum>the comparisons later. But for now, what is the general... idea what's the

00:02:36.900 --> 00:02:38.420
<v Aaron van Wirdum>general problem that we're solving?

00:02:38.420 --> 00:02:42.560
<v Ruben Somsen>Yeah, so kind of a good way of putting it is that generally speaking when you

00:02:42.560 --> 00:02:48.100
<v Ruben Somsen>want to make a payment you have two options. Someone can give an address and you

00:02:48.100 --> 00:02:52.760
<v Ruben Somsen>can reuse that address and continually pay that person on the same address. And

00:02:52.760 --> 00:02:57.320
<v Ruben Somsen>if you do that then you lose all all privacy, because every time you receive a

00:02:57.320 --> 00:03:01.220
<v Ruben Somsen>payment I know it's your address and then maybe you know Sjors sent some money to

00:03:01.220 --> 00:03:05.870
<v Ruben Somsen>you and I I can see how many bitcoins you have etc etc Um, so because that's a

00:03:05.870 --> 00:03:10.110
<v Ruben Somsen>problem generally what we do is let's say Aaron if I want to send you a payment I

00:03:10.110 --> 00:03:13.670
<v Ruben Somsen>I tell you I say like hey Aaron I want to send you some Bitcoin could you please

00:03:13.670 --> 00:03:16.790
<v Ruben Somsen>give me an address? And you're sure here's here's an address and every time I

00:03:16.790 --> 00:03:18.370
<v Ruben Somsen>want to pay you you have to give me that address.

00:03:18.370 --> 00:03:20.630
<v Aaron van Wirdum>Well I'll generate a new address every time right?

00:03:20.630 --> 00:03:21.890
<v Ruben Somsen>That's what you generate a new one

00:03:21.890 --> 00:03:22.970
<v Aaron van Wirdum>Yeah ideally a fresh one.

00:03:22.970 --> 00:03:28.520
<v Ruben Somsen>Yeah, and so, This proposal, silent payments, allows you to

00:03:28.520 --> 00:03:34.260
<v Ruben Somsen>basically have a single static address and allow me to derive

00:03:34.260 --> 00:03:39.740
<v Ruben Somsen>an address from that, that nobody can recognize except for you and me. And so

00:03:39.740 --> 00:03:43.640
<v Ruben Somsen>this makes it basically, it makes it the same process, but now it's

00:03:43.640 --> 00:03:47.000
<v Ruben Somsen>non-interactive where I don't have to ask you for an address. And that is

00:03:47.000 --> 00:03:51.220
<v Ruben Somsen>particularly useful when you think of things like donations, where there's a

00:03:51.220 --> 00:03:55.140
<v Ruben Somsen>cause, the cause posts one single address and everybody goes and donates to that

00:03:55.140 --> 00:03:59.900
<v Ruben Somsen>cause and no interaction is required. So that is basically the proposal.

00:04:00.100 --> 00:04:03.660
<v Aaron van Wirdum>Right. So if I want to accept donations, then I'll post this.

00:04:05.560 --> 00:04:08.820
<v Aaron van Wirdum>No, it's a stealth address, but you're not calling it a stealth address. You're

00:04:08.820 --> 00:04:10.460
<v Aaron van Wirdum>calling it a silent payment address, right?

00:04:10.580 --> 00:04:13.700
<v Ruben Somsen>Yes, just to differentiate. But it is essentially a form of stealth address.

00:04:13.700 --> 00:04:18.900
<v Aaron van Wirdum>Same idea. So I'm posting this quote-unquote address on my website, and then you,

00:04:19.200 --> 00:04:23.060
<v Aaron van Wirdum>Ruben, in this case, can generate new addresses from this?

00:04:23.260 --> 00:04:23.520
<v Ruben Somsen>Yes.

00:04:23.980 --> 00:04:28.120
<v Aaron van Wirdum>And send money there and then somehow I should be able to spend from this address

00:04:28.120 --> 00:04:31.880
<v Aaron van Wirdum>that's kind of where the trick comes in that is like how can I spend money from

00:04:31.880 --> 00:04:34.180
<v Aaron van Wirdum>addresses that you generated Yes. Okay.

00:04:35.740 --> 00:04:39.800
<v Aaron van Wirdum>Ruben, how can I spend money from addresses that you generated?

00:04:40.160 --> 00:04:40.300
<v Ruben Somsen>Sure.

00:04:41.560 --> 00:04:47.500
<v Ruben Somsen>Essentially, what we do is we generate a shared secret. Generating a

00:04:47.500 --> 00:04:50.080
<v Ruben Somsen>shared secret is done by taking two public keys.

00:04:51.300 --> 00:04:56.940
<v Ruben Somsen>You have a public key, I have a public key. Because we both know one private key,

00:04:57.060 --> 00:05:00.940
<v Ruben Somsen>you know your private key, I know my private key, we can do this calculation,

00:05:00.940 --> 00:05:02.280
<v Ruben Somsen>which is basically a multiplication.

00:05:03.520 --> 00:05:08.500
<v Ruben Somsen>That allows us to generate a number that you know and I know, but nobody else

00:05:08.500 --> 00:05:14.450
<v Ruben Somsen>knows. And with this number, we can then generate a key that is sort of shared

00:05:14.450 --> 00:05:19.250
<v Ruben Somsen>between us. So it's a public key. You could set money to that key. But if I were

00:05:19.250 --> 00:05:22.350
<v Ruben Somsen>to set money to that key, both you and I could spend it. So that's not quite good

00:05:22.350 --> 00:05:26.630
<v Ruben Somsen>enough. So we add one more step after we have the shared secret, which we turn

00:05:26.630 --> 00:05:31.730
<v Ruben Somsen>into a shared key. We then add your public key to it. So now it's a combination

00:05:31.730 --> 00:05:37.230
<v Ruben Somsen>of the shared key plus your key. And that combination is something that only you

00:05:37.230 --> 00:05:40.490
<v Ruben Somsen>know, because I don't know your public key. I don't know the private key behind

00:05:40.490 --> 00:05:41.010
<v Ruben Somsen>your public key.

00:05:41.050 --> 00:05:45.770
<v Aaron van Wirdum>Okay, that's a lot of information in one go. So let's break it down.

00:05:45.850 --> 00:05:49.210
<v Sjors Provoost>So what we did was a Diffie-Hellman exchange plus something else.

00:05:49.410 --> 00:05:52.130
<v Aaron van Wirdum>Right, exactly. So, Sjors.

00:05:53.010 --> 00:05:53.450
<v Sjors Provoost>Yes.

00:05:53.930 --> 00:05:58.230
<v Aaron van Wirdum>What is a Diffie-Hellman exchange? That's the first part we can break down here, I think.

00:05:58.370 --> 00:06:00.730
<v Sjors Provoost>So Diffie-Hellman was a famous rapper. No.

00:06:01.770 --> 00:06:02.450
<v Ruben Somsen>I wish.

00:06:02.630 --> 00:06:08.190
<v Sjors Provoost>Basically, the idea, it's being used in browsers too, for example, right?

00:06:08.940 --> 00:06:14.800
<v Sjors Provoost>So when you connect to a website that's secure, they have a public

00:06:14.800 --> 00:06:18.860
<v Sjors Provoost>key. The website essentially has a public key. And you on your computer generate

00:06:18.860 --> 00:06:23.720
<v Sjors Provoost>another public key. And you basically tell the web server, hey, here's my public

00:06:23.720 --> 00:06:27.280
<v Sjors Provoost>key. And then the web server can send you information in secret. And you can send

00:06:27.280 --> 00:06:33.030
<v Sjors Provoost>the web server information to that secret. And so this really uses

00:06:33.030 --> 00:06:38.930
<v Sjors Provoost>a very nice mathematical property, which is that if you take a private key

00:06:38.930 --> 00:06:44.550
<v Sjors Provoost>A and you multiply it by a public key B, that is the same as when you take

00:06:44.550 --> 00:06:47.710
<v Sjors Provoost>public key A times private key B.

00:06:47.890 --> 00:06:48.830
<v Aaron van Wirdum>Yep, right.

00:06:49.090 --> 00:06:52.770
<v Sjors Provoost>So that means that, well, with Bitcoin we have addresses, which is essentially

00:06:52.770 --> 00:06:57.930
<v Sjors Provoost>just a combination of a private key and a public key. So if I know my private

00:06:57.930 --> 00:07:03.790
<v Sjors Provoost>key, obviously, and you know my public key and vice versa, then we can create a

00:07:03.790 --> 00:07:08.230
<v Sjors Provoost>shared, essentially a shared address, a shared Bitcoin address, where we both

00:07:08.230 --> 00:07:14.090
<v Sjors Provoost>would own the shared Bitcoin private key and we both would own the Bitcoin shared

00:07:14.090 --> 00:07:18.610
<v Sjors Provoost>public key. But this would be utterly useless because if either of us sends money

00:07:18.610 --> 00:07:22.630
<v Sjors Provoost>to that, then either of us can steal that money. We don't want that.

00:07:22.930 --> 00:07:23.490
<v Aaron van Wirdum>Yeah, okay.

00:07:24.700 --> 00:07:29.600
<v Aaron van Wirdum>I'm following you, but that's also because before we started recording, I had an

00:07:29.600 --> 00:07:35.380
<v Aaron van Wirdum>hour to try to understand this. So to summarize this real briefly,

00:07:35.640 --> 00:07:40.060
<v Aaron van Wirdum>the Diffie-Hellman exchange, two people have a public and a private key, and then

00:07:40.060 --> 00:07:45.340
<v Aaron van Wirdum>multiplying one public key with the other private key gets a secret number.

00:07:46.060 --> 00:07:51.440
<v Aaron van Wirdum>Right so and because both persons know their own private key and the other

00:07:51.440 --> 00:07:55.120
<v Aaron van Wirdum>person's public key they can both generate this number but no one else can

00:07:55.120 --> 00:07:58.900
<v Aaron van Wirdum>generate this number because no one has either no one else has either private key

00:07:58.900 --> 00:08:04.240
<v Aaron van Wirdum>yeah okay so from this secret number you could potentially create a Bitcoin

00:08:04.240 --> 00:08:09.480
<v Aaron van Wirdum>private you could say that's a Bitcoin private key essentially yeah and have a

00:08:09.480 --> 00:08:14.370
<v Aaron van Wirdum>public key and then So basically what you were just saying, Sjors, is you could

00:08:14.370 --> 00:08:18.570
<v Aaron van Wirdum>use that like if Ruben wants to send me money, he could use that.

00:08:19.870 --> 00:08:25.830
<v Aaron van Wirdum>Well, he couldn't, but he could send me money to that Bitcoin public key.

00:08:26.050 --> 00:08:29.970
<v Aaron van Wirdum>And then we both have the first key. So the problem is then Ruben can just take

00:08:29.970 --> 00:08:34.250
<v Aaron van Wirdum>the money back. I would have been paid, but I wouldn't because Ruben can claim

00:08:34.250 --> 00:08:34.670
<v Aaron van Wirdum>the money back.

00:08:34.690 --> 00:08:35.410
<v Ruben Somsen>It could be a future.

00:08:35.990 --> 00:08:39.710
<v Aaron van Wirdum>So we need to add one more level—level, right?

00:08:39.710 --> 00:08:43.310
<v Ruben Somsen>It's a reversible payment maybe exchanges would like this right they send money

00:08:43.310 --> 00:08:44.970
<v Ruben Somsen>and they can take it back just kidding.

00:08:44.970 --> 00:08:48.170
<v Sjors Provoost>Or you make it a two-step process right where you receive the money on this

00:08:48.170 --> 00:08:51.610
<v Sjors Provoost>common address and then the other side sweeps it away yeah and once it's

00:08:51.610 --> 00:08:55.330
<v Sjors Provoost>confirmed but that would mean two transactions for one but we really don't need

00:08:55.330 --> 00:08:55.770
<v Sjors Provoost>to do that

00:08:55.770 --> 00:09:00.450
<v Aaron van Wirdum>Yeah, so I'm I'm I'm not sure if I just made it more confusing for the listener.

00:09:00.800 --> 00:09:05.160
<v Aaron van Wirdum>This is the way I understood it. So maybe that helps. So like you you could now

00:09:05.160 --> 00:09:09.480
<v Aaron van Wirdum>generate a Bitcoin private key and a public key however if you send money to that

00:09:09.480 --> 00:09:13.080
<v Aaron van Wirdum>that's not secure because you can claim the money back. So there's one extra step

00:09:13.080 --> 00:09:15.420
<v Aaron van Wirdum>that needs to be taken here what's that extra step? Yeah.

00:09:15.420 --> 00:09:21.360
<v Ruben Somsen>Yeah, so the extra step is that we take that shared secret that shared key and we

00:09:21.360 --> 00:09:25.200
<v Ruben Somsen>add the public key of the recipients to that shared key.

00:09:25.200 --> 00:09:30.710
<v Aaron van Wirdum>Right, so this is the same public key that I was sharing publicly the silent

00:09:30.710 --> 00:09:36.490
<v Aaron van Wirdum>payment thing that I had as a donation address, yeah and we now add the

00:09:36.490 --> 00:09:41.270
<v Aaron van Wirdum>shared uh am I no you finish this sentence for me before I say it wrong.

00:09:41.270 --> 00:09:45.430
<v Ruben Somsen>Yeah, you add the shared key to it, right which is a derivative of the shared secret.

00:09:45.430 --> 00:09:50.050
<v Aaron van Wirdum>And in this case when you say adding it to it it's basic it's kind of like

00:09:50.050 --> 00:09:55.550
<v Aaron van Wirdum>creating a two out of two multi-sig yes, except we use cryptographic

00:09:56.890 --> 00:10:01.230
<v Aaron van Wirdum>tricks it's not actually a two of two it looks like a [unclear] but it's sort of…

00:10:02.140 --> 00:10:04.180
<v Aaron van Wirdum>it is kind of like a two of two, right?

00:10:04.340 --> 00:10:09.320
<v Ruben Somsen>You could think of it in that way. But essentially, basically, we're using the

00:10:09.320 --> 00:10:14.340
<v Ruben Somsen>fact that you can use elliptic curve cryptography in a way that is basically like

00:10:14.340 --> 00:10:17.960
<v Ruben Somsen>regular math, where you can take someone's key and you can take someone else's

00:10:17.960 --> 00:10:23.160
<v Ruben Somsen>key and you add them together. And if you do this with the public keys, the

00:10:23.160 --> 00:10:26.780
<v Ruben Somsen>private key is also the addition of one private key with the other private key.

00:10:26.940 --> 00:10:32.600
<v Ruben Somsen>So we have two private keys, essentially. And by adding... By adding those two

00:10:32.600 --> 00:10:37.420
<v Ruben Somsen>together, we generate a key that only you know, because I know one of the private

00:10:37.420 --> 00:10:41.200
<v Ruben Somsen>keys if I were to send a payment to you, but I don't know the other one because

00:10:41.200 --> 00:10:41.780
<v Ruben Somsen>it's your key.

00:10:41.960 --> 00:10:46.380
<v Aaron van Wirdum>Right, so the two private keys that we're adding together, to be very clear, are

00:10:46.380 --> 00:10:51.820
<v Aaron van Wirdum>the shared secret private key that you were able to generate in combination with

00:10:51.820 --> 00:10:57.750
<v Aaron van Wirdum>my public key, and then my actual private key that... corresponds to the public

00:10:57.750 --> 00:11:02.050
<v Aaron van Wirdum>key that I posted. So that's the two that we're adding together to create a new

00:11:02.050 --> 00:11:05.630
<v Aaron van Wirdum>private key and a new public key. Well, I'm the only one who can create the new

00:11:05.630 --> 00:11:09.670
<v Aaron van Wirdum>private key because I'm the only one who has the private key that corresponds

00:11:09.670 --> 00:11:10.490
<v Aaron van Wirdum>with my public.

00:11:11.110 --> 00:11:15.390
<v Sjors Provoost>Maybe I can illustrate it from the other side, which is that if you just

00:11:15.390 --> 00:11:19.630
<v Sjors Provoost>published your stealth address and we don't use it as a silent payment address,

00:11:19.810 --> 00:11:24.550
<v Sjors Provoost>if you just publish an address, then anybody can send to it. It would just be a

00:11:24.550 --> 00:11:28.010
<v Sjors Provoost>regular transaction where you only have the private key and I have the public

00:11:28.010 --> 00:11:32.390
<v Sjors Provoost>key. The downside of that is that everybody can see what's going on. So what if

00:11:32.390 --> 00:11:36.790
<v Sjors Provoost>you just add something to this regular address? So you're adding a shared key to

00:11:36.790 --> 00:11:40.290
<v Sjors Provoost>the regular address, essentially. That might even be an easier way to understand

00:11:40.290 --> 00:11:43.650
<v Sjors Provoost>it. So we just explain how you make the shared key. Then we say we take a regular

00:11:43.650 --> 00:11:47.170
<v Sjors Provoost>address or a regular private key. We just add a shared key to it so that nobody

00:11:47.170 --> 00:11:49.230
<v Sjors Provoost>else in the world can see what's going on.

00:11:50.420 --> 00:11:55.540
<v Aaron van Wirdum>Okay, so you, Ruben, you were going to send money to my donation address. Now

00:11:55.540 --> 00:11:59.540
<v Aaron van Wirdum>we've tried to explain how that works. We've explained how that works. I hope

00:11:59.540 --> 00:12:01.340
<v Aaron van Wirdum>people have been able to follow that.

00:12:01.500 --> 00:12:01.640
<v Ruben Somsen>Yeah.

00:12:01.940 --> 00:12:04.300
<v Aaron van Wirdum>So you're sending money to that address.

00:12:04.480 --> 00:12:04.700
<v Ruben Somsen>Yeah.

00:12:05.230 --> 00:12:11.050
<v Aaron van Wirdum>Now the question is, how do I know that you did that? And how do I actually

00:12:11.050 --> 00:12:16.390
<v Aaron van Wirdum>generate the private key that corresponds to that? Because I need to know about

00:12:16.390 --> 00:12:16.810
<v Aaron van Wirdum>it, right?

00:12:17.130 --> 00:12:20.990
<v Ruben Somsen>Yeah. So the first thing you need is you need to know the key that I used in

00:12:20.990 --> 00:12:25.250
<v Ruben Somsen>order to generate the shared secrets. Because you know your key, obviously. And I

00:12:25.250 --> 00:12:28.470
<v Ruben Somsen>know your key because it was publicly online or your Twitter profile or whatever.

00:12:29.000 --> 00:12:34.340
<v Ruben Somsen>And so the key that I use is one of the keys of the inputs in the transaction

00:12:34.340 --> 00:12:38.400
<v Ruben Somsen>that I create. So if I want to send a payment to you, I create a transaction. The

00:12:38.400 --> 00:12:44.340
<v Ruben Somsen>transaction has inputs. The inputs have a public key corresponding to them. And I

00:12:44.340 --> 00:12:46.660
<v Ruben Somsen>know the private key of those keys.

00:12:46.960 --> 00:12:52.840
<v Aaron van Wirdum>This is just a Bitcoin private key, public key, just a public key that you were

00:12:52.840 --> 00:12:57.140
<v Aaron van Wirdum>using anyways, that has your money on it, right? Okay. Yeah.

00:12:58.100 --> 00:13:02.700
<v Ruben Somsen>So when I create that transaction, I pick my inputs and that is the key that I

00:13:02.700 --> 00:13:07.060
<v Ruben Somsen>use to generate the new address that only you can spend. And that is where I sent

00:13:07.060 --> 00:13:11.570
<v Ruben Somsen>the money. And so the second step, so this is how I make the payment. But the

00:13:11.570 --> 00:13:16.430
<v Ruben Somsen>second step is for you to recognize that I actually did that. And that is sort of

00:13:16.430 --> 00:13:20.690
<v Ruben Somsen>the tricky part and sort of the downside, I would say, of this proposal, which is

00:13:20.690 --> 00:13:24.950
<v Ruben Somsen>that in order for you to recognize that I made a payment, you have to go and

00:13:24.950 --> 00:13:27.970
<v Ruben Somsen>check every transaction that appears on the Bitcoin blockchain. And you have to

00:13:27.970 --> 00:13:32.330
<v Ruben Somsen>go and see if it is a payment to you. And the way you do that is basically the

00:13:32.330 --> 00:13:36.110
<v Ruben Somsen>same way we generated this address. You're also going to generate the address and

00:13:36.110 --> 00:13:41.120
<v Ruben Somsen>you're going to see… So you're going to take the inputs, you're going to generate

00:13:41.120 --> 00:13:45.580
<v Ruben Somsen>the shared secrets, add it to your own key, see if the result is one of the

00:13:45.580 --> 00:13:49.680
<v Ruben Somsen>outputs. And that is how you recognize whether or not you got paid. So it's a lot

00:13:49.680 --> 00:13:54.520
<v Ruben Somsen>of effort, but the effort is all on the recipient side. And if you're running a

00:13:54.520 --> 00:13:57.720
<v Ruben Somsen>full node already, it's relatively not a lot more effort.

00:13:57.940 --> 00:14:02.420
<v Sjors Provoost>So basically every input of every transaction on the blockchain

00:14:02.420 --> 00:14:08.340
<v Sjors Provoost>could be, as a recipient, could be for you. So, yeah. So that means you

00:14:08.340 --> 00:14:11.800
<v Sjors Provoost>have to inspect every single transaction that's on the blockchain. And for every

00:14:11.800 --> 00:14:16.140
<v Sjors Provoost>input of every transaction, you want to add your shared key to it. And then that

00:14:16.140 --> 00:14:20.500
<v Sjors Provoost>generates an address. And you then see, hey, is this transaction actually

00:14:20.500 --> 00:14:26.390
<v Sjors Provoost>spending to that address? If so... boom, you just essentially add that address

00:14:26.390 --> 00:14:31.290
<v Sjors Provoost>to your own wallet, and then it just functions as any other wallet address would function.

00:14:31.470 --> 00:14:37.250
<v Aaron van Wirdum>Well, I guess it's already the case that you need to check every transaction to

00:14:37.250 --> 00:14:42.850
<v Aaron van Wirdum>see if there's an output for you, right? Yes. So the new part is that you have to

00:14:42.850 --> 00:14:47.270
<v Aaron van Wirdum>do some extra calculations to see if the inputs...

00:14:47.630 --> 00:14:51.930
<v Sjors Provoost>But it's definitely a lot of extra work, right? So normally what you do is when

00:14:51.930 --> 00:14:55.130
<v Sjors Provoost>you see a transaction, you only care about the outputs. I mean, you care whether

00:14:55.130 --> 00:14:59.170
<v Sjors Provoost>the transaction is valid at all. That's why you look at the inputs. But... the

00:14:59.170 --> 00:15:02.850
<v Sjors Provoost>outputs, the only thing your wallet needs to do is look at the scriptPubKey of

00:15:02.850 --> 00:15:07.630
<v Sjors Provoost>this output, so basically the destination of the output, and then compare it to

00:15:07.630 --> 00:15:12.090
<v Sjors Provoost>the list of addresses or scriptPubKeys in your own wallet. So that is just

00:15:12.090 --> 00:15:16.790
<v Sjors Provoost>comparing one list to another list. That's very cheap. But in this new scheme,

00:15:16.850 --> 00:15:22.730
<v Sjors Provoost>you need to do basically elliptic curve key multiplication on

00:15:22.730 --> 00:15:27.050
<v Sjors Provoost>every input. And then that gives you an address. So it is significantly more work

00:15:27.050 --> 00:15:28.090
<v Sjors Provoost>than just looking at a list.

00:15:28.450 --> 00:15:34.310
<v Ruben Somsen>Yeah. And to give a sort of approximate idea of like how much work that is,

00:15:34.450 --> 00:15:40.370
<v Ruben Somsen>it is as if you check every signature twice instead of once. That is sort of a

00:15:40.370 --> 00:15:42.290
<v Ruben Somsen>very rough way of saying it.

00:15:43.310 --> 00:15:48.010
<v Sjors Provoost>Yeah, so it definitely increases the time you need to verify blocks. But if you

00:15:48.010 --> 00:15:53.430
<v Sjors Provoost>look at that from the perspective of your node is running, it's already synced,

00:15:53.570 --> 00:15:57.110
<v Sjors Provoost>and it's just running, then one block comes in every 10 minutes, your node will

00:15:57.110 --> 00:16:01.150
<v Sjors Provoost>verify that block in a few seconds. So maybe it'll take half a second longer.

00:16:01.650 --> 00:16:06.570
<v Sjors Provoost>That's fine. The bigger barrier is when you first want to sync the whole node. If

00:16:06.570 --> 00:16:10.070
<v Sjors Provoost>you want to restore from a backup, things get a little bit more hairy. But I

00:16:10.070 --> 00:16:11.090
<v Sjors Provoost>think we can get into that later.

00:16:14.320 --> 00:16:18.380
<v Ruben Somsen>Yeah, that is something actually I would like to get into now, perhaps, because

00:16:18.380 --> 00:16:19.300
<v Ruben Somsen>so there are…

00:16:19.320 --> 00:16:20.300
<v Aaron van Wirdum>Ruben is taking charge.

00:16:21.440 --> 00:16:23.880
<v Ruben Somsen>Well, I think if we do it later, it's going to be more confusing.

00:16:24.900 --> 00:16:26.960
<v Sjors Provoost>It's called Bitcoin Explained now.

00:16:27.740 --> 00:16:32.980
<v Ruben Somsen>Exactly. Yeah. So, There are a couple of things you can do to make this process

00:16:32.980 --> 00:16:37.820
<v Ruben Somsen>faster. And so as Sjors was saying, once you're at the tip and you're validating

00:16:37.820 --> 00:16:41.380
<v Ruben Somsen>and a new block comes in, you just have to validate everything. But one of the

00:16:41.380 --> 00:16:44.180
<v Ruben Somsen>things you can do is there are a couple of things you can do to sort of speed it

00:16:44.180 --> 00:16:49.400
<v Ruben Somsen>up when you resync a node and you have an address and you want to know if there's

00:16:49.400 --> 00:16:53.920
<v Ruben Somsen>any outputs that are yours. So the first thing you can do is simply have a

00:16:53.920 --> 00:16:59.780
<v Ruben Somsen>birthday on your key and say, okay, well, I created this key in, let's say, 2022.

00:17:00.860 --> 00:17:06.740
<v Ruben Somsen>So let's say January 2022. So from January 2022, I go and I

00:17:06.740 --> 00:17:10.180
<v Ruben Somsen>check every block. And before that, I don't even bother. So that's one thing you

00:17:10.180 --> 00:17:16.000
<v Ruben Somsen>can do. Another thing is that this protocol in principle is going

00:17:16.000 --> 00:17:21.960
<v Ruben Somsen>to only create Taproot outputs. So any transaction that doesn't have any Taproot

00:17:21.960 --> 00:17:25.720
<v Ruben Somsen>outputs in them can be ignored. And so you don't have to check those

00:17:25.720 --> 00:17:30.750
<v Ruben Somsen>transactions. Um that is sort of a thing that saves a lot of effort right now

00:17:30.750 --> 00:17:34.870
<v Ruben Somsen>because we don't have a lot of Taproot transactions yet but you know in time

00:17:34.870 --> 00:17:38.430
<v Ruben Somsen>eventually everything is going to be a Taproot transaction at least that's the

00:17:38.430 --> 00:17:42.750
<v Ruben Somsen>hope uh so it's the kind of it's an optimization that helps today but won't help

00:17:42.750 --> 00:17:47.170
<v Ruben Somsen>tomorrow let's say. Yeah. Um and then the biggest one is that instead of

00:17:47.170 --> 00:17:51.810
<v Ruben Somsen>validating every transaction from the entire history what you can actually do is

00:17:51.810 --> 00:17:57.140
<v Ruben Somsen>you can take the UTXO sets and only check those outputs and see if any of those

00:17:57.140 --> 00:18:03.100
<v Ruben Somsen>outputs correspond to a payment that belongs to you. And the downside of this is

00:18:03.100 --> 00:18:08.040
<v Ruben Somsen>that you will have no history, so you won't be able to see any outputs that were

00:18:08.040 --> 00:18:13.950
<v Ruben Somsen>yours and were spent, but you will find all the outputs that were unspent. And it

00:18:13.950 --> 00:18:19.770
<v Ruben Somsen>also requires a bit more of an additional database that ties

00:18:19.770 --> 00:18:25.750
<v Ruben Somsen>the inputs that you might require to do this calculation to the UTXO

00:18:25.750 --> 00:18:31.030
<v Ruben Somsen>and UTXO set. So there's a bit more complexity there, but the benefit there is

00:18:31.030 --> 00:18:35.190
<v Ruben Somsen>that basically instead of scanning the entire history, you can now just take the

00:18:35.190 --> 00:18:39.450
<v Ruben Somsen>UTXO set, scan that, and find every unspent output that belongs to you.

00:18:40.780 --> 00:18:46.660
<v Aaron van Wirdum>Right, yeah. And then you'd need to somehow get the inputs that...

00:18:47.700 --> 00:18:51.040
<v Aaron van Wirdum>That refers to the output. Yeah, okay.

00:18:51.320 --> 00:18:55.780
<v Sjors Provoost>Yeah, so when you look at how a node is actually built, and Bitcoin Core is built

00:18:55.780 --> 00:18:59.820
<v Sjors Provoost>in one way, but maybe libbitcoin is built in a very different way, there are

00:18:59.820 --> 00:19:02.820
<v Sjors Provoost>certain pieces of information that are very easy to access and certain pieces of

00:19:02.820 --> 00:19:06.440
<v Sjors Provoost>information that are a little bit more work to access, and that can really matter

00:19:06.440 --> 00:19:12.060
<v Sjors Provoost>with a proposal like this. Because if the information, for example, is sitting in

00:19:12.060 --> 00:19:16.680
<v Sjors Provoost>your RAM memory, That's very quick to access. If, on the other hand, you need to

00:19:16.680 --> 00:19:21.840
<v Sjors Provoost>go on a disk, it's very slow to access. And you may have a pruned node. A pruned

00:19:21.840 --> 00:19:25.300
<v Sjors Provoost>node throws away all blocks. So if you need any information that is in an old

00:19:25.300 --> 00:19:29.440
<v Sjors Provoost>block, then things get really, really, really slow because either you just can't

00:19:29.440 --> 00:19:32.320
<v Sjors Provoost>get the information or you'd have to download the block again and then get it.

00:19:33.710 --> 00:19:38.150
<v Sjors Provoost>So those details matter. And one of the things that I think need to be done when

00:19:38.150 --> 00:19:41.170
<v Sjors Provoost>you're working on it or you're having other people work on it or you're hoping

00:19:41.170 --> 00:19:42.090
<v Sjors Provoost>other people work on it…

00:19:42.110 --> 00:19:43.510
<v Ruben Somsen>There is a pseudonym.

00:19:43.870 --> 00:19:44.830
<v Sjors Provoost>Is benchmarking.

00:19:45.070 --> 00:19:45.430
<v Ruben Somsen>Yeah.

00:19:45.570 --> 00:19:48.790
<v Sjors Provoost>And this benchmarking basically could do things like, okay, we could, you know,

00:19:48.990 --> 00:19:52.590
<v Sjors Provoost>change the proposal and do a little bit more signature verifications or we could

00:19:52.590 --> 00:19:55.390
<v Sjors Provoost>change the proposal in some other way, which means we need to do more disk

00:19:55.390 --> 00:19:58.930
<v Sjors Provoost>reading. And now let's try on the Raspberry Pi, you know, with the real

00:19:58.930 --> 00:20:03.600
<v Sjors Provoost>blockchain, what performs better, what performs worse. Yeah, that sort of stuff.

00:20:03.600 --> 00:20:09.340
<v Aaron van Wirdum>Is this a good time to get into the comparison with the earlier proposals? Yeah.

00:20:09.340 --> 00:20:14.440
<v Aaron van Wirdum>Yeah. Okay, so how does this compare to earlier proposals?

00:20:14.440 --> 00:20:20.240
<v Ruben Somsen>Um, yeah, sure. Um So the the original stealth address proposal

00:20:20.240 --> 00:20:25.940
<v Ruben Somsen>by uh Peter Todd that one um basically it's quite

00:20:25.940 --> 00:20:31.710
<v Ruben Somsen>similar but the thing that was different is that because the scanning requirement

00:20:31.710 --> 00:20:37.510
<v Ruben Somsen>was seen as something that was too much effort. So instead of taking the key from

00:20:37.510 --> 00:20:43.370
<v Ruben Somsen>the input, the idea was that when you generate a payment, you add an OP_RETURN

00:20:43.370 --> 00:20:46.970
<v Ruben Somsen>to it. And in the OP_RETURN, you add a key. And then that is the key that is

00:20:46.970 --> 00:20:50.050
<v Ruben Somsen>being used. And the downside of this...

00:20:50.050 --> 00:20:51.470
<v Aaron van Wirdum>Yeah, so in that case...

00:20:53.990 --> 00:20:59.410
<v Aaron van Wirdum>The sender's key, in your proposal, the sender's key is actually just the Bitcoin

00:20:59.410 --> 00:21:04.270
<v Aaron van Wirdum>key, the one you're using to send money from. In this earlier proposal by Peter

00:21:04.270 --> 00:21:08.530
<v Aaron van Wirdum>Todd, there's sort of a special key that's not the same key as the one that's

00:21:08.530 --> 00:21:12.750
<v Aaron van Wirdum>used to spend money from, right? And that's included in an OP_RETURN, a bit of

00:21:12.750 --> 00:21:14.550
<v Aaron van Wirdum>extra data in the transaction.

00:21:16.120 --> 00:21:21.700
<v Ruben Somsen>Yeah. And so when you do that, obviously, you add more overhead because now you

00:21:21.700 --> 00:21:27.040
<v Ruben Somsen>have an OP_RETURN. And the upside from the recipient side, well, it's sort of a

00:21:27.040 --> 00:21:31.210
<v Ruben Somsen>half upside because one of the upsides is you still have to scan every

00:21:31.210 --> 00:21:33.970
<v Ruben Somsen>transaction, but now you only have to scan every transaction with an OP_RETURN

00:21:33.970 --> 00:21:34.690
<v Ruben Somsen>attached to it.

00:21:34.930 --> 00:21:37.070
<v Sjors Provoost>And you only have to look at that OP_RETURN.

00:21:37.290 --> 00:21:37.530
<v Ruben Somsen>Yes.

00:21:37.810 --> 00:21:40.890
<v Sjors Provoost>It's a lot less math than you need to do in your proposal.

00:21:41.170 --> 00:21:45.870
<v Ruben Somsen>Yeah, and the database lookups and stuff are easier too because you don't have to

00:21:45.870 --> 00:21:51.290
<v Ruben Somsen>kind of go back and find the input. It's right there in one of the outputs. So

00:21:51.290 --> 00:21:56.660
<v Ruben Somsen>it's sort of an in-between solution that never really... got popular and I think

00:21:56.660 --> 00:22:00.100
<v Ruben Somsen>even the BIP itself was never finished, um and I

00:22:00.100 --> 00:22:05.320
<v Aaron van Wirdum>Yeah, yeah I guess one of the downsides is it makes transactions bigger because

00:22:05.320 --> 00:22:09.520
<v Aaron van Wirdum>now you've got to include an OP_RETURN so you know blocks fill up faster if a lot

00:22:09.520 --> 00:22:11.060
<v Aaron van Wirdum>of people do that and fees go up. Yeah.

00:22:11.520 --> 00:22:13.100
<v Sjors Provoost>There's also a privacy downside.

00:22:13.560 --> 00:22:18.360
<v Aaron van Wirdum>Yeah, it's sort of an indicator that it might be a stealth payment, right?

00:22:18.600 --> 00:22:22.520
<v Aaron van Wirdum>[unclear] Even though you're not sure, but if it's an indecipherable OP_RETURN,

00:22:22.660 --> 00:22:23.900
<v Aaron van Wirdum>then that seems kind of likely.

00:22:24.040 --> 00:22:27.200
<v Sjors Provoost>Well, it also means that other people looking at the blockchain can see how many

00:22:27.200 --> 00:22:30.980
<v Sjors Provoost>friends you have. Well, friends, quote unquote. So because the number of

00:22:30.980 --> 00:22:35.410
<v Sjors Provoost>OP_RETURNs to your stealth address… that's publicly known you know people can

00:22:35.410 --> 00:22:39.050
<v Sjors Provoost>take can just count them or is it not? But that's only a BIP 47.

00:22:39.050 --> 00:22:42.310
<v Ruben Somsen>Yeah, yeah, you're you're you're confusing it too now. Yeah, okay, no no, so that

00:22:42.310 --> 00:22:47.150
<v Ruben Somsen>that's not quite true. Um it is sort of a general you see a bunch of transactions

00:22:47.150 --> 00:22:51.530
<v Ruben Somsen>without returns and those are all stealth payments but you don't know who those

00:22:51.530 --> 00:22:55.520
<v Ruben Somsen>payments are going to. And the recipients have to check all those specific

00:22:55.520 --> 00:22:59.460
<v Ruben Somsen>addresses. So it's sort of an in-between solution where you could say it's sort

00:22:59.460 --> 00:23:04.420
<v Ruben Somsen>of like my proposal, but instead there's a tag that says, okay, this is a stealth

00:23:04.420 --> 00:23:05.160
<v Ruben Somsen>payment, right?

00:23:05.660 --> 00:23:07.440
<v Aaron van Wirdum>Well, this might be a stealth payment.

00:23:07.540 --> 00:23:11.000
<v Ruben Somsen>Yeah. Well, I think it's quite obvious, unfortunately.

00:23:11.300 --> 00:23:14.720
<v Sjors Provoost>Okay, so the OP_RETURN is only indicating that it's a stealth payment and then

00:23:14.720 --> 00:23:17.000
<v Sjors Provoost>after the OP_RETURN is the shared key?

00:23:17.180 --> 00:23:17.480
<v Ruben Somsen>Yes.

00:23:17.740 --> 00:23:22.300
<v Sjors Provoost>Okay. So in that case, you could probably do that with just... combining

00:23:22.300 --> 00:23:28.120
<v Sjors Provoost>signatures, and then you're pretty much back to your proposal, right? Instead

00:23:28.120 --> 00:23:32.620
<v Sjors Provoost>of using OP_RETURN, you would just basically use some sort of added, I don't

00:23:32.620 --> 00:23:35.320
<v Sjors Provoost>know, added key or tweaked key, and you just have to check every key.

00:23:35.860 --> 00:23:39.880
<v Ruben Somsen>Yeah, yeah, so there's a there's a lot of similarity and I I think the uh the

00:23:39.880 --> 00:23:44.220
<v Ruben Somsen>stealth address proposal also had the suggestion of adding sort of yet another

00:23:44.220 --> 00:23:48.380
<v Ruben Somsen>identifier of saying like okay well instead of checking every OP_RETURN we we

00:23:48.380 --> 00:23:53.000
<v Ruben Somsen>mark it where let's say you know you pick a number between let's say zero and and

00:23:53.000 --> 00:23:58.920
<v Ruben Somsen>64 or something and so my stealth payment is let's say 64

00:23:58.920 --> 00:24:04.060
<v Ruben Somsen>exactly so whenever in the OP_RETURN it says number 64 and then there's a public

00:24:04.060 --> 00:24:09.160
<v Ruben Somsen>key I only check those so it reduces the anonymity set even further but it also

00:24:09.160 --> 00:24:10.600
<v Ruben Somsen>lowers the scanning requirements.

00:24:11.300 --> 00:24:15.980
<v Sjors Provoost>Yeah, exactly. Your proposal is a lot of work, but a stealth transaction will

00:24:15.980 --> 00:24:17.940
<v Sjors Provoost>look exactly the same as any other transaction.

00:24:18.260 --> 00:24:22.100
<v Aaron van Wirdum>Yeah. Okay. And then there's, what is it? BIP 47?

00:24:22.420 --> 00:24:23.020
<v Ruben Somsen>That is correct.

00:24:23.100 --> 00:24:27.660
<v Sjors Provoost>And that uses the concept of a handshake, I would say. So you publish your

00:24:27.660 --> 00:24:31.840
<v Sjors Provoost>stealth address or whatever it is, I think. They use a PayNym as a term?

00:24:32.080 --> 00:24:36.180
<v Ruben Somsen>That is a term that Samourai Wallet uses. And I think Sparrow Wallet has it

00:24:36.180 --> 00:24:39.700
<v Ruben Somsen>implemented as well. But that is, you know, that's just the implementation. In

00:24:39.700 --> 00:24:40.760
<v Ruben Somsen>principle, it's BIP 47.

00:24:41.260 --> 00:24:46.580
<v Sjors Provoost>Yeah. So you publish this potentially public key. And then when you want to send

00:24:46.580 --> 00:24:51.260
<v Sjors Provoost>somebody money using that, you do an announcement transaction first. So you send

00:24:51.260 --> 00:24:55.760
<v Sjors Provoost>somebody a simple, you send around a simple, I think you send a OP_RETURN payment

00:24:55.760 --> 00:24:59.700
<v Sjors Provoost>to that address. Yeah. Something like that that's correct and that all that

00:24:59.700 --> 00:25:04.260
<v Sjors Provoost>OP_RETURN and address and that OP_RETURN then includes some sort of key uh that

00:25:04.260 --> 00:25:08.640
<v Sjors Provoost>the recipient now knows okay I now have a new friend and I need to start

00:25:08.640 --> 00:25:12.720
<v Sjors Provoost>monitoring the following addresses so in this case from one single transaction

00:25:12.720 --> 00:25:17.280
<v Sjors Provoost>you as the recipient can now generate a whole set of addresses that you just

00:25:17.280 --> 00:25:23.020
<v Sjors Provoost>monitor as if you got an xpub yeah right and so that's nice the downside

00:25:23.020 --> 00:25:26.800
<v Sjors Provoost>is in this case of what I said before incorrectly for the other one is now

00:25:26.800 --> 00:25:28.300
<v Sjors Provoost>everybody can see how many friends you have.

00:25:28.720 --> 00:25:28.800
<v Ruben Somsen>Yeah.

00:25:28.980 --> 00:25:32.100
<v Sjors Provoost>Because at this handshake address is going to be a bunch of OP_RETURN

00:25:32.100 --> 00:25:35.060
<v Sjors Provoost>transactions to that address. So you can count, you know,

00:25:36.400 --> 00:25:39.580
<v Sjors Provoost>a maximum of the number of friends you have. I guess somebody could pretend that

00:25:39.580 --> 00:25:40.460
<v Sjors Provoost>they're like five people.

00:25:40.780 --> 00:25:40.980
<v Aaron van Wirdum>Right.

00:25:41.340 --> 00:25:43.380
<v Sjors Provoost>And it adds a little bit of bloat to the blockchain.

00:25:44.270 --> 00:25:49.390
<v Aaron van Wirdum>Yeah, so that seems to be the biggest trade-off. Is that right? So your proposal,

00:25:49.550 --> 00:25:55.470
<v Aaron van Wirdum>Ruben, doesn't add any extra data to the blockchain. And then the trade-off

00:25:55.470 --> 00:25:59.210
<v Aaron van Wirdum>is that the recipient has to do quite a bit of work because it has to check all

00:25:59.210 --> 00:26:04.320
<v Aaron van Wirdum>the transactions. While the other proposals in their own ways, they... add more

00:26:04.320 --> 00:26:08.020
<v Aaron van Wirdum>data to the blockchain but then it is easier after you've done that and then

00:26:08.020 --> 00:26:09.400
<v Aaron van Wirdum>there's more nuances but this is…

00:26:09.400 --> 00:26:12.320
<v Ruben Somsen>Yeah yeah, well, with the stealth addresses there's still a lot of work to do so

00:26:12.320 --> 00:26:15.240
<v Ruben Somsen>I think the stealth [unclear] are sort of just old and outdated and I think you

00:26:15.240 --> 00:26:19.660
<v Ruben Somsen>can just sort of leave those aside but for BIP 47 specifically um yes there is

00:26:19.660 --> 00:26:23.760
<v Ruben Somsen>not the scanning requirement so so what you said is correct uh for BIP 47 but uh

00:26:23.760 --> 00:26:29.280
<v Ruben Somsen>to add a little bit to the downsides um so it is also in you know when you create

00:26:29.280 --> 00:26:34.950
<v Ruben Somsen>this notification transaction you're also spending one of your outputs to create

00:26:34.950 --> 00:26:40.890
<v Ruben Somsen>that notification. And then those outputs that you're using can then not be used

00:26:40.890 --> 00:26:45.030
<v Ruben Somsen>for regular payments if you want to stay anonymous. So it's sort of like you have

00:26:45.030 --> 00:26:50.070
<v Ruben Somsen>to sort of the money that you use to create the notifications need to be kept

00:26:50.070 --> 00:26:55.290
<v Ruben Somsen>completely separate from the money that you use to pay people. And that is in

00:26:55.290 --> 00:26:58.990
<v Ruben Somsen>general very difficult for wallets to implement. And a lot of wallets haven't

00:26:58.990 --> 00:27:02.790
<v Ruben Somsen>implemented this correctly. And so there's a lot of potential there for sort of

00:27:02.790 --> 00:27:04.170
<v Ruben Somsen>privacy leaking, unfortunately.

00:27:04.570 --> 00:27:06.810
<v Sjors Provoost>Right. So you think you have a stealth address, you think you're sending

00:27:06.810 --> 00:27:10.390
<v Sjors Provoost>anonymously, but actually because of that announcement, somebody else could just

00:27:10.390 --> 00:27:14.700
<v Sjors Provoost>still see exactly… both from the sender side, they can just see that the sender

00:27:14.700 --> 00:27:18.360
<v Sjors Provoost>was doing this, but also it means the recipient loses anonymity because if the

00:27:18.360 --> 00:27:23.340
<v Sjors Provoost>sender screw up, you can tell the recipient received this many coins because of

00:27:23.340 --> 00:27:26.260
<v Sjors Provoost>this correlation. So that's a risk.

00:27:26.640 --> 00:27:30.980
<v Ruben Somsen>But one thing that's maybe interesting to note is that in Prague, I had a

00:27:30.980 --> 00:27:35.980
<v Ruben Somsen>discussion with a couple of other developers, namely Martin and Alekos.

00:27:37.040 --> 00:27:42.900
<v Ruben Somsen>And we have thought of an idea to make BIP47 better and make it so that the

00:27:42.900 --> 00:27:46.640
<v Ruben Somsen>notification transaction can be outsourced to someone else. So there's maybe a

00:27:46.640 --> 00:27:51.540
<v Ruben Somsen>way to mitigate that for BIP47. And then the only downside that you are left with

00:27:51.540 --> 00:27:57.160
<v Ruben Somsen>is the fact that it uses additional on-chain space. And other than that,

00:27:57.320 --> 00:28:01.590
<v Ruben Somsen>it functions. So that would uh that would sort of make the comparison a little

00:28:01.590 --> 00:28:07.090
<v Ruben Somsen>bit more favorable uh in in in term in terms of comparing into uh comparing

00:28:07.090 --> 00:28:12.150
<v Ruben Somsen>silent payments with BIP 47 but still there is sort of this uh this difference in

00:28:12.150 --> 00:28:17.970
<v Ruben Somsen>on-chain space usage which is particularly problematic for single payments when

00:28:17.970 --> 00:28:21.790
<v Ruben Somsen>you want to send a one-time donation to someone then you know that overhead of

00:28:21.790 --> 00:28:23.810
<v Ruben Somsen>that notification is is quite significant.

00:28:24.460 --> 00:28:28.980
<v Sjors Provoost>It might be useful also to compare to some other generic schemes to solve the

00:28:28.980 --> 00:28:34.780
<v Sjors Provoost>same problem. So one is that instead of publishing... Well, one is that it

00:28:34.780 --> 00:28:37.680
<v Sjors Provoost>requires a little bit of interaction. Somebody has to send you an email

00:28:37.680 --> 00:28:43.400
<v Sjors Provoost>anonymously and you reply with an xpub and now they can just send whatever they

00:28:43.400 --> 00:28:49.400
<v Sjors Provoost>want to that xpub. That's one thing you can do. You can run a little Tor hidden

00:28:49.400 --> 00:28:54.820
<v Sjors Provoost>service that will just hand out xpubs to anybody who asks. That is a problem with

00:28:54.820 --> 00:28:59.480
<v Sjors Provoost>denial of service and of course you have to run the server. Denial of service

00:28:59.480 --> 00:29:03.410
<v Sjors Provoost>means basically somebody could ask you for an xpub. And then ask you for an xpub

00:29:03.410 --> 00:29:07.330
<v Sjors Provoost>and ask you for an xpub. And then for every time you've given out an xpub, you've

00:29:07.330 --> 00:29:12.090
<v Sjors Provoost>got to monitor like a thousand addresses forever. So that's one thing. Another

00:29:12.090 --> 00:29:16.030
<v Sjors Provoost>obvious thing you can do is use Lightning because with Lightning, you have a

00:29:16.030 --> 00:29:21.030
<v Sjors Provoost>public key and something like a BOLT 12 tattoo once that's finalized

00:29:21.830 --> 00:29:26.530
<v Sjors Provoost>will make it just very easy to receive money, but that puts a bit more burden on

00:29:26.530 --> 00:29:30.270
<v Sjors Provoost>the sender. Definitely not as much burden on the recipient because what you're

00:29:30.270 --> 00:29:33.070
<v Sjors Provoost>proposing doesn't sound more difficult than running a Lightning node.

00:29:33.290 --> 00:29:33.690
<v Ruben Somsen>Yeah.

00:29:33.950 --> 00:29:36.810
<v Sjors Provoost>At least not more resource intense than running a Lightning node.

00:29:37.030 --> 00:29:37.410
<v Aaron van Wirdum>Yeah.

00:29:37.670 --> 00:29:41.800
<v Sjors Provoost>But for the sender, of course, they have to run a Lightning node.

00:29:41.980 --> 00:29:44.600
<v Ruben Somsen>Yeah, it's interactive, essentially, when you use Lightning.

00:29:45.700 --> 00:29:48.780
<v Aaron van Wirdum>Yeah, but Ruben just promoted to the base chain, so...

00:29:52.540 --> 00:29:55.740
<v Aaron van Wirdum>Don't kick him back to Lightning. Let him enjoy stay here.

00:29:56.020 --> 00:30:00.200
<v Sjors Provoost>And on the base chain, you can run a BTCPay Server or something like that.

00:30:00.280 --> 00:30:04.340
<v Sjors Provoost>They'll give out a unique address every time. That's a little bit less of a DDoS problem

00:30:06.010 --> 00:30:06.730
<v Sjors Provoost>than xpubs?

00:30:07.350 --> 00:30:10.390
<v Ruben Somsen>I mean, you still have to give out a new address, right, for BTCPay Server. I

00:30:10.390 --> 00:30:12.730
<v Ruben Somsen>still think it's a problem. I wonder how they solve that problem, actually,

00:30:12.730 --> 00:30:16.510
<v Ruben Somsen>because you have the same issue where if you continually ask for addresses.

00:30:17.010 --> 00:30:20.370
<v Sjors Provoost>Yeah, but an xpub, you know, represents a thousand addresses. So your problem is

00:30:20.370 --> 00:30:23.470
<v Sjors Provoost>a thousand times bigger, but it's the same type of problem.

00:30:23.610 --> 00:30:27.610
<v Ruben Somsen>Yeah, yeah, true. And so just to sort of generalize, I think the sort of the

00:30:27.610 --> 00:30:31.990
<v Ruben Somsen>trade-offs that you're mentioning here is one of interactivity, where with silent

00:30:31.990 --> 00:30:37.020
<v Ruben Somsen>payments, the nice thing is it is just... entirely non-interactive uh but you are

00:30:37.020 --> 00:30:41.520
<v Ruben Somsen>absolutely correct that you know given sort of like the the complexity of what

00:30:41.520 --> 00:30:46.660
<v Ruben Somsen>you said uh it is possible to solve this with interaction and and that is you

00:30:46.660 --> 00:30:49.660
<v Ruben Somsen>know essentially kind of what we started off with with me saying okay well Aaron

00:30:49.660 --> 00:30:52.620
<v Ruben Somsen>just gives me a new address every time I want to send a payment to him uh that

00:30:52.620 --> 00:30:53.080
<v Ruben Somsen>works too.

00:30:54.250 --> 00:30:58.470
<v Aaron van Wirdum>Right, yeah. The whole point is to make this non-interactive. Yeah.

00:30:59.230 --> 00:31:03.210
<v Sjors Provoost>I wanted to mention one cool possibility that I saw somebody bring up on one of

00:31:03.210 --> 00:31:08.170
<v Sjors Provoost>the threads that related to this, which is the idea of using DNS or the

00:31:08.170 --> 00:31:14.170
<v Sjors Provoost>.well-known URL to announce your address. So what you can do is

00:31:14.170 --> 00:31:19.210
<v Sjors Provoost>if you run a web server or you have a provider that does that for you, is you

00:31:19.210 --> 00:31:24.140
<v Sjors Provoost>could say, well, if somebody types in my email address, then the wallet will just

00:31:24.140 --> 00:31:29.180
<v Sjors Provoost>basically know where to look, either in the DNS record or at a specific spot on

00:31:29.180 --> 00:31:34.740
<v Sjors Provoost>the web server, and it will get the key there. So then if you have a very smart

00:31:34.740 --> 00:31:38.640
<v Sjors Provoost>wallet, I could imagine that I just type somebody's email address and it'll see,

00:31:38.760 --> 00:31:40.100
<v Sjors Provoost>oh, is there a...

00:31:41.330 --> 00:31:45.610
<v Sjors Provoost>is there a silent payment ID there? Is there a BOLT 12 invoice there? Is there an

00:31:45.610 --> 00:31:50.070
<v Sjors Provoost>LNURL thing there? I'll just pick one of those three and I'm going to send the

00:31:50.070 --> 00:31:54.390
<v Sjors Provoost>money to it. So from a usage point of view, it's very nice to have these static

00:31:54.390 --> 00:31:54.930
<v Sjors Provoost>identifiers.

00:31:55.450 --> 00:31:57.410
<v Ruben Somsen>Yeah, I see what you mean. Yeah, that's interesting.

00:31:58.030 --> 00:32:02.750
<v Sjors Provoost>And I also have a downside, but that might be solvable. And that is what I would

00:32:02.750 --> 00:32:04.350
<v Sjors Provoost>call the Hotel California problem.

00:32:05.280 --> 00:32:05.660
<v Ruben Somsen>Okay.

00:32:06.520 --> 00:32:10.870
<v Sjors Provoost>Because... Basically, once you've given out this thing, people can keep paying to

00:32:10.870 --> 00:32:14.550
<v Sjors Provoost>it forever. And at some point, you might realize, ah, running this extra thing on

00:32:14.550 --> 00:32:20.190
<v Sjors Provoost>my node is pretty heavy. I'd like to downgrade. I'd like to stop using this. And

00:32:20.190 --> 00:32:24.030
<v Sjors Provoost>I think that can be solved by just putting an expiration date into them. Like

00:32:24.030 --> 00:32:28.630
<v Sjors Provoost>saying, okay, don't send coins to me after this block height. That would just be

00:32:28.630 --> 00:32:32.150
<v Sjors Provoost>part of the standard. And then you scan a few hundred thousand, or you scan like

00:32:32.150 --> 00:32:36.310
<v Sjors Provoost>10,000 blocks extra just to be sure. But you definitely want to make sure that

00:32:36.310 --> 00:32:39.550
<v Sjors Provoost>people can opt out of this stuff. Because with BOLT 12, that's not a problem,

00:32:39.630 --> 00:32:43.450
<v Sjors Provoost>right? With Lightning, you still have to ask an invoice. And if the server

00:32:43.450 --> 00:32:46.790
<v Sjors Provoost>doesn't respond, you don't send money to it. But with this, if somebody sends you

00:32:46.790 --> 00:32:51.310
<v Sjors Provoost>money 50 years from now, your descendants will have to scan the whole blockchain.

00:32:52.060 --> 00:32:56.280
<v Ruben Somsen>That is a good point and something I hadn't really thought about, but I agree

00:32:56.280 --> 00:33:02.100
<v Ruben Somsen>that it would be nice to support maybe a date at which you stop, well,

00:33:02.140 --> 00:33:06.980
<v Ruben Somsen>either you stop using the address or you have to refresh the address as to say

00:33:06.980 --> 00:33:08.780
<v Ruben Somsen>like, okay, well now I'm going to accept it for longer.

00:33:08.960 --> 00:33:14.400
<v Sjors Provoost>So that's when you combine it with this DNS server system, your wallet would just

00:33:14.400 --> 00:33:18.780
<v Sjors Provoost>ask again and you could have very short expiration dates even on them, but that's

00:33:18.780 --> 00:33:22.150
<v Sjors Provoost>not necessarily the case but you could you could use the same payment code again

00:33:22.150 --> 00:33:25.250
<v Sjors Provoost>you could just say like okay I'm only going to guarantee this thing for like a

00:33:25.250 --> 00:33:30.110
<v Sjors Provoost>week and then if you ask again next week I'll say okay no don't worry you can use

00:33:30.110 --> 00:33:34.340
<v Sjors Provoost>the same key it's going to be valid for another week yeah something like that. I

00:33:34.340 --> 00:33:37.740
<v Sjors Provoost>mean, I have a whole bunch of implementation stuff, but I don't think we have to get there.

00:33:38.200 --> 00:33:39.040
<v Ruben Somsen>That's interesting, though.

00:33:39.960 --> 00:33:41.540
<v Aaron van Wirdum>How long have we been recording?

00:33:42.520 --> 00:33:43.600
<v Sjors Provoost>33 minutes.

00:33:43.840 --> 00:33:47.440
<v Aaron van Wirdum>How deep are we into this stuff? Because there's a lot more in the show notes, or

00:33:47.440 --> 00:33:51.260
<v Aaron van Wirdum>at least there's some more in the show notes. Do we want to get into that?

00:33:51.660 --> 00:33:53.660
<v Sjors Provoost>I've covered everything I wanted to cover, but...

00:33:53.660 --> 00:33:55.280
<v Ruben Somsen>Yeah, I guess the one thing...

00:33:55.280 --> 00:33:57.160
<v Aaron van Wirdum>Well, go on, Ruben.

00:33:57.390 --> 00:34:02.790
<v Ruben Somsen>Yeah, just one thing I wanted to mention maybe is that I think what's good to

00:34:02.790 --> 00:34:08.550
<v Ruben Somsen>point out here is that the scanning downside really is mainly a downside if

00:34:08.550 --> 00:34:12.810
<v Ruben Somsen>you're not running a full node. If you're running a full node, the way I look at

00:34:12.810 --> 00:34:17.930
<v Ruben Somsen>it is that, well, we still have to kind of get these benchmarks. And so as Sjors

00:34:17.930 --> 00:34:23.590
<v Ruben Somsen>already mentioned, there's a pseudonym called the W0XLT, who I'm trying to

00:34:23.590 --> 00:34:27.860
<v Ruben Somsen>sort of collaborate with a little bit now uh in order to uh sort of get these

00:34:27.860 --> 00:34:31.760
<v Ruben Somsen>benchmarks and he's already created an implementation and once we have those we

00:34:31.760 --> 00:34:35.640
<v Ruben Somsen>can get a better idea but like my my feeling is that we can get it down to a

00:34:35.640 --> 00:34:39.960
<v Ruben Somsen>level where if you're running a full node and you're at you're doing this

00:34:39.960 --> 00:34:45.760
<v Ruben Somsen>additional computation to receive these these silent payments it is not a lot of

00:34:45.760 --> 00:34:51.400
<v Ruben Somsen>extra overhead um so from that perspective I think you could say that sort of the

00:34:51.400 --> 00:34:55.500
<v Ruben Somsen>overhead is practically zero if you're already running a full node And then for

00:34:55.500 --> 00:34:59.960
<v Ruben Somsen>light clients, the problem is that even though like many of the light clients,

00:35:00.080 --> 00:35:05.540
<v Ruben Somsen>most of the light clients we have today, they share an xpub with

00:35:05.540 --> 00:35:09.620
<v Ruben Somsen>whatever server is running the light client for them. And if you give out your

00:35:09.620 --> 00:35:14.200
<v Ruben Somsen>xpub to a server, you lose all your privacy. So it's actually very difficult to

00:35:14.200 --> 00:35:17.960
<v Ruben Somsen>have a light client and have privacy at the same time. It's not impossible. We

00:35:17.960 --> 00:35:23.800
<v Ruben Somsen>have BIP 157 and 158. Uh that is uh compact

00:35:23.800 --> 00:35:28.220
<v Ruben Somsen>block filters so you could have sort of a light client that uh preserves your

00:35:28.220 --> 00:35:32.360
<v Ruben Somsen>private privacy better but as far as I Wasabi it's maybe Wasabi wallets and I'm

00:35:32.360 --> 00:35:36.020
<v Ruben Somsen>not even sure some Lightning wallets maybe use it but other than that most

00:35:36.020 --> 00:35:40.220
<v Ruben Somsen>wallets don't really do that today so my argument there is sort of that if you

00:35:40.220 --> 00:35:43.440
<v Ruben Somsen>care about privacy you already sort of have to run a full node

00:35:44.320 --> 00:35:49.260
<v Aaron van Wirdum>And so you mentioned there's a pseudonym working on this. So how concrete is

00:35:49.260 --> 00:35:52.220
<v Aaron van Wirdum>this? When am I going to be able to use this?

00:35:52.720 --> 00:35:54.860
<v Sjors Provoost>Well, I did run the demo today on signet.

00:35:55.060 --> 00:35:56.000
<v Ruben Somsen>Cool, talk about it.

00:35:56.180 --> 00:36:00.880
<v Sjors Provoost>So that was fun. Yeah, so the pseudonym you talked about, let's call him Ox.

00:36:01.200 --> 00:36:02.240
<v Ruben Somsen>Ox, yeah, it's easier.

00:36:04.460 --> 00:36:08.980
<v Sjors Provoost>Created a pull request on Bitcoin Core that is like really marked as like this is

00:36:08.980 --> 00:36:12.600
<v Sjors Provoost>just a proof of concept. Don't merge this. Don't even use this with real coins, right?

00:36:12.720 --> 00:36:12.800
<v Ruben Somsen>Yeah.

00:36:14.250 --> 00:36:18.350
<v Sjors Provoost>And it allows you to create a wallet that can receive silent payments and it

00:36:18.350 --> 00:36:24.350
<v Sjors Provoost>allows you to use any wallet really to send silent payments. And, you know, it

00:36:24.350 --> 00:36:29.750
<v Sjors Provoost>requires a little bit of manual stuff. But it worked. I mean, at least it seemed

00:36:29.750 --> 00:36:32.390
<v Sjors Provoost>to work. I haven't checked if the math actually worked. If somebody steals my

00:36:32.390 --> 00:36:35.790
<v Sjors Provoost>signet coins, I don't care for real coins. I want to be a little bit more sure

00:36:35.790 --> 00:36:39.490
<v Sjors Provoost>that this is right. I have some remarks in mind that I'll probably post before

00:36:39.490 --> 00:36:40.170
<v Sjors Provoost>the show comes out.

00:36:40.310 --> 00:36:40.590
<v Ruben Somsen>Excellent.

00:36:41.130 --> 00:36:46.190
<v Sjors Provoost>I mean, there are different approaches to get a new proposal like this done,

00:36:46.310 --> 00:36:50.350
<v Sjors Provoost>right? And I would congratulate you. I think this is the first time or the

00:36:50.350 --> 00:36:54.230
<v Sjors Provoost>fastest ever that you've gone from proposing something really complicated to

00:36:54.230 --> 00:36:58.790
<v Sjors Provoost>something that actually demos the concept. And I personally, I like running code

00:36:58.790 --> 00:37:04.640
<v Sjors Provoost>to understand something better. And then when I looked at it... Like this

00:37:04.640 --> 00:37:08.140
<v Sjors Provoost>approach of changing Bitcoin Core to support it is one approach. Another approach

00:37:08.140 --> 00:37:12.580
<v Sjors Provoost>could be something like what Spectre Wallet does is you create a tool that people

00:37:12.580 --> 00:37:17.200
<v Sjors Provoost>download or install that is separate from Bitcoin Core, but that uses Bitcoin

00:37:17.200 --> 00:37:23.200
<v Sjors Provoost>Core wherever it's useful. And so I looked at both possibilities and both are not

00:37:23.200 --> 00:37:24.440
<v Sjors Provoost>trivial in this case.

00:37:25.920 --> 00:37:29.580
<v Sjors Provoost>For details, I don't think we necessarily have to go into. Agreed. But this

00:37:29.580 --> 00:37:33.460
<v Sjors Provoost>proposal, I don't think this pull request will ever, well, will not get merged in

00:37:33.460 --> 00:37:33.960
<v Sjors Provoost>the short run.

00:37:34.060 --> 00:37:34.200
<v Ruben Somsen>Yeah.

00:37:34.500 --> 00:37:35.960
<v Sjors Provoost>Even if he improves everything.

00:37:36.200 --> 00:37:37.000
<v Aaron van Wirdum>Not in Bitcoin Core.

00:37:37.200 --> 00:37:41.420
<v Sjors Provoost>No. And a couple of reasons for that is because it essentially requires another

00:37:41.420 --> 00:37:46.960
<v Sjors Provoost>index, which takes up space. And it is, you know, like you said, it's maybe not

00:37:46.960 --> 00:37:52.120
<v Sjors Provoost>the worst extra performance downside, but it's still pretty significant. You

00:37:52.120 --> 00:37:52.980
<v Sjors Provoost>know, it still adds.

00:37:54.200 --> 00:37:58.580
<v Sjors Provoost>I think Bitcoin Core would not very quickly commit to a feature that it has to

00:37:58.580 --> 00:38:04.240
<v Sjors Provoost>maintain forever that really eats a lot of resources and may screw with other

00:38:04.240 --> 00:38:08.680
<v Sjors Provoost>proposals that might enhance scaling. Like how does this combine with AssumeUTXO

00:38:08.680 --> 00:38:14.180
<v Sjors Provoost>or how does this combine with Utreexo? So that's why I think it's better to go

00:38:14.180 --> 00:38:18.340
<v Sjors Provoost>for a separate tool. On the other hand, any demo that works, I'm happy with it. I

00:38:18.340 --> 00:38:21.940
<v Sjors Provoost>don't really care how it's done, whether... whether the demo is a modified

00:38:21.940 --> 00:38:26.500
<v Sjors Provoost>version of Bitcoin Core or a little Python script. I don't think it matters as

00:38:26.500 --> 00:38:30.440
<v Sjors Provoost>long as people play with the demo because standards will get much better when

00:38:30.440 --> 00:38:31.600
<v Sjors Provoost>people actually try them.

00:38:33.110 --> 00:38:38.320
<v Sjors Provoost>Otherwise, you get things like BIP32 and... Like, oh, gap limits. Yeah, I guess

00:38:38.320 --> 00:38:43.860
<v Sjors Provoost>we should have thought about that before we defined the standard. So yeah, I'm

00:38:43.860 --> 00:38:47.340
<v Sjors Provoost>happy to see that. I just would want to caution the listener and it's probably

00:38:47.340 --> 00:38:47.980
<v Sjors Provoost>going to take a while.

00:38:48.260 --> 00:38:49.460
<v Ruben Somsen>Yeah, I agree with that.

00:38:49.920 --> 00:38:53.480
<v Sjors Provoost>Because I guess I should explain the other side of it. If you make a separate

00:38:53.480 --> 00:38:57.720
<v Sjors Provoost>tool, now you're no longer a first-class citizen of Bitcoin Core. So you have to

00:38:57.720 --> 00:39:00.860
<v Sjors Provoost>communicate through Bitcoin Core through the RPC and it has very limited

00:39:00.860 --> 00:39:05.090
<v Sjors Provoost>features, very limited things you can do. And one of the things you may want to

00:39:05.090 --> 00:39:09.130
<v Sjors Provoost>do is very tightly integrate with block validation. So when a block comes in, you

00:39:09.130 --> 00:39:12.530
<v Sjors Provoost>want to do some processing specifically for the wallet. You can't do that right

00:39:12.530 --> 00:39:16.510
<v Sjors Provoost>now with Bitcoin RPC. So yeah, it's tricky.

00:39:16.830 --> 00:39:20.970
<v Ruben Somsen>Yeah, there's some complexity there. But yeah, at a high level, I agree with you.

00:39:21.110 --> 00:39:25.810
<v Ruben Somsen>And so one of the things that sort of... tricky for me is that actually um

00:39:25.810 --> 00:39:30.430
<v Ruben Somsen>spacechains is sort of the project that I'm currently focused on and now this the

00:39:30.430 --> 00:39:33.650
<v Ruben Somsen>silent payment thing it was supposed to be sort of a side project where I thought

00:39:33.650 --> 00:39:37.830
<v Ruben Somsen>like okay I'm just gonna put this out on a you know in a gist and then I'm done

00:39:37.830 --> 00:39:43.070
<v Ruben Somsen>with it and then you know people start running with it and and this Ox guy he

00:39:43.070 --> 00:39:47.950
<v Ruben Somsen>implements it and now I'm like okay I gotta you know put some uh some effort into

00:39:47.950 --> 00:39:51.070
<v Ruben Somsen>this as well now so I'm being pulled into multiple directions but it's a good

00:39:51.070 --> 00:39:53.110
<v Ruben Somsen>thing because it's it's a success story I guess.

00:39:53.290 --> 00:39:56.390
<v Aaron van Wirdum>Yeah. I mean, spacechains is literally a side project, right?

00:39:57.070 --> 00:39:58.650
<v Ruben Somsen>It's a side chain project. Yes.

00:39:59.450 --> 00:40:00.610
<v Aaron van Wirdum>That's the pun of the week.

00:40:01.730 --> 00:40:02.250
<v Ruben Somsen>All right.

00:40:02.350 --> 00:40:07.810
<v Sjors Provoost>It's a good pun. I have another pun on the GitHub comment, but it's not for here.

00:40:08.450 --> 00:40:11.110
<v Ruben Somsen>All right. Well, I'll look forward to hearing that offline then.

00:40:11.190 --> 00:40:12.910
<v Aaron van Wirdum>I cannot wait, Sjors, to read that.

00:40:13.310 --> 00:40:16.590
<v Sjors Provoost>It's going to be amazing. Okay. I think that covers everything.

00:40:16.870 --> 00:40:16.990
<v Ruben Somsen>Yeah.

00:40:17.130 --> 00:40:18.510
<v Sjors Provoost>Is there anything, Aaron?

00:40:18.750 --> 00:40:21.370
<v Ruben Somsen>I think there's something you wanted to bring up still, or am I mistaken here?

00:40:22.280 --> 00:40:27.080
<v Aaron van Wirdum>I mean, I was going to ask about CoinJoin.

00:40:27.560 --> 00:40:28.500
<v Ruben Somsen>Oh, yes, of course.

00:40:28.540 --> 00:40:32.840
<v Aaron van Wirdum>That seems like opening up another can of worms. I don't know if we want to go there.

00:40:32.980 --> 00:40:33.420
<v Ruben Somsen>That is true.

00:40:34.420 --> 00:40:40.060
<v Aaron van Wirdum>Now that I've brought it up, we can't really ignore it completely. Do you want to

00:40:40.060 --> 00:40:41.500
<v Aaron van Wirdum>summarize this in like a minute?

00:40:41.720 --> 00:40:43.180
<v Sjors Provoost>I think we should briefly look at the worms.

00:40:43.700 --> 00:40:48.100
<v Ruben Somsen>Yeah, I agree. Now, that's actually a good one to point out. So I think this is

00:40:48.100 --> 00:40:52.860
<v Ruben Somsen>one of these things that I feel most uncomfortable with in terms of... like

00:40:52.860 --> 00:40:56.540
<v Ruben Somsen>because what you ideally what you want to do is you want this protocol to not get

00:40:56.540 --> 00:41:01.660
<v Ruben Somsen>in in the way of how people do transactions and so far the way we've described it

00:41:01.660 --> 00:41:06.200
<v Ruben Somsen>it sort of works really well if there is one sender if I create the transaction

00:41:06.200 --> 00:41:11.500
<v Ruben Somsen>but what if we wanted to create a transaction as a CoinJoin where we have

00:41:11.500 --> 00:41:17.250
<v Ruben Somsen>multiple people adding their inputs um and so So the first issue is

00:41:17.250 --> 00:41:19.770
<v Ruben Somsen>that you sort of have two variants of...

00:41:19.770 --> 00:41:21.810
<v Sjors Provoost>And then one of the recipients is a stealth address.

00:41:22.680 --> 00:41:27.600
<v Ruben Somsen>Yeah, exactly. Yes. Yes. That's good. Good to add. Yeah. Thank you. So the first

00:41:27.600 --> 00:41:30.620
<v Ruben Somsen>issue is sort of that you have, you have two variants that you could, could do

00:41:30.620 --> 00:41:33.700
<v Ruben Somsen>for a silent payments. Well, there are more variants, but these are the two sort

00:41:33.700 --> 00:41:38.860
<v Ruben Somsen>of main ones, which is either you pick one, one input and you use that to

00:41:38.860 --> 00:41:43.480
<v Ruben Somsen>generate the shared secrets, or you pick the combination of all the inputs. And

00:41:43.480 --> 00:41:48.320
<v Ruben Somsen>this is particularly relevant with CoinJoins, because if you pick just one input,

00:41:49.090 --> 00:41:52.850
<v Ruben Somsen>then what that means is that if someone pays you in a CoinJoin, then the

00:41:52.850 --> 00:41:56.310
<v Ruben Somsen>recipient normally doesn't know what your input was. So that's actually very good

00:41:56.310 --> 00:42:02.250
<v Ruben Somsen>for privacy. But if you use the silent payments, now if it's just with

00:42:02.250 --> 00:42:06.970
<v Ruben Somsen>a single input, you can see which input was paying you. And so that leaks some

00:42:06.970 --> 00:42:08.450
<v Ruben Somsen>privacy for the sender.

00:42:08.730 --> 00:42:12.890
<v Aaron van Wirdum>Yeah, you can see which input pays you because that's the one that adds up to

00:42:12.890 --> 00:42:16.650
<v Aaron van Wirdum>your new address. Exactly. There's only one input that matches your new address. Yes.

00:42:16.870 --> 00:42:21.920
<v Ruben Somsen>And so that's solvable by saying, okay, well, we pick all the inputs instead. And

00:42:21.920 --> 00:42:25.300
<v Ruben Somsen>we add those inputs together and we use that to generate the shared secret. But

00:42:25.300 --> 00:42:29.540
<v Ruben Somsen>once you do that, you need the collaboration of all the CoinJoin participants.

00:42:29.860 --> 00:42:33.720
<v Ruben Somsen>And in fact, you need them to generate a shared secret. And you also don't want

00:42:33.720 --> 00:42:38.780
<v Ruben Somsen>them to know who you are paying. So you need to get them to give you their shared

00:42:38.780 --> 00:42:42.800
<v Ruben Somsen>secret in a way that they don't know what they're giving to you. And there's a

00:42:42.800 --> 00:42:47.420
<v Ruben Somsen>protocol for that too, which is basically a blind way of doing a Diffie-Hellman,

00:42:47.600 --> 00:42:53.190
<v Ruben Somsen>which is also used in e-cash. Long story short, a lot of complexity.

00:42:53.390 --> 00:42:53.850
<v Aaron van Wirdum>A lot of worms.

00:42:54.090 --> 00:42:57.890
<v Sjors Provoost>Yeah, and you're actually making the single— the simple case, you're making that

00:42:57.890 --> 00:43:01.370
<v Sjors Provoost>more complicated by aggregating the signatures because normally when I use a

00:43:01.370 --> 00:43:06.680
<v Sjors Provoost>wallet to make the silent payment, I just need to pick one coin, one input. And

00:43:06.680 --> 00:43:10.620
<v Sjors Provoost>then if the wallet needs to, it can just add more inputs to that transaction and

00:43:10.620 --> 00:43:15.840
<v Sjors Provoost>it will still work. But if you want to have all the inputs count towards the

00:43:15.840 --> 00:43:19.760
<v Sjors Provoost>shared key, then I need to decide before I have the set destination address, I

00:43:19.760 --> 00:43:23.740
<v Sjors Provoost>need to decide which coins I'm going to use. And so then you have the coin

00:43:23.740 --> 00:43:28.630
<v Sjors Provoost>selection process separate from the payment process and that, at least in Bitcoin

00:43:28.630 --> 00:43:31.830
<v Sjors Provoost>Core, that's going to give you another can of worms that I recommend not opening.

00:43:32.170 --> 00:43:32.310
<v Ruben Somsen>Yeah.

00:43:32.490 --> 00:43:33.430
<v Sjors Provoost>There are solutions to it.

00:43:33.630 --> 00:43:37.470
<v Ruben Somsen>Yeah. Well, the other thing that's sort of nice about adding all the input keys

00:43:37.470 --> 00:43:41.290
<v Ruben Somsen>together and why I sort of gravitate towards that is that it essentially cuts

00:43:41.290 --> 00:43:45.300
<v Ruben Somsen>down the scanning requirement in half. Because now, instead of having to scan

00:43:45.300 --> 00:43:49.900
<v Ruben Somsen>every individual input, you can scan the aggregation of all the inputs. And on

00:43:49.900 --> 00:43:51.560
<v Ruben Somsen>average, the transaction has two inputs.

00:43:51.760 --> 00:43:54.720
<v Sjors Provoost>That's true, but that's where the benchmarking has to come in. Because I would

00:43:54.720 --> 00:44:00.460
<v Sjors Provoost>not be surprised at all whether you look at inputs individually or

00:44:00.460 --> 00:44:04.820
<v Sjors Provoost>you add them up. Most of the work is probably going to be in fetching the

00:44:04.820 --> 00:44:09.090
<v Sjors Provoost>original transactions from some disk somewhere. And then the actual elliptic

00:44:09.090 --> 00:44:12.510
<v Sjors Provoost>curve math is going to be much less than that. Because in general, it takes a

00:44:12.510 --> 00:44:16.010
<v Sjors Provoost>long time to read something from a disk. It takes a very short time to do a

00:44:16.010 --> 00:44:19.730
<v Sjors Provoost>calculation on the CPU. But that could be completely wrong. That's why you want

00:44:19.730 --> 00:44:20.630
<v Sjors Provoost>to benchmark this stuff.

00:44:22.440 --> 00:44:27.380
<v Ruben Somsen>I am sort of I have the same concern in terms of this needs to be benchmarked and

00:44:27.380 --> 00:44:31.800
<v Ruben Somsen>we need to compare it all and quite frankly I I even think that maybe the

00:44:31.800 --> 00:44:36.340
<v Ruben Somsen>UTXO set scanning is overkill too and maybe it's just better to just do the the

00:44:36.340 --> 00:44:42.100
<v Ruben Somsen>entire scanning when you do IBD and maybe that's sufficient um so it's sort of uh

00:44:42.100 --> 00:44:44.900
<v Ruben Somsen>yeah it all comes down to the benchmarks, basically. I agree with that.

00:44:44.900 --> 00:44:50.910
<v Aaron van Wirdum>Cool. Okay. I think that's our episode. Sjors, what do you think?

00:44:51.090 --> 00:44:56.490
<v Sjors Provoost>Sounds good. I'm not going to put this thing as a tattoo on me yet, but I'm going

00:44:56.490 --> 00:44:57.370
<v Sjors Provoost>to keep it in mind.

00:44:59.160 --> 00:45:03.160
<v Sjors Provoost>Yep, I think that's it. So thank you for listening to Bitcoin.

00:45:03.720 --> 00:45:04.200
<v Aaron van Wirdum>Explained.

