<oembed><type>rich</type><version>1.0</version><author_name>npub17fjkngg0s0mfx4uhhz6n4puhflwvrhn2h5c78vdr5xda4mvqx89swntr0s</author_name><author_url>https://nostr.ae/npub17fjkngg0s0mfx4uhhz6n4puhflwvrhn2h5c78vdr5xda4mvqx89swntr0s</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2020-02-11&#xA;📝 Original message:&#xA;Hi Rusty,&#xA;&#xA;Thanks for the answer, and good luck with c-lightning 0.8.1-rc1 ;)&#xA;&#xA;(I think we should probably ban forwarding to private channels,&#xA;&gt; too, for similar reasons).&#xA;&#xA;&#xA;Can you detail why? I believe that forwarding through private channels can&#xA;actually be pretty useful in the future for payee privacy (more on that&#xA;later).&#xA;&#xA;Note that with any self-assigned SCID schemes, Alice has to respond to&#xA;&gt; unknown scids in update_add_htlc with some BADONION code (which makes&#xA;&gt; *Bob* give Carol an error response, since Alice can&#39;t without revealing&#xA;&gt; her identity).&#xA;&#xA;&#xA;I believe the difference is that in your scheme, Bob would answer with&#xA;`unknown_next_peer`. When instead Alice responds with a `BADONION`, the only&#xA;thing it reveals is that Alice does use the decoy feature (which Mallory&#xA;already knows because she has seen an invoice from Alice). As long as this&#xA;behavior is consistent throughout the network, I think both options offer&#xA;the&#xA;same privacy (unless I&#39;m missing something).&#xA;&#xA;I expect such payments to become&#xA;&gt; significant, and as long as paying to a temporary id and paying to a&#xA;&gt; private channel looks identical, it&#39;s too draconian to ban.&#xA;&#xA;&#xA;True, that must become the default flow for receiving payments on mobile&#xA;wallets.&#xA;Granted, my solution would take longer to deploy because it needs to be&#xA;added to&#xA;sender wallets before receivers can require it.&#xA;&#xA;I&#39;ve been thinking more about improving my scheme to not require any sender&#xA;change, but I don&#39;t think that&#39;s possible at the moment. As with all&#xA;Lightning&#xA;tricks though, once we have Schnorr then it&#39;s really easy to do.&#xA;Alice simply needs to use `s * d_a` as her &#34;preimage&#34; (and the payment point&#xA;becomes the P_I Bob needs). That may depend on the exact multi-hop locks&#xA;construction we end up using though, so I&#39;m not 100% sure about that yet.&#xA;&#xA;But I did come up with what could be an interesting development.&#xA;Nothing prevents the decoy scheme to be used for public channels too, and&#xA;for&#xA;multiple hops: that enables a cheap form of rendezvous that only costs a few&#xA;hundred bytes in the invoice.&#xA;&#xA;Alice would select multiple hops to a rendezvous node, and would apply some&#xA;blinding to those hops&#39; `node_id` and `scid`. Alice would include these&#xA;decoy&#xA;hops in the invoice `routing_hints` (only costs 51 bytes per hop instead of&#xA;a&#xA;full onion). Mallory would only learn an upper bound on the distance between&#xA;Alice and the rendezvous.&#xA;&#xA;I have a detailed version of the scheme in a gist [1] if people want to&#xA;take a&#xA;deeper look and break it (beer on me to the first one who breaks the&#xA;scheme).&#xA;&#xA;[1] https://gist.github.com/t-bast/9972bfe9523bb18395bdedb8dc691faf&#xA;&#xA;Cheers,&#xA;Bastien&#xA;&#xA;Le lun. 10 févr. 2020 à 04:40, Rusty Russell &lt;rusty at rustcorp.com.au&gt; a&#xA;écrit :&#xA;&gt;&#xA;&gt; Bastien TEINTURIER &lt;bastien at acinq.fr&gt; writes:&#xA;&gt; &gt;&gt; But Mallory can do the same attack, I think.  Just include the P_I from&#xA;&gt; &gt;&gt; the wrong invoice for Bob.&#xA;&gt; &gt;&#xA;&gt; &gt; Good catch, that&#39;s true, thanks for keeping me honest there! In that&#xA;case&#xA;&gt; &gt; my proposal&#xA;&gt; &gt; would need the same mitigation as yours, Bob will need to include the&#xA;&gt; &gt; `scid` he received&#xA;&gt; &gt; in `update_add_htlc` (this is in fact not that hard once we allow TLV&#xA;&gt; &gt; extensions on every&#xA;&gt; &gt; message).&#xA;&gt;&#xA;&gt; Yes, I&#39;ve added this to the PR.  Which gives a new validation path, I&#xA;&gt; think:&#xA;&gt;&#xA;&gt; ## Figuring out what nodeid to use to decode onion&#xA;&gt;&#xA;&gt; 1. Look up scid from HTLC; if it didn&#39;t include one, use default.&#xA;&gt; 2. Look up payment_hash; if no invoice is found, use default.&#xA;&gt; 3. If invoice specified this scid, get nodeid and use that.&#xA;&gt; 4. ... and refuse to forward the HTLC (it must terminate here).&#xA;&gt;&#xA;&gt; My plan is to add an argument to `invoice` which is an array of one or&#xA;&gt; more scids: we get a temporary scids for each peer and use them in the&#xA;&gt; routehints.  We also assign a random temporary nodeid to that invoice.&#xA;&gt;&#xA;&gt; The above algo is designed to ensure we behave like any other node which&#xA;&gt; has no idea about this nodeid if Mallory:&#xA;&gt;&#xA;&gt; 1. tries to use a temporary node id on a normal channel to us.&#xA;&gt; 2. tries to pay another invoice using this temporary node id.&#xA;&gt; 3. tries to probe our outgoing channels using this routing hint&#xA;&gt;    (I think we should probably ban forwarding to private channels,&#xA;&gt;    too, for similar reasons).&#xA;&gt;&#xA;&gt; ---&#xA;&gt;&#xA;&gt; Note that with any self-assigned SCID schemes, Alice has to respond to&#xA;&gt; unknown scids in update_add_htlc with some BADONION code (which makes&#xA;&gt; *Bob* give Carol an error response, since Alice can&#39;t without revealing&#xA;&gt; her identity).&#xA;&gt;&#xA;&gt; With Bob-assigned SCIDs, Alice simply needs to make him unallocate&#xA;&gt; it before forgetting the invoice, so she will simply never see old&#xA;&gt; invoices.&#xA;&gt;&#xA;&gt; (All these schemes give limited privacy, of course: Bob knows who Alice&#xA;&gt; is, and fingerprinting and liveness attacks are always possible).&#xA;&gt;&#xA;&gt; &gt; I&#39;m extremely nervous about custodial lightning services restricting&#xA;&gt; &gt;&gt; what they will pay to.  This is not theoretical: they will come under&#xA;&gt; &gt;&gt; immense KYC pressure in the near future, which means they cannot pay&#xA;&gt; &gt;&gt; arbitrary invoices.&#xA;&gt; 1&gt;&gt;&#xA;&gt; &gt;&#xA;&gt; &gt; That&#39;s a very good point, thanks for raising this. However I believe&#xA;that&#xA;&gt; &gt; there are (and will be) enough&#xA;&gt; &gt; non-custodial wallets to let motivated users pay whatever they want.&#xA;Users&#xA;&gt; &gt; can even run their own&#xA;&gt; &gt; node to pay such invoices if needed.&#xA;&gt;&#xA;&gt; Not if ln_strike (no, the other one!) is the future.&#xA;&gt;&#xA;&gt; &gt; If you are using a custodial wallet and KYC pressure kicks in, then&#xA;&gt; &gt; regardless of that feature law may&#xA;&gt; &gt; require users to completely reveal who they are paying, so even normal&#xA;&gt; &gt; payments wouldn&#39;t protect&#xA;&gt; &gt; them, don&#39;t you think? Regulation could for example disallow paying via&#xA;&gt; &gt; unannounced channels entirely&#xA;&gt; &gt; (or require you to show the funding tx associated to your unannounced&#xA;&gt; &gt; channel).&#xA;&gt;&#xA;&gt; Actually, as long as the same method is required for both normal private&#xA;&gt; channels (which will all use non-tx-based short_channel_ids in the near&#xA;&gt; future I hope!), I don&#39;t really mind.  I expect such payments to become&#xA;&gt; significant, and as long as paying to a temporary id and paying to a&#xA;&gt; private channel looks identical, it&#39;s too draconian to ban.  A business&#xA;&gt; would probably meet any KYC requirements by simply asking the user&#xA;&gt; (perhaps over a certain amount, etc).&#xA;&gt;&#xA;&gt; (I&#39;ve put my implementation on hold for a moment while I&#39;m supposed to&#xA;&gt; be releasing 0.8.1-rc1 RSN!)&#xA;&gt;&#xA;&gt; Cheers,&#xA;&gt; Rusty.&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200211/41e5aa47/attachment.html&gt;</html></oembed>