In this episode of Bitcoin, Explained, hosts Aaron van Wirdum and Sjors Provoost welcome Ruben Somsen back on the show to talk about a recent proposal of his called “Silent Payments”. Silent Payments resemble earlier ideas like Stealth Addresses and Reusable Payment Codes, in that they allow users to publish a static “address”, while this is not the actual Bitcoin address they will be paid on. Instead, senders of a transaction can use this static address to generate new Bitcoin addresses for the recipient, for which the recipient - and only the recipient - can in turn generate the corresponding private keys. Like Stealth Addresses and Reusable Payment Codes, the benefit of Silent Payments is that addresses can be posted publicly without harming users’ privacy; snoops cannot link the publicly posted address to the actual Bitcoin addresses that the recipient is paid on. Meanwhile, unlike Stealth Addresses and Reusable Payment Codes, Silent Payments do not require any additional blockchain data - though this does come at a computational cost for the recipient. The podcast episode details all this in roughly two parts. In the first half of the episode, Ruben, Aaron and Sjors break down how Silent Payments work, and in the second half of the episode they discuss how Silent Payments compare to Stealth Addresses and Reusable Payment Codes, as well as some potential implementation issues. Chapters 00:00:00 Silent payments and address reuse 00:04:35 Shared secrets and recipient-only spending 00:12:05 Detecting payments by scanning transactions 00:16:14 Faster scanning and wallet recovery 00:20:03 Comparing silent payments with stealth addresses 00:24:18 BIP47 reusable payment codes and privacy trade-offs 00:28:24 Interactive alternatives and static payment identifiers 00:33:57 Full nodes, light clients and the working prototype 00:40:22 CoinJoin compatibility and input aggregation
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
Aaron van WirdumLive from Utrecht, this is Bitcoin.
Sjors ProvoostExplained.
Aaron van WirdumHey, Sjors.
Sjors ProvoostYo.
Aaron van WirdumHey, Ruben.
Ruben SomsenHey.
Aaron van WirdumRuben is back. I think last time in Prague, we were all in Prague last week. And there I introduced you as our resident funky second layer expert.
Ruben SomsenThat is right.
Aaron van WirdumThis week we're going to... talk about one of your new proposals, which is actually not a second layer proposal.
Ruben SomsenTrue.
Aaron van WirdumYou've promoted to the base chain.
Ruben Somsen[unclear] Thank you.
Sjors ProvoostWelcome to the base chain.
Ruben SomsenIt's good to be here. Thank you.
Aaron van WirdumSo yeah, we're going to discuss silent payments.
Ruben SomsenYep.
Aaron van WirdumThis is a proposal you made recently, right?
Ruben SomsenYeah, it's a recent proposal, yeah.
Aaron van WirdumYeah, so you proposed this a couple months ago, but I think the general idea is also older, right? Very old. It's based on an old idea called stealth addresses, I think, originally proposed by Peter Todd years ago.
Ruben SomsenYeah, 2014.
Aaron van WirdumRight. And this is... improvement on that, an iteration on that? How would you describe that?
Ruben SomsenYeah, you could say that. So the interesting thing is that the original proposal, I think the idea is kind of old, but the downside of this version is that you have to do a lot of work, essentially, to recognize that you got paid.
Aaron van WirdumOf your version.
Ruben SomsenYes. And I think in the past, it's not like people didn't think of that, but at the time, it seemed like that was going to be too much work. And Bitcoin has improved a lot over the years. So actually I think sort of like that that thinking never got updated. Uh and now we're at the point where we can do uh these these kind of the verifications of blockchain quite quickly, right and the uh the the library that we use libsecp 25— 20— what— 256k1 Um, that library is very fast
Ruben Somsennow. So basically, it made it more viable than it was back in 2014.
Sjors ProvoostAnd for the loyal listeners, we did an episode about libsecp256k1. I think it's episode two.
Aaron van WirdumReally?
Ruben SomsenOh, wow.
Aaron van WirdumThat's short for you. You'll remember everything. Okay, so we can maybe get into the comparisons later. But for now, what is the general... idea what's the general problem that we're solving?
Ruben SomsenYeah, so kind of a good way of putting it is that generally speaking when you want to make a payment you have two options. Someone can give an address and you can reuse that address and continually pay that person on the same address. And if you do that then you lose all all privacy, because every time you receive a payment I know it's your address and then maybe you know Sjors sent some money to you and I I can see how many bitcoins you have etc etc Um, so because that's a problem generally what we do is let's say Aaron if I want to send you a payment I
Ruben SomsenI tell you I say like hey Aaron I want to send you some Bitcoin could you please give me an address? And you're sure here's here's an address and every time I want to pay you you have to give me that address.
Aaron van WirdumWell I'll generate a new address every time right?
Ruben SomsenThat's what you generate a new one
Aaron van WirdumYeah ideally a fresh one.
Ruben SomsenYeah, and so, This proposal, silent payments, allows you to basically have a single static address and allow me to derive an address from that, that nobody can recognize except for you and me. And so this makes it basically, it makes it the same process, but now it's non-interactive where I don't have to ask you for an address. And that is particularly useful when you think of things like donations, where there's a cause, the cause posts one single address and everybody goes and donates to that
Ruben Somsencause and no interaction is required. So that is basically the proposal.
Aaron van WirdumRight. So if I want to accept donations, then I'll post this. No, it's a stealth address, but you're not calling it a stealth address. You're calling it a silent payment address, right?
Ruben SomsenYes, just to differentiate. But it is essentially a form of stealth address.
Aaron van WirdumSame idea. So I'm posting this quote-unquote address on my website, and then you, Ruben, in this case, can generate new addresses from this?
Ruben SomsenYes.
Aaron van WirdumAnd send money there and then somehow I should be able to spend from this address that's kind of where the trick comes in that is like how can I spend money from addresses that you generated Yes. Okay. Ruben, how can I spend money from addresses that you generated?
Ruben SomsenSure. Essentially, what we do is we generate a shared secret. Generating a shared secret is done by taking two public keys. You have a public key, I have a public key. Because we both know one private key, you know your private key, I know my private key, we can do this calculation, which is basically a multiplication. That allows us to generate a number that you know and I know, but nobody else knows. And with this number, we can then generate a key that is sort of shared
Ruben Somsenbetween us. So it's a public key. You could set money to that key. But if I were to set money to that key, both you and I could spend it. So that's not quite good enough. So we add one more step after we have the shared secret, which we turn into a shared key. We then add your public key to it. So now it's a combination of the shared key plus your key. And that combination is something that only you know, because I don't know your public key. I don't know the private key behind your public key.
Aaron van WirdumOkay, that's a lot of information in one go. So let's break it down.
Sjors ProvoostSo what we did was a Diffie-Hellman exchange plus something else.
Aaron van WirdumRight, exactly. So, Sjors.
Sjors ProvoostYes.
Aaron van WirdumWhat is a Diffie-Hellman exchange? That's the first part we can break down here, I think.
Sjors ProvoostSo Diffie-Hellman was a famous rapper. No.
Ruben SomsenI wish.
Sjors ProvoostBasically, the idea, it's being used in browsers too, for example, right? So when you connect to a website that's secure, they have a public key. The website essentially has a public key. And you on your computer generate another public key. And you basically tell the web server, hey, here's my public key. And then the web server can send you information in secret. And you can send the web server information to that secret. And so this really uses
Sjors Provoosta very nice mathematical property, which is that if you take a private key A and you multiply it by a public key B, that is the same as when you take public key A times private key B.
Aaron van WirdumYep, right.
Sjors ProvoostSo that means that, well, with Bitcoin we have addresses, which is essentially just a combination of a private key and a public key. So if I know my private key, obviously, and you know my public key and vice versa, then we can create a shared, essentially a shared address, a shared Bitcoin address, where we both would own the shared Bitcoin private key and we both would own the Bitcoin shared public key. But this would be utterly useless because if either of us sends money to that, then either of us can steal that money. We don't want that.
Aaron van WirdumYeah, okay. I'm following you, but that's also because before we started recording, I had an hour to try to understand this. So to summarize this real briefly, the Diffie-Hellman exchange, two people have a public and a private key, and then multiplying one public key with the other private key gets a secret number. Right so and because both persons know their own private key and the other person's public key they can both generate this number but no one else can
Aaron van Wirdumgenerate this number because no one has either no one else has either private key yeah okay so from this secret number you could potentially create a Bitcoin private you could say that's a Bitcoin private key essentially yeah and have a public key and then So basically what you were just saying, Sjors, is you could use that like if Ruben wants to send me money, he could use that. Well, he couldn't, but he could send me money to that Bitcoin public key.
Aaron van WirdumAnd then we both have the first key. So the problem is then Ruben can just take the money back. I would have been paid, but I wouldn't because Ruben can claim the money back.
Ruben SomsenIt could be a future.
Aaron van WirdumSo we need to add one more level—level, right?
Ruben SomsenIt's a reversible payment maybe exchanges would like this right they send money and they can take it back just kidding.
Sjors ProvoostOr you make it a two-step process right where you receive the money on this common address and then the other side sweeps it away yeah and once it's confirmed but that would mean two transactions for one but we really don't need to do that
Aaron van WirdumYeah, so I'm I'm I'm not sure if I just made it more confusing for the listener. This is the way I understood it. So maybe that helps. So like you you could now generate a Bitcoin private key and a public key however if you send money to that that's not secure because you can claim the money back. So there's one extra step that needs to be taken here what's that extra step? Yeah.
Ruben SomsenYeah, so the extra step is that we take that shared secret that shared key and we add the public key of the recipients to that shared key.
Aaron van WirdumRight, so this is the same public key that I was sharing publicly the silent payment thing that I had as a donation address, yeah and we now add the shared uh am I no you finish this sentence for me before I say it wrong.
Ruben SomsenYeah, you add the shared key to it, right which is a derivative of the shared secret.
Aaron van WirdumAnd in this case when you say adding it to it it's basic it's kind of like creating a two out of two multi-sig yes, except we use cryptographic tricks it's not actually a two of two it looks like a [unclear] but it's sort of… it is kind of like a two of two, right?
Ruben SomsenYou could think of it in that way. But essentially, basically, we're using the fact that you can use elliptic curve cryptography in a way that is basically like regular math, where you can take someone's key and you can take someone else's key and you add them together. And if you do this with the public keys, the private key is also the addition of one private key with the other private key. So we have two private keys, essentially. And by adding... By adding those two together, we generate a key that only you know, because I know one of the private
Ruben Somsenkeys if I were to send a payment to you, but I don't know the other one because it's your key.
Aaron van WirdumRight, so the two private keys that we're adding together, to be very clear, are the shared secret private key that you were able to generate in combination with my public key, and then my actual private key that... corresponds to the public key that I posted. So that's the two that we're adding together to create a new private key and a new public key. Well, I'm the only one who can create the new private key because I'm the only one who has the private key that corresponds with my public.
Sjors ProvoostMaybe I can illustrate it from the other side, which is that if you just published your stealth address and we don't use it as a silent payment address, if you just publish an address, then anybody can send to it. It would just be a regular transaction where you only have the private key and I have the public key. The downside of that is that everybody can see what's going on. So what if you just add something to this regular address? So you're adding a shared key to the regular address, essentially. That might even be an easier way to understand it. So we just explain how you make the shared key. Then we say we take a regular
Sjors Provoostaddress or a regular private key. We just add a shared key to it so that nobody else in the world can see what's going on.
Aaron van WirdumOkay, so you, Ruben, you were going to send money to my donation address. Now we've tried to explain how that works. We've explained how that works. I hope people have been able to follow that.
Ruben SomsenYeah.
Aaron van WirdumSo you're sending money to that address.
Ruben SomsenYeah.
Aaron van WirdumNow the question is, how do I know that you did that? And how do I actually generate the private key that corresponds to that? Because I need to know about it, right?
Ruben SomsenYeah. So the first thing you need is you need to know the key that I used in order to generate the shared secrets. Because you know your key, obviously. And I know your key because it was publicly online or your Twitter profile or whatever. And so the key that I use is one of the keys of the inputs in the transaction that I create. So if I want to send a payment to you, I create a transaction. The transaction has inputs. The inputs have a public key corresponding to them. And I know the private key of those keys.
Aaron van WirdumThis is just a Bitcoin private key, public key, just a public key that you were using anyways, that has your money on it, right? Okay. Yeah.
Ruben SomsenSo when I create that transaction, I pick my inputs and that is the key that I use to generate the new address that only you can spend. And that is where I sent the money. And so the second step, so this is how I make the payment. But the second step is for you to recognize that I actually did that. And that is sort of the tricky part and sort of the downside, I would say, of this proposal, which is that in order for you to recognize that I made a payment, you have to go and check every transaction that appears on the Bitcoin blockchain. And you have to go and see if it is a payment to you. And the way you do that is basically the
Ruben Somsensame way we generated this address. You're also going to generate the address and you're going to see… So you're going to take the inputs, you're going to generate the shared secrets, add it to your own key, see if the result is one of the outputs. And that is how you recognize whether or not you got paid. So it's a lot of effort, but the effort is all on the recipient side. And if you're running a full node already, it's relatively not a lot more effort.
Sjors ProvoostSo basically every input of every transaction on the blockchain could be, as a recipient, could be for you. So, yeah. So that means you have to inspect every single transaction that's on the blockchain. And for every input of every transaction, you want to add your shared key to it. And then that generates an address. And you then see, hey, is this transaction actually spending to that address? If so... boom, you just essentially add that address to your own wallet, and then it just functions as any other wallet address would function.
Aaron van WirdumWell, I guess it's already the case that you need to check every transaction to see if there's an output for you, right? Yes. So the new part is that you have to do some extra calculations to see if the inputs...
Sjors ProvoostBut it's definitely a lot of extra work, right? So normally what you do is when you see a transaction, you only care about the outputs. I mean, you care whether the transaction is valid at all. That's why you look at the inputs. But... the outputs, the only thing your wallet needs to do is look at the scriptPubKey of this output, so basically the destination of the output, and then compare it to the list of addresses or scriptPubKeys in your own wallet. So that is just comparing one list to another list. That's very cheap. But in this new scheme, you need to do basically elliptic curve key multiplication on
Sjors Provoostevery input. And then that gives you an address. So it is significantly more work than just looking at a list.
Ruben SomsenYeah. And to give a sort of approximate idea of like how much work that is, it is as if you check every signature twice instead of once. That is sort of a very rough way of saying it.
Sjors ProvoostYeah, so it definitely increases the time you need to verify blocks. But if you look at that from the perspective of your node is running, it's already synced, and it's just running, then one block comes in every 10 minutes, your node will verify that block in a few seconds. So maybe it'll take half a second longer. That's fine. The bigger barrier is when you first want to sync the whole node. If you want to restore from a backup, things get a little bit more hairy. But I think we can get into that later.
Ruben SomsenYeah, that is something actually I would like to get into now, perhaps, because so there are…
Aaron van WirdumRuben is taking charge.
Ruben SomsenWell, I think if we do it later, it's going to be more confusing.
Sjors ProvoostIt's called Bitcoin Explained now.
Ruben SomsenExactly. Yeah. So, There are a couple of things you can do to make this process faster. And so as Sjors was saying, once you're at the tip and you're validating and a new block comes in, you just have to validate everything. But one of the things you can do is there are a couple of things you can do to sort of speed it up when you resync a node and you have an address and you want to know if there's any outputs that are yours. So the first thing you can do is simply have a birthday on your key and say, okay, well, I created this key in, let's say, 2022.
Ruben SomsenSo let's say January 2022. So from January 2022, I go and I check every block. And before that, I don't even bother. So that's one thing you can do. Another thing is that this protocol in principle is going to only create Taproot outputs. So any transaction that doesn't have any Taproot outputs in them can be ignored. And so you don't have to check those transactions. Um that is sort of a thing that saves a lot of effort right now because we don't have a lot of Taproot transactions yet but you know in time
Ruben Somseneventually everything is going to be a Taproot transaction at least that's the hope uh so it's the kind of it's an optimization that helps today but won't help tomorrow let's say. Yeah. Um and then the biggest one is that instead of validating every transaction from the entire history what you can actually do is you can take the UTXO sets and only check those outputs and see if any of those outputs correspond to a payment that belongs to you. And the downside of this is that you will have no history, so you won't be able to see any outputs that were
Ruben Somsenyours and were spent, but you will find all the outputs that were unspent. And it also requires a bit more of an additional database that ties the inputs that you might require to do this calculation to the UTXO and UTXO set. So there's a bit more complexity there, but the benefit there is that basically instead of scanning the entire history, you can now just take the UTXO set, scan that, and find every unspent output that belongs to you.
Aaron van WirdumRight, yeah. And then you'd need to somehow get the inputs that... That refers to the output. Yeah, okay.
Sjors ProvoostYeah, so when you look at how a node is actually built, and Bitcoin Core is built in one way, but maybe libbitcoin is built in a very different way, there are certain pieces of information that are very easy to access and certain pieces of information that are a little bit more work to access, and that can really matter with a proposal like this. Because if the information, for example, is sitting in your RAM memory, That's very quick to access. If, on the other hand, you need to go on a disk, it's very slow to access. And you may have a pruned node. A pruned
Sjors Provoostnode throws away all blocks. So if you need any information that is in an old block, then things get really, really, really slow because either you just can't get the information or you'd have to download the block again and then get it. So those details matter. And one of the things that I think need to be done when you're working on it or you're having other people work on it or you're hoping other people work on it…
Ruben SomsenThere is a pseudonym.
Sjors ProvoostIs benchmarking.
Ruben SomsenYeah.
Sjors ProvoostAnd this benchmarking basically could do things like, okay, we could, you know, change the proposal and do a little bit more signature verifications or we could change the proposal in some other way, which means we need to do more disk reading. And now let's try on the Raspberry Pi, you know, with the real blockchain, what performs better, what performs worse. Yeah, that sort of stuff.
Aaron van WirdumIs this a good time to get into the comparison with the earlier proposals? Yeah. Yeah. Okay, so how does this compare to earlier proposals?
Ruben SomsenUm, yeah, sure. Um So the the original stealth address proposal by uh Peter Todd that one um basically it's quite similar but the thing that was different is that because the scanning requirement was seen as something that was too much effort. So instead of taking the key from the input, the idea was that when you generate a payment, you add an OP_RETURN to it. And in the OP_RETURN, you add a key. And then that is the key that is
Ruben Somsenbeing used. And the downside of this...
Aaron van WirdumYeah, so in that case... The sender's key, in your proposal, the sender's key is actually just the Bitcoin key, the one you're using to send money from. In this earlier proposal by Peter Todd, there's sort of a special key that's not the same key as the one that's used to spend money from, right? And that's included in an OP_RETURN, a bit of extra data in the transaction.
Ruben SomsenYeah. And so when you do that, obviously, you add more overhead because now you have an OP_RETURN. And the upside from the recipient side, well, it's sort of a half upside because one of the upsides is you still have to scan every transaction, but now you only have to scan every transaction with an OP_RETURN attached to it.
Sjors ProvoostAnd you only have to look at that OP_RETURN.
Ruben SomsenYes.
Sjors ProvoostIt's a lot less math than you need to do in your proposal.
Ruben SomsenYeah, and the database lookups and stuff are easier too because you don't have to kind of go back and find the input. It's right there in one of the outputs. So it's sort of an in-between solution that never really... got popular and I think even the BIP itself was never finished, um and I
Aaron van WirdumYeah, yeah I guess one of the downsides is it makes transactions bigger because now you've got to include an OP_RETURN so you know blocks fill up faster if a lot of people do that and fees go up. Yeah.
Sjors ProvoostThere's also a privacy downside.
Aaron van WirdumYeah, it's sort of an indicator that it might be a stealth payment, right? [unclear] Even though you're not sure, but if it's an indecipherable OP_RETURN, then that seems kind of likely.
Sjors ProvoostWell, it also means that other people looking at the blockchain can see how many friends you have. Well, friends, quote unquote. So because the number of OP_RETURNs to your stealth address… that's publicly known you know people can take can just count them or is it not? But that's only a BIP 47.
Ruben SomsenYeah, yeah, you're you're you're confusing it too now. Yeah, okay, no no, so that that's not quite true. Um it is sort of a general you see a bunch of transactions without returns and those are all stealth payments but you don't know who those payments are going to. And the recipients have to check all those specific addresses. So it's sort of an in-between solution where you could say it's sort of like my proposal, but instead there's a tag that says, okay, this is a stealth payment, right?
Aaron van WirdumWell, this might be a stealth payment.
Ruben SomsenYeah. Well, I think it's quite obvious, unfortunately.
Sjors ProvoostOkay, so the OP_RETURN is only indicating that it's a stealth payment and then after the OP_RETURN is the shared key?
Ruben SomsenYes.
Sjors ProvoostOkay. So in that case, you could probably do that with just... combining signatures, and then you're pretty much back to your proposal, right? Instead of using OP_RETURN, you would just basically use some sort of added, I don't know, added key or tweaked key, and you just have to check every key.
Ruben SomsenYeah, yeah, so there's a there's a lot of similarity and I I think the uh the stealth address proposal also had the suggestion of adding sort of yet another identifier of saying like okay well instead of checking every OP_RETURN we we mark it where let's say you know you pick a number between let's say zero and and 64 or something and so my stealth payment is let's say 64 exactly so whenever in the OP_RETURN it says number 64 and then there's a public key I only check those so it reduces the anonymity set even further but it also
Ruben Somsenlowers the scanning requirements.
Sjors ProvoostYeah, exactly. Your proposal is a lot of work, but a stealth transaction will look exactly the same as any other transaction.
Aaron van WirdumYeah. Okay. And then there's, what is it? BIP 47?
Ruben SomsenThat is correct.
Sjors ProvoostAnd that uses the concept of a handshake, I would say. So you publish your stealth address or whatever it is, I think. They use a PayNym as a term?
Ruben SomsenThat is a term that Samourai Wallet uses. And I think Sparrow Wallet has it implemented as well. But that is, you know, that's just the implementation. In principle, it's BIP 47.
Sjors ProvoostYeah. So you publish this potentially public key. And then when you want to send somebody money using that, you do an announcement transaction first. So you send somebody a simple, you send around a simple, I think you send a OP_RETURN payment to that address. Yeah. Something like that that's correct and that all that OP_RETURN and address and that OP_RETURN then includes some sort of key uh that the recipient now knows okay I now have a new friend and I need to start monitoring the following addresses so in this case from one single transaction
Sjors Provoostyou as the recipient can now generate a whole set of addresses that you just monitor as if you got an xpub yeah right and so that's nice the downside is in this case of what I said before incorrectly for the other one is now everybody can see how many friends you have.
Ruben SomsenYeah.
Sjors ProvoostBecause at this handshake address is going to be a bunch of OP_RETURN transactions to that address. So you can count, you know, a maximum of the number of friends you have. I guess somebody could pretend that they're like five people.
Aaron van WirdumRight.
Sjors ProvoostAnd it adds a little bit of bloat to the blockchain.
Aaron van WirdumYeah, so that seems to be the biggest trade-off. Is that right? So your proposal, Ruben, doesn't add any extra data to the blockchain. And then the trade-off is that the recipient has to do quite a bit of work because it has to check all the transactions. While the other proposals in their own ways, they... add more data to the blockchain but then it is easier after you've done that and then there's more nuances but this is…
Ruben SomsenYeah yeah, well, with the stealth addresses there's still a lot of work to do so I think the stealth [unclear] are sort of just old and outdated and I think you can just sort of leave those aside but for BIP 47 specifically um yes there is not the scanning requirement so so what you said is correct uh for BIP 47 but uh to add a little bit to the downsides um so it is also in you know when you create this notification transaction you're also spending one of your outputs to create that notification. And then those outputs that you're using can then not be used
Ruben Somsenfor regular payments if you want to stay anonymous. So it's sort of like you have to sort of the money that you use to create the notifications need to be kept completely separate from the money that you use to pay people. And that is in general very difficult for wallets to implement. And a lot of wallets haven't implemented this correctly. And so there's a lot of potential there for sort of privacy leaking, unfortunately.
Sjors ProvoostRight. So you think you have a stealth address, you think you're sending anonymously, but actually because of that announcement, somebody else could just still see exactly… both from the sender side, they can just see that the sender was doing this, but also it means the recipient loses anonymity because if the sender screw up, you can tell the recipient received this many coins because of this correlation. So that's a risk.
Ruben SomsenBut one thing that's maybe interesting to note is that in Prague, I had a discussion with a couple of other developers, namely Martin and Alekos. And we have thought of an idea to make BIP47 better and make it so that the notification transaction can be outsourced to someone else. So there's maybe a way to mitigate that for BIP47. And then the only downside that you are left with is the fact that it uses additional on-chain space. And other than that,
Ruben Somsenit functions. So that would uh that would sort of make the comparison a little bit more favorable uh in in in term in terms of comparing into uh comparing silent payments with BIP 47 but still there is sort of this uh this difference in on-chain space usage which is particularly problematic for single payments when you want to send a one-time donation to someone then you know that overhead of that notification is is quite significant.
Sjors ProvoostIt might be useful also to compare to some other generic schemes to solve the same problem. So one is that instead of publishing... Well, one is that it requires a little bit of interaction. Somebody has to send you an email anonymously and you reply with an xpub and now they can just send whatever they want to that xpub. That's one thing you can do. You can run a little Tor hidden service that will just hand out xpubs to anybody who asks. That is a problem with
Sjors Provoostdenial of service and of course you have to run the server. Denial of service means basically somebody could ask you for an xpub. And then ask you for an xpub and ask you for an xpub. And then for every time you've given out an xpub, you've got to monitor like a thousand addresses forever. So that's one thing. Another obvious thing you can do is use Lightning because with Lightning, you have a public key and something like a BOLT 12 tattoo once that's finalized will make it just very easy to receive money, but that puts a bit more burden on
Sjors Provoostthe sender. Definitely not as much burden on the recipient because what you're proposing doesn't sound more difficult than running a Lightning node.
Ruben SomsenYeah.
Sjors ProvoostAt least not more resource intense than running a Lightning node.
Aaron van WirdumYeah.
Sjors ProvoostBut for the sender, of course, they have to run a Lightning node.
Ruben SomsenYeah, it's interactive, essentially, when you use Lightning.
Aaron van WirdumYeah, but Ruben just promoted to the base chain, so... Don't kick him back to Lightning. Let him enjoy stay here.
Sjors ProvoostAnd on the base chain, you can run a BTCPay Server or something like that. They'll give out a unique address every time. That's a little bit less of a DDoS problem than xpubs?
Ruben SomsenI mean, you still have to give out a new address, right, for BTCPay Server. I still think it's a problem. I wonder how they solve that problem, actually, because you have the same issue where if you continually ask for addresses.
Sjors ProvoostYeah, but an xpub, you know, represents a thousand addresses. So your problem is a thousand times bigger, but it's the same type of problem.
Ruben SomsenYeah, yeah, true. And so just to sort of generalize, I think the sort of the trade-offs that you're mentioning here is one of interactivity, where with silent payments, the nice thing is it is just... entirely non-interactive uh but you are absolutely correct that you know given sort of like the the complexity of what you said uh it is possible to solve this with interaction and and that is you know essentially kind of what we started off with with me saying okay well Aaron just gives me a new address every time I want to send a payment to him uh that works too.
Aaron van WirdumRight, yeah. The whole point is to make this non-interactive. Yeah.
Sjors ProvoostI wanted to mention one cool possibility that I saw somebody bring up on one of the threads that related to this, which is the idea of using DNS or the .well-known URL to announce your address. So what you can do is if you run a web server or you have a provider that does that for you, is you could say, well, if somebody types in my email address, then the wallet will just basically know where to look, either in the DNS record or at a specific spot on the web server, and it will get the key there. So then if you have a very smart
Sjors Provoostwallet, I could imagine that I just type somebody's email address and it'll see, oh, is there a... is there a silent payment ID there? Is there a BOLT 12 invoice there? Is there an LNURL thing there? I'll just pick one of those three and I'm going to send the money to it. So from a usage point of view, it's very nice to have these static identifiers.
Ruben SomsenYeah, I see what you mean. Yeah, that's interesting.
Sjors ProvoostAnd I also have a downside, but that might be solvable. And that is what I would call the Hotel California problem.
Ruben SomsenOkay.
Sjors ProvoostBecause... Basically, once you've given out this thing, people can keep paying to it forever. And at some point, you might realize, ah, running this extra thing on my node is pretty heavy. I'd like to downgrade. I'd like to stop using this. And I think that can be solved by just putting an expiration date into them. Like saying, okay, don't send coins to me after this block height. That would just be part of the standard. And then you scan a few hundred thousand, or you scan like 10,000 blocks extra just to be sure. But you definitely want to make sure that people can opt out of this stuff. Because with BOLT 12, that's not a problem,
Sjors Provoostright? With Lightning, you still have to ask an invoice. And if the server doesn't respond, you don't send money to it. But with this, if somebody sends you money 50 years from now, your descendants will have to scan the whole blockchain.
Ruben SomsenThat is a good point and something I hadn't really thought about, but I agree that it would be nice to support maybe a date at which you stop, well, either you stop using the address or you have to refresh the address as to say like, okay, well now I'm going to accept it for longer.
Sjors ProvoostSo that's when you combine it with this DNS server system, your wallet would just ask again and you could have very short expiration dates even on them, but that's not necessarily the case but you could you could use the same payment code again you could just say like okay I'm only going to guarantee this thing for like a week and then if you ask again next week I'll say okay no don't worry you can use the same key it's going to be valid for another week yeah something like that. I mean, I have a whole bunch of implementation stuff, but I don't think we have to get there.
Ruben SomsenThat's interesting, though.
Aaron van WirdumHow long have we been recording?
Sjors Provoost33 minutes.
Aaron van WirdumHow deep are we into this stuff? Because there's a lot more in the show notes, or at least there's some more in the show notes. Do we want to get into that?
Sjors ProvoostI've covered everything I wanted to cover, but...
Ruben SomsenYeah, I guess the one thing...
Aaron van WirdumWell, go on, Ruben.
Ruben SomsenYeah, just one thing I wanted to mention maybe is that I think what's good to point out here is that the scanning downside really is mainly a downside if you're not running a full node. If you're running a full node, the way I look at it is that, well, we still have to kind of get these benchmarks. And so as Sjors already mentioned, there's a pseudonym called the W0XLT, who I'm trying to sort of collaborate with a little bit now uh in order to uh sort of get these
Ruben Somsenbenchmarks and he's already created an implementation and once we have those we can get a better idea but like my my feeling is that we can get it down to a level where if you're running a full node and you're at you're doing this additional computation to receive these these silent payments it is not a lot of extra overhead um so from that perspective I think you could say that sort of the overhead is practically zero if you're already running a full node And then for light clients, the problem is that even though like many of the light clients,
Ruben Somsenmost of the light clients we have today, they share an xpub with whatever server is running the light client for them. And if you give out your xpub to a server, you lose all your privacy. So it's actually very difficult to have a light client and have privacy at the same time. It's not impossible. We have BIP 157 and 158. Uh that is uh compact block filters so you could have sort of a light client that uh preserves your private privacy better but as far as I Wasabi it's maybe Wasabi wallets and I'm
Ruben Somsennot even sure some Lightning wallets maybe use it but other than that most wallets don't really do that today so my argument there is sort of that if you care about privacy you already sort of have to run a full node
Aaron van WirdumAnd so you mentioned there's a pseudonym working on this. So how concrete is this? When am I going to be able to use this?
Sjors ProvoostWell, I did run the demo today on signet.
Ruben SomsenCool, talk about it.
Sjors ProvoostSo that was fun. Yeah, so the pseudonym you talked about, let's call him Ox.
Ruben SomsenOx, yeah, it's easier.
Sjors ProvoostCreated a pull request on Bitcoin Core that is like really marked as like this is just a proof of concept. Don't merge this. Don't even use this with real coins, right?
Ruben SomsenYeah.
Sjors ProvoostAnd it allows you to create a wallet that can receive silent payments and it allows you to use any wallet really to send silent payments. And, you know, it requires a little bit of manual stuff. But it worked. I mean, at least it seemed to work. I haven't checked if the math actually worked. If somebody steals my signet coins, I don't care for real coins. I want to be a little bit more sure that this is right. I have some remarks in mind that I'll probably post before the show comes out.
Ruben SomsenExcellent.
Sjors ProvoostI mean, there are different approaches to get a new proposal like this done, right? And I would congratulate you. I think this is the first time or the fastest ever that you've gone from proposing something really complicated to something that actually demos the concept. And I personally, I like running code to understand something better. And then when I looked at it... Like this approach of changing Bitcoin Core to support it is one approach. Another approach could be something like what Spectre Wallet does is you create a tool that people
Sjors Provoostdownload or install that is separate from Bitcoin Core, but that uses Bitcoin Core wherever it's useful. And so I looked at both possibilities and both are not trivial in this case. For details, I don't think we necessarily have to go into. Agreed. But this proposal, I don't think this pull request will ever, well, will not get merged in the short run.
Ruben SomsenYeah.
Sjors ProvoostEven if he improves everything.
Aaron van WirdumNot in Bitcoin Core.
Sjors ProvoostNo. And a couple of reasons for that is because it essentially requires another index, which takes up space. And it is, you know, like you said, it's maybe not the worst extra performance downside, but it's still pretty significant. You know, it still adds. I think Bitcoin Core would not very quickly commit to a feature that it has to maintain forever that really eats a lot of resources and may screw with other proposals that might enhance scaling. Like how does this combine with AssumeUTXO
Sjors Provoostor how does this combine with Utreexo? So that's why I think it's better to go for a separate tool. On the other hand, any demo that works, I'm happy with it. I don't really care how it's done, whether... whether the demo is a modified version of Bitcoin Core or a little Python script. I don't think it matters as long as people play with the demo because standards will get much better when people actually try them. Otherwise, you get things like BIP32 and... Like, oh, gap limits. Yeah, I guess we should have thought about that before we defined the standard. So yeah, I'm
Sjors Provoosthappy to see that. I just would want to caution the listener and it's probably going to take a while.
Ruben SomsenYeah, I agree with that.
Sjors ProvoostBecause I guess I should explain the other side of it. If you make a separate tool, now you're no longer a first-class citizen of Bitcoin Core. So you have to communicate through Bitcoin Core through the RPC and it has very limited features, very limited things you can do. And one of the things you may want to do is very tightly integrate with block validation. So when a block comes in, you want to do some processing specifically for the wallet. You can't do that right now with Bitcoin RPC. So yeah, it's tricky.
Ruben SomsenYeah, there's some complexity there. But yeah, at a high level, I agree with you. And so one of the things that sort of... tricky for me is that actually um spacechains is sort of the project that I'm currently focused on and now this the silent payment thing it was supposed to be sort of a side project where I thought like okay I'm just gonna put this out on a you know in a gist and then I'm done with it and then you know people start running with it and and this Ox guy he implements it and now I'm like okay I gotta you know put some uh some effort into
Ruben Somsenthis as well now so I'm being pulled into multiple directions but it's a good thing because it's it's a success story I guess.
Aaron van WirdumYeah. I mean, spacechains is literally a side project, right?
Ruben SomsenIt's a side chain project. Yes.
Aaron van WirdumThat's the pun of the week.
Ruben SomsenAll right.
Sjors ProvoostIt's a good pun. I have another pun on the GitHub comment, but it's not for here.
Ruben SomsenAll right. Well, I'll look forward to hearing that offline then.
Aaron van WirdumI cannot wait, Sjors, to read that.
Sjors ProvoostIt's going to be amazing. Okay. I think that covers everything.
Ruben SomsenYeah.
Sjors ProvoostIs there anything, Aaron?
Ruben SomsenI think there's something you wanted to bring up still, or am I mistaken here?
Aaron van WirdumI mean, I was going to ask about CoinJoin.
Ruben SomsenOh, yes, of course.
Aaron van WirdumThat seems like opening up another can of worms. I don't know if we want to go there.
Ruben SomsenThat is true.
Aaron van WirdumNow that I've brought it up, we can't really ignore it completely. Do you want to summarize this in like a minute?
Sjors ProvoostI think we should briefly look at the worms.
Ruben SomsenYeah, I agree. Now, that's actually a good one to point out. So I think this is one of these things that I feel most uncomfortable with in terms of... like because what you ideally what you want to do is you want this protocol to not get in in the way of how people do transactions and so far the way we've described it it sort of works really well if there is one sender if I create the transaction but what if we wanted to create a transaction as a CoinJoin where we have multiple people adding their inputs um and so So the first issue is
Ruben Somsenthat you sort of have two variants of...
Sjors ProvoostAnd then one of the recipients is a stealth address.
Ruben SomsenYeah, exactly. Yes. Yes. That's good. Good to add. Yeah. Thank you. So the first issue is sort of that you have, you have two variants that you could, could do for a silent payments. Well, there are more variants, but these are the two sort of main ones, which is either you pick one, one input and you use that to generate the shared secrets, or you pick the combination of all the inputs. And this is particularly relevant with CoinJoins, because if you pick just one input, then what that means is that if someone pays you in a CoinJoin, then the
Ruben Somsenrecipient normally doesn't know what your input was. So that's actually very good for privacy. But if you use the silent payments, now if it's just with a single input, you can see which input was paying you. And so that leaks some privacy for the sender.
Aaron van WirdumYeah, you can see which input pays you because that's the one that adds up to your new address. Exactly. There's only one input that matches your new address. Yes.
Ruben SomsenAnd so that's solvable by saying, okay, well, we pick all the inputs instead. And we add those inputs together and we use that to generate the shared secret. But once you do that, you need the collaboration of all the CoinJoin participants. And in fact, you need them to generate a shared secret. And you also don't want them to know who you are paying. So you need to get them to give you their shared secret in a way that they don't know what they're giving to you. And there's a protocol for that too, which is basically a blind way of doing a Diffie-Hellman,
Ruben Somsenwhich is also used in e-cash. Long story short, a lot of complexity.
Aaron van WirdumA lot of worms.
Sjors ProvoostYeah, and you're actually making the single— the simple case, you're making that more complicated by aggregating the signatures because normally when I use a wallet to make the silent payment, I just need to pick one coin, one input. And then if the wallet needs to, it can just add more inputs to that transaction and it will still work. But if you want to have all the inputs count towards the shared key, then I need to decide before I have the set destination address, I need to decide which coins I'm going to use. And so then you have the coin selection process separate from the payment process and that, at least in Bitcoin
Sjors ProvoostCore, that's going to give you another can of worms that I recommend not opening.
Ruben SomsenYeah.
Sjors ProvoostThere are solutions to it.
Ruben SomsenYeah. Well, the other thing that's sort of nice about adding all the input keys together and why I sort of gravitate towards that is that it essentially cuts down the scanning requirement in half. Because now, instead of having to scan every individual input, you can scan the aggregation of all the inputs. And on average, the transaction has two inputs.
Sjors ProvoostThat's true, but that's where the benchmarking has to come in. Because I would not be surprised at all whether you look at inputs individually or you add them up. Most of the work is probably going to be in fetching the original transactions from some disk somewhere. And then the actual elliptic curve math is going to be much less than that. Because in general, it takes a long time to read something from a disk. It takes a very short time to do a calculation on the CPU. But that could be completely wrong. That's why you want to benchmark this stuff.
Ruben SomsenI am sort of I have the same concern in terms of this needs to be benchmarked and we need to compare it all and quite frankly I I even think that maybe the UTXO set scanning is overkill too and maybe it's just better to just do the the entire scanning when you do IBD and maybe that's sufficient um so it's sort of uh yeah it all comes down to the benchmarks, basically. I agree with that.
Aaron van WirdumCool. Okay. I think that's our episode. Sjors, what do you think?
Sjors ProvoostSounds good. I'm not going to put this thing as a tattoo on me yet, but I'm going to keep it in mind. Yep, I think that's it. So thank you for listening to Bitcoin.
Aaron and Sjors discuss Bitcoin Core 32.1 and its updated security disclosure policy in this live conference recording, followed by audience questions. Links Bitcoin Core 32.1 release announcement and release notes...
Aaron and Sjors discuss the COLDCARD hack: the bug itself, how it could have happened, and some reflections on having had Coinkite as a sponsor. Note: If you’re using a COLDCARD and still haven’t moved your funds to a...
The COLDCARD hardware wallet has a critical vulnerability. If you are using the COLDCARD to store bitcoin, move them to a secure location as soon as you can. More information:...
Aaron and Sjors discuss what’s new in Bitcoin Core 31. Chapters 00:00:00 Episode 100 and Core 31 00:02:41 Cluster Mempool 00:10:45 Package Relay and Fee Selection 00:18:59 Private Broadcast over Tor 00:24:03 ASMAP and...