<oembed><type>rich</type><version>1.0</version><author_name>npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</author_name><author_url>https://nostr.ae/npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2020-02-04&#xA;📝 Original message:&#xA;Bastien TEINTURIER &lt;bastien at acinq.fr&gt; writes:&#xA;&gt; Hey again,&#xA;&gt;&#xA;&gt; Otherwise Mallory gets two invoices, and wants to know if they&#39;re&#xA;&gt;&gt; actually the same node.  Inv1 has nodeid N1, routehint Bob-&gt;C1, Inv2 has&#xA;&gt;&gt; nodeid N2, routehint Bob-&gt;C2.&#xA;&gt;&#xA;&gt; I think this attack is interesting. AFAICT my proposal defends against this&#xA;&gt; because of the way&#xA;&gt; `payment_secret` and `decoy_key` are both used to derive the `decoy_scid`&#xA;&gt; (but don&#39;t trust me, do&#xA;&gt; verify that I&#39;m not missing something).&#xA;&gt;&#xA;&gt; If Mallory doesn&#39;t use both the right `decoy_node_id` and `payment_secret`&#xA;&gt; to compute `P_I`, Bob&#xA;&gt; will not decode that to a valid real `scid` and will return an&#xA;&gt; `unknown_next_peer` which is good&#xA;&gt; for privacy.&#xA;&#xA;But Mallory can do the same attack, I think.  Just include the P_I from&#xA;the wrong invoice for Bob.&#xA;&#xA;&gt; It seems to me that&#xA;&gt; https://github.com/lightningnetwork/lightning-rfc/pull/681 cannot defend&#xA;&gt; against this attack. If both invoices are currently valid, Bob will forward&#xA;&gt; an HTLC that uses N1&#xA;&gt; with C2 (because Bob has no way of knowing N1 from the onion, for privacy&#xA;&gt; reasons).&#xA;&gt; The only way I&#39;d see to avoid is would be that Alice needs to share her&#xA;&gt; `decoy_node_id`s with&#xA;&gt; Bob (and the mapping to a `decoy_scid`) which means more state to&#xA;&gt; manage...but maybe I&#39;m just&#xA;&gt; missing a better mitigation?&#xA;&#xA;No, Bob can include the scid he used in the update_add_htlc message, so&#xA;Alice can check.&#xA;&#xA;I&#39;m extremely nervous about custodial lightning services restricting&#xA;what they will pay to.  This is not theoretical: they will come under&#xA;immense KYC pressure in the near future, which means they cannot pay&#xA;arbitrary invoices.&#xA;&#xA;Thus my preference for a system which doesn&#39;t add any requirements on&#xA;the payer.&#xA;&#xA;Cheers,&#xA;Rusty.</html></oembed>