<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-05&#xA;📝 Original message:&#xA;&gt;&#xA;&gt; But Mallory can do the same attack, I think.  Just include the P_I from&#xA;&gt; the wrong invoice for Bob.&#xA;&gt;&#xA;&#xA;Good catch, that&#39;s true, thanks for keeping me honest there! In that case&#xA;my proposal&#xA;would need the same mitigation as yours, Bob will need to include the&#xA;`scid` he received&#xA;in `update_add_htlc` (this is in fact not that hard once we allow TLV&#xA;extensions on every&#xA;message).&#xA;&#xA;I&#39;m extremely nervous about custodial lightning services restricting&#xA;&gt; what they will pay to.  This is not theoretical: they will come under&#xA;&gt; immense KYC pressure in the near future, which means they cannot pay&#xA;&gt; arbitrary invoices.&#xA;&gt;&#xA;&#xA;That&#39;s a very good point, thanks for raising this. However I believe that&#xA;there are (and will be) enough&#xA;non-custodial wallets to let motivated users pay whatever they want. Users&#xA;can even run their own&#xA;node to pay such invoices if needed.&#xA;&#xA;If you are using a custodial wallet and KYC pressure kicks in, then&#xA;regardless of that feature law may&#xA;require users to completely reveal who they are paying, so even normal&#xA;payments wouldn&#39;t protect&#xA;them, don&#39;t you think? Regulation could for example disallow paying via&#xA;unannounced channels entirely&#xA;(or require you to show the funding tx associated to your unannounced&#xA;channel).&#xA;&#xA;If we&#39;re taking into account such KYC pressure, then I believe none of the&#xA;solutions we can provide will&#xA;be useful. It will be up to the recipient to decide whether he thus wants&#xA;to use a normal invoice and&#xA;reveal his identity or pass on that payment.&#xA;&#xA;What do you think? Do you believe `option_scid_assign` can do a better job&#xA;in such situations?&#xA;&#xA;Cheers,&#xA;Bastien&#xA;&#xA;Le mer. 5 févr. 2020 à 02:44, Rusty Russell &lt;rusty at rustcorp.com.au&gt; a&#xA;écrit :&#xA;&#xA;&gt; Bastien TEINTURIER &lt;bastien at acinq.fr&gt; writes:&#xA;&gt; &gt; Hey again,&#xA;&gt; &gt;&#xA;&gt; &gt; Otherwise Mallory gets two invoices, and wants to know if they&#39;re&#xA;&gt; &gt;&gt; actually the same node.  Inv1 has nodeid N1, routehint Bob-&gt;C1, Inv2 has&#xA;&gt; &gt;&gt; nodeid N2, routehint Bob-&gt;C2.&#xA;&gt; &gt;&#xA;&gt; &gt; I think this attack is interesting. AFAICT my proposal defends against&#xA;&gt; this&#xA;&gt; &gt; because of the way&#xA;&gt; &gt; `payment_secret` and `decoy_key` are both used to derive the `decoy_scid`&#xA;&gt; &gt; (but don&#39;t trust me, do&#xA;&gt; &gt; verify that I&#39;m not missing something).&#xA;&gt; &gt;&#xA;&gt; &gt; If Mallory doesn&#39;t use both the right `decoy_node_id` and&#xA;&gt; `payment_secret`&#xA;&gt; &gt; to compute `P_I`, Bob&#xA;&gt; &gt; will not decode that to a valid real `scid` and will return an&#xA;&gt; &gt; `unknown_next_peer` which is good&#xA;&gt; &gt; for privacy.&#xA;&gt;&#xA;&gt; But Mallory can do the same attack, I think.  Just include the P_I from&#xA;&gt; the wrong invoice for Bob.&#xA;&gt;&#xA;&gt; &gt; It seems to me that&#xA;&gt; &gt; https://github.com/lightningnetwork/lightning-rfc/pull/681 cannot defend&#xA;&gt; &gt; against this attack. If both invoices are currently valid, Bob will&#xA;&gt; forward&#xA;&gt; &gt; an HTLC that uses N1&#xA;&gt; &gt; with C2 (because Bob has no way of knowing N1 from the onion, for privacy&#xA;&gt; &gt; reasons).&#xA;&gt; &gt; The only way I&#39;d see to avoid is would be that Alice needs to share her&#xA;&gt; &gt; `decoy_node_id`s with&#xA;&gt; &gt; Bob (and the mapping to a `decoy_scid`) which means more state to&#xA;&gt; &gt; manage...but maybe I&#39;m just&#xA;&gt; &gt; missing a better mitigation?&#xA;&gt;&#xA;&gt; No, Bob can include the scid he used in the update_add_htlc message, so&#xA;&gt; Alice can check.&#xA;&gt;&#xA;&gt; I&#39;m extremely nervous about custodial lightning services restricting&#xA;&gt; what they will pay to.  This is not theoretical: they will come under&#xA;&gt; immense KYC pressure in the near future, which means they cannot pay&#xA;&gt; arbitrary invoices.&#xA;&gt;&#xA;&gt; Thus my preference for a system which doesn&#39;t add any requirements on&#xA;&gt; the payer.&#xA;&gt;&#xA;&gt; Cheers,&#xA;&gt; Rusty.&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200205/08571a4f/attachment.html&gt;</html></oembed>