Kalle Rosenbaum [ARCHIVE] on Nostr: π
Original date posted:2015-06-17 π Original message:2015-06-16 21:48 GMT+02:00 ...
π
Original date posted:2015-06-17
π Original message:2015-06-16 21:48 GMT+02:00 Pieter Wuille <pieter.wuille at gmail.com>:
> I don't see why existing software could create a 40-byte OP_RETURN but not
> larger? The limitation comes from a relay policy in full nodes, not a
> limitation is wallet software... and PoPs are not relayed on the network.
You are probably right here. The thing is that I don't know how *all*
wallet signing and validating software is written, so I figure it's
better to stick to a "valid" output. Since I don't *need* more data
than 40 bytes, why bother. There's another constraint to this as well:
The other BIP proposal, "Proof of Payment URI scheme", includes a
nonce parameter in the URI. If the nonce is very long, the QR code
will be unnecessarily big. The server should try to detect a brute
force of the 48 bit nonce, or at least delay the pop requests by some
100 ms or so.
Do you think this is an actual problem, and why? Is your suggestion to
use a bigger nonce, given the above?
>
> Regarding sharing, I think you're talking about a different use case. Say
> you want to pay for 1-week valid entrance to some venue. I thought the
> purpose of the PoP was to be sure that only the person who paid for it, and
> not anyone else can use it during that week.
>
That's right. That's one use case. You pay for the 1-week entrance and
then you use your wallet to sign PoPs when you enter the venue.
> My argument against that is that the original payer can also hand the
> private keys in his wallet to someone else, who would then become able to
> create PoPs for the service. He does not lose anything by this, assuming the
> address is not reused.
>
Yes, that is possible. It's about the same as giving out a
username/password for a service that you have paid for. In the case of
a concert ticket, it's simple. Just allow one entrance per payment.
But in the example you gave, it's a bit more complicated. You could
for example give all guests a bracelet upon first entry or upon first
exit. Or you can put a stamp on people leaving the venue, and demand
that all re-entries show the stamp, possibly along with a new PoP.
Pretty much as is done already. Different use cases will need
different protection. In this example, the value added by PoP is that
the venue does not have to distribute tickets in advance. This in turn
allows for better privacy for the customer, who don't have to give out
personal information such as an email-address.
> So, using a token does not change anything, except it can be provided to the
> payer - instead of relying on creating an implicit identity based on who
> seems to have held particular private keys in the past.
>
Yes, that's a difference, but it comes at the cost of security. The
stolen token can be used over and over. In the case of PoP it's only
usable once, and it's only created when it's actually needed,
minimizing the window of opportunity for the thief.
Regards,
Kalle
> On Jun 16, 2015 9:41 PM, "Kalle Rosenbaum" <kalle at rosenbaum.se> wrote:
>>
>> 2015-06-16 21:25 GMT+02:00 Pieter Wuille <pieter.wuille at gmail.com>:
>> > You can't avoid sharing the token, and you can't avoid sharing the
>> > private
>> > keys used for signing either. If they are single use, you don't lose
>> > anything by sharing them.
>>
>> Forwarding the PoP request would be a way to avoid sharing keys, as
>> suggested above.
>>
>> >
>> > Also you are not creating a real transaction. Why does the OP_RETURN
>> > limitation matter?
>>
>> This was discussed in the beginning of this thread: "The idea is to
>> simplify implementation. Existing software can be used as is to sign
>> and validate PoPs"
>>
>> Regards,
>> Kalle
>>
>> >
>> > On Jun 16, 2015 9:22 PM, "Kalle Rosenbaum" <kalle at rosenbaum.se> wrote:
>> >>
>> >> Thank you for your comments Pieter! Please find my answers below.
>> >>
>> >> 2015-06-16 16:31 GMT+02:00 Pieter Wuille <pieter.wuille at gmail.com>:
>> >> > On Mon, Jun 15, 2015 at 1:59 PM, Kalle Rosenbaum <kalle at rosenbaum.se>
>> >> > wrote:
>> >> >>
>> >> >> 2015-06-15 12:00 GMT+02:00 Pieter Wuille <pieter.wuille at gmail.com>:
>> >> >> I'm not sure if we will be able to support PoP with CoinJoin. Maybe
>> >> >> someone with more insight into CoinJoin have some input?
>> >> >
>> >> >
>> >> > Not really. The problem is that you assume a transaction corresponds
>> >> > to
>> >> > a
>> >> > single payment. This is true for simple wallet use cases, but not
>> >> > compatible
>> >> > with CoinJoin, or with systems that for example would want to combine
>> >> > multiple payments in a single transaction.
>> >> >
>> >>
>> >> Yes, you are right. It's not compatible with CoinJoin and the likes.
>> >>
>> >> >
>> >> > 48 bits seems low to me, but it does indeed solve the problem. Why
>> >> > not
>> >> > 128
>> >> > or 256 bits?
>> >>
>> >> The nonce is limited because of the OP_RETURN output being limited to
>> >> 40 bytes of data: 2 bytes version, 32 bytes txid, 6 bytes nonce.
>> >>
>> >> >
>> >> >> > Why does anyone care who paid? This is like walking into a
>> >> >> > coffeshop,
>> >> >> > noticing I don't have money with me, let me friend pay for me, and
>> >> >> > then
>> >> >> > have
>> >> >> > the shop insist that I can't drink it because I'm not the buyer.
>> >> >>
>> >> >> If you pay as you use the service (ie pay for coffee upfront),
>> >> >> there's
>> >> >> no need for PoP. Please see the Motivation section. But you are
>> >> >> right
>> >> >> that you must have the wallet(s) that paid at hand when you issue a
>> >> >> PoP.
>> >> >>
>> >> >> >
>> >> >> > Track payments, don't try to assign identities to payers.
>> >> >>
>> >> >> Please elaborate, I don't understand what you mean here.
>> >> >
>> >> >
>> >> > I think that is a mistake. You should not assume that the wallet who
>> >> > held
>> >> > the coins is the payer/buyer. That's what I said earlier; you're
>> >> > implicitly
>> >> > creating an identity (the one who holds these keys) based on the
>> >> > transaction. This seems fundamentally wrong to me, and not necessary.
>> >> > The
>> >> > receiver should not care who paid or how, he should care what was
>> >> > payed
>> >> > for.
>> >>
>> >> You are saying that it's a problem that the wallet used to pay, must
>> >> also be used to issue the PoP? That may very well be a problem in some
>> >> cases. People using PoP should of course be aware of it's limitations
>> >> and act accordingly, i.e. don't pay for concert tickets for a friend
>> >> and expect your friend to be able to enter the arena with her wallet.
>> >> As Tom Harding noted, it is possible to transfer keys to your friend's
>> >> wallet, but that might not be desirable if those keys are also used
>> >> for other payments. Also that would weaken the security of an HD
>> >> wallet, since a chain code along with a private key would reveal all
>> >> keys in that tree. Another solution is that your friend forwards the
>> >> PoP request to your wallet, through twitter or SMS, and you send the
>> >> PoP for her. Maybe that forwarding mechanism can be built into wallets
>> >> and automated so that the wallet automatically suggests to sign the
>> >> PoP for your friend. This is probably something to investigate
>> >> further, but not within the scope of this BIP.
>> >>
>> >> Of course the simplest solution would be to send money to your friend
>> >> first so that she can pay for the ticket from her own wallet, but
>> >> that's not always feasible.
>> >>
>> >> >
>> >> > The easiest solution to this IMHO would be an extension to the
>> >> > payment
>> >> > protocol that gives you (or your wallet) a token in return for
>> >> > paying,
>> >> > and
>> >> > that knowledge of that token is used to gain access to the services
>> >> > you
>> >> > provide.
>> >> >
>> >>
>> >> That token would then be reusable. Someone stealing it would be able
>> >> to use it as much as she wants. That is what I want to avoid with PoP.
>> >> The BIP proposal briefly mentions something like this in the
>> >> rationale. I also had a discussion about this with Mike Hearn on this
>> >> list on Mars 13 that I think covers most pros and cons of the
>> >> different approaches.
>> >>
>> >> While your suggestion does indeed separate the transaction from the
>> >> proof of payment, it also assumes that the token is held in the wallet
>> >> that pays. Otherwise you would need to keep it in another safe place,
>> >> remember it's reusable. Where would that be? How would you transfer
>> >> that token to your friend?
>> >>
>> >> Thank you again for your comments. I appreciate it.
>> >>
>> >> Best regards,
>> >> Kalle
>> >>
>> >> > --
>> >> > Pieter
>> >> >
Published at
2023-06-07 15:36:58Event JSON
{
"id": "a73e51078352499f8076c1b45fb137d3b7a755912954a77af5479f87f2348f41",
"pubkey": "e39d9ce3b0ed9cbb17528b25bb4b33bcee465476e44ea5980fb6f2693b97ab95",
"created_at": 1686152218,
"kind": 1,
"tags": [
[
"e",
"e1766602ba0f6768319a1583d11fb84dd1782fa79b735d969ef1342e648fd1da",
"",
"root"
],
[
"e",
"c13789be5c8f7e29977a8f5912e240542ed10106b22af8d2cf38e52f7c053ea0",
"",
"reply"
],
[
"p",
"5cb21bf5d7f25a9d46879713cbd32433bbc10e40ef813a3c28fe7355f49854d6"
]
],
"content": "π
Original date posted:2015-06-17\nπ Original message:2015-06-16 21:48 GMT+02:00 Pieter Wuille \u003cpieter.wuille at gmail.com\u003e:\n\u003e I don't see why existing software could create a 40-byte OP_RETURN but not\n\u003e larger? The limitation comes from a relay policy in full nodes, not a\n\u003e limitation is wallet software... and PoPs are not relayed on the network.\n\nYou are probably right here. The thing is that I don't know how *all*\nwallet signing and validating software is written, so I figure it's\nbetter to stick to a \"valid\" output. Since I don't *need* more data\nthan 40 bytes, why bother. There's another constraint to this as well:\nThe other BIP proposal, \"Proof of Payment URI scheme\", includes a\nnonce parameter in the URI. If the nonce is very long, the QR code\nwill be unnecessarily big. The server should try to detect a brute\nforce of the 48 bit nonce, or at least delay the pop requests by some\n100 ms or so.\n\nDo you think this is an actual problem, and why? Is your suggestion to\nuse a bigger nonce, given the above?\n\n\u003e\n\u003e Regarding sharing, I think you're talking about a different use case. Say\n\u003e you want to pay for 1-week valid entrance to some venue. I thought the\n\u003e purpose of the PoP was to be sure that only the person who paid for it, and\n\u003e not anyone else can use it during that week.\n\u003e\n\nThat's right. That's one use case. You pay for the 1-week entrance and\nthen you use your wallet to sign PoPs when you enter the venue.\n\n\u003e My argument against that is that the original payer can also hand the\n\u003e private keys in his wallet to someone else, who would then become able to\n\u003e create PoPs for the service. He does not lose anything by this, assuming the\n\u003e address is not reused.\n\u003e\n\nYes, that is possible. It's about the same as giving out a\nusername/password for a service that you have paid for. In the case of\na concert ticket, it's simple. Just allow one entrance per payment.\nBut in the example you gave, it's a bit more complicated. You could\nfor example give all guests a bracelet upon first entry or upon first\nexit. Or you can put a stamp on people leaving the venue, and demand\nthat all re-entries show the stamp, possibly along with a new PoP.\nPretty much as is done already. Different use cases will need\ndifferent protection. In this example, the value added by PoP is that\nthe venue does not have to distribute tickets in advance. This in turn\nallows for better privacy for the customer, who don't have to give out\npersonal information such as an email-address.\n\n\u003e So, using a token does not change anything, except it can be provided to the\n\u003e payer - instead of relying on creating an implicit identity based on who\n\u003e seems to have held particular private keys in the past.\n\u003e\n\nYes, that's a difference, but it comes at the cost of security. The\nstolen token can be used over and over. In the case of PoP it's only\nusable once, and it's only created when it's actually needed,\nminimizing the window of opportunity for the thief.\n\nRegards,\nKalle\n\n\u003e On Jun 16, 2015 9:41 PM, \"Kalle Rosenbaum\" \u003ckalle at rosenbaum.se\u003e wrote:\n\u003e\u003e\n\u003e\u003e 2015-06-16 21:25 GMT+02:00 Pieter Wuille \u003cpieter.wuille at gmail.com\u003e:\n\u003e\u003e \u003e You can't avoid sharing the token, and you can't avoid sharing the\n\u003e\u003e \u003e private\n\u003e\u003e \u003e keys used for signing either. If they are single use, you don't lose\n\u003e\u003e \u003e anything by sharing them.\n\u003e\u003e\n\u003e\u003e Forwarding the PoP request would be a way to avoid sharing keys, as\n\u003e\u003e suggested above.\n\u003e\u003e\n\u003e\u003e \u003e\n\u003e\u003e \u003e Also you are not creating a real transaction. Why does the OP_RETURN\n\u003e\u003e \u003e limitation matter?\n\u003e\u003e\n\u003e\u003e This was discussed in the beginning of this thread: \"The idea is to\n\u003e\u003e simplify implementation. Existing software can be used as is to sign\n\u003e\u003e and validate PoPs\"\n\u003e\u003e\n\u003e\u003e Regards,\n\u003e\u003e Kalle\n\u003e\u003e\n\u003e\u003e \u003e\n\u003e\u003e \u003e On Jun 16, 2015 9:22 PM, \"Kalle Rosenbaum\" \u003ckalle at rosenbaum.se\u003e wrote:\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e Thank you for your comments Pieter! Please find my answers below.\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e 2015-06-16 16:31 GMT+02:00 Pieter Wuille \u003cpieter.wuille at gmail.com\u003e:\n\u003e\u003e \u003e\u003e \u003e On Mon, Jun 15, 2015 at 1:59 PM, Kalle Rosenbaum \u003ckalle at rosenbaum.se\u003e\n\u003e\u003e \u003e\u003e \u003e wrote:\n\u003e\u003e \u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e \u003e\u003e 2015-06-15 12:00 GMT+02:00 Pieter Wuille \u003cpieter.wuille at gmail.com\u003e:\n\u003e\u003e \u003e\u003e \u003e\u003e I'm not sure if we will be able to support PoP with CoinJoin. Maybe\n\u003e\u003e \u003e\u003e \u003e\u003e someone with more insight into CoinJoin have some input?\n\u003e\u003e \u003e\u003e \u003e\n\u003e\u003e \u003e\u003e \u003e\n\u003e\u003e \u003e\u003e \u003e Not really. The problem is that you assume a transaction corresponds\n\u003e\u003e \u003e\u003e \u003e to\n\u003e\u003e \u003e\u003e \u003e a\n\u003e\u003e \u003e\u003e \u003e single payment. This is true for simple wallet use cases, but not\n\u003e\u003e \u003e\u003e \u003e compatible\n\u003e\u003e \u003e\u003e \u003e with CoinJoin, or with systems that for example would want to combine\n\u003e\u003e \u003e\u003e \u003e multiple payments in a single transaction.\n\u003e\u003e \u003e\u003e \u003e\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e Yes, you are right. It's not compatible with CoinJoin and the likes.\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e \u003e\n\u003e\u003e \u003e\u003e \u003e 48 bits seems low to me, but it does indeed solve the problem. Why\n\u003e\u003e \u003e\u003e \u003e not\n\u003e\u003e \u003e\u003e \u003e 128\n\u003e\u003e \u003e\u003e \u003e or 256 bits?\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e The nonce is limited because of the OP_RETURN output being limited to\n\u003e\u003e \u003e\u003e 40 bytes of data: 2 bytes version, 32 bytes txid, 6 bytes nonce.\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e \u003e\n\u003e\u003e \u003e\u003e \u003e\u003e \u003e Why does anyone care who paid? This is like walking into a\n\u003e\u003e \u003e\u003e \u003e\u003e \u003e coffeshop,\n\u003e\u003e \u003e\u003e \u003e\u003e \u003e noticing I don't have money with me, let me friend pay for me, and\n\u003e\u003e \u003e\u003e \u003e\u003e \u003e then\n\u003e\u003e \u003e\u003e \u003e\u003e \u003e have\n\u003e\u003e \u003e\u003e \u003e\u003e \u003e the shop insist that I can't drink it because I'm not the buyer.\n\u003e\u003e \u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e \u003e\u003e If you pay as you use the service (ie pay for coffee upfront),\n\u003e\u003e \u003e\u003e \u003e\u003e there's\n\u003e\u003e \u003e\u003e \u003e\u003e no need for PoP. Please see the Motivation section. But you are\n\u003e\u003e \u003e\u003e \u003e\u003e right\n\u003e\u003e \u003e\u003e \u003e\u003e that you must have the wallet(s) that paid at hand when you issue a\n\u003e\u003e \u003e\u003e \u003e\u003e PoP.\n\u003e\u003e \u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e \u003e\u003e \u003e\n\u003e\u003e \u003e\u003e \u003e\u003e \u003e Track payments, don't try to assign identities to payers.\n\u003e\u003e \u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e \u003e\u003e Please elaborate, I don't understand what you mean here.\n\u003e\u003e \u003e\u003e \u003e\n\u003e\u003e \u003e\u003e \u003e\n\u003e\u003e \u003e\u003e \u003e I think that is a mistake. You should not assume that the wallet who\n\u003e\u003e \u003e\u003e \u003e held\n\u003e\u003e \u003e\u003e \u003e the coins is the payer/buyer. That's what I said earlier; you're\n\u003e\u003e \u003e\u003e \u003e implicitly\n\u003e\u003e \u003e\u003e \u003e creating an identity (the one who holds these keys) based on the\n\u003e\u003e \u003e\u003e \u003e transaction. This seems fundamentally wrong to me, and not necessary.\n\u003e\u003e \u003e\u003e \u003e The\n\u003e\u003e \u003e\u003e \u003e receiver should not care who paid or how, he should care what was\n\u003e\u003e \u003e\u003e \u003e payed\n\u003e\u003e \u003e\u003e \u003e for.\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e You are saying that it's a problem that the wallet used to pay, must\n\u003e\u003e \u003e\u003e also be used to issue the PoP? That may very well be a problem in some\n\u003e\u003e \u003e\u003e cases. People using PoP should of course be aware of it's limitations\n\u003e\u003e \u003e\u003e and act accordingly, i.e. don't pay for concert tickets for a friend\n\u003e\u003e \u003e\u003e and expect your friend to be able to enter the arena with her wallet.\n\u003e\u003e \u003e\u003e As Tom Harding noted, it is possible to transfer keys to your friend's\n\u003e\u003e \u003e\u003e wallet, but that might not be desirable if those keys are also used\n\u003e\u003e \u003e\u003e for other payments. Also that would weaken the security of an HD\n\u003e\u003e \u003e\u003e wallet, since a chain code along with a private key would reveal all\n\u003e\u003e \u003e\u003e keys in that tree. Another solution is that your friend forwards the\n\u003e\u003e \u003e\u003e PoP request to your wallet, through twitter or SMS, and you send the\n\u003e\u003e \u003e\u003e PoP for her. Maybe that forwarding mechanism can be built into wallets\n\u003e\u003e \u003e\u003e and automated so that the wallet automatically suggests to sign the\n\u003e\u003e \u003e\u003e PoP for your friend. This is probably something to investigate\n\u003e\u003e \u003e\u003e further, but not within the scope of this BIP.\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e Of course the simplest solution would be to send money to your friend\n\u003e\u003e \u003e\u003e first so that she can pay for the ticket from her own wallet, but\n\u003e\u003e \u003e\u003e that's not always feasible.\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e \u003e\n\u003e\u003e \u003e\u003e \u003e The easiest solution to this IMHO would be an extension to the\n\u003e\u003e \u003e\u003e \u003e payment\n\u003e\u003e \u003e\u003e \u003e protocol that gives you (or your wallet) a token in return for\n\u003e\u003e \u003e\u003e \u003e paying,\n\u003e\u003e \u003e\u003e \u003e and\n\u003e\u003e \u003e\u003e \u003e that knowledge of that token is used to gain access to the services\n\u003e\u003e \u003e\u003e \u003e you\n\u003e\u003e \u003e\u003e \u003e provide.\n\u003e\u003e \u003e\u003e \u003e\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e That token would then be reusable. Someone stealing it would be able\n\u003e\u003e \u003e\u003e to use it as much as she wants. That is what I want to avoid with PoP.\n\u003e\u003e \u003e\u003e The BIP proposal briefly mentions something like this in the\n\u003e\u003e \u003e\u003e rationale. I also had a discussion about this with Mike Hearn on this\n\u003e\u003e \u003e\u003e list on Mars 13 that I think covers most pros and cons of the\n\u003e\u003e \u003e\u003e different approaches.\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e While your suggestion does indeed separate the transaction from the\n\u003e\u003e \u003e\u003e proof of payment, it also assumes that the token is held in the wallet\n\u003e\u003e \u003e\u003e that pays. Otherwise you would need to keep it in another safe place,\n\u003e\u003e \u003e\u003e remember it's reusable. Where would that be? How would you transfer\n\u003e\u003e \u003e\u003e that token to your friend?\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e Thank you again for your comments. I appreciate it.\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e Best regards,\n\u003e\u003e \u003e\u003e Kalle\n\u003e\u003e \u003e\u003e\n\u003e\u003e \u003e\u003e \u003e --\n\u003e\u003e \u003e\u003e \u003e Pieter\n\u003e\u003e \u003e\u003e \u003e",
"sig": "34aea0ad1e7ada65f5276e729c06a225136a06744718107e49a5f6befb7105f8db7db38593c3d3ae3b9818732cd27f1548011a09f61555589ee803d2f378f563"
}