<oembed><type>rich</type><version>1.0</version><title>Bastien TEINTURIER [ARCHIVE] wrote</title><author_name>Bastien TEINTURIER [ARCHIVE] (npub17f…ntr0s)</author_name><author_url>https://yabu.me/npub17fjkngg0s0mfx4uhhz6n4puhflwvrhn2h5c78vdr5xda4mvqx89swntr0s</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2020-02-03&#xA;📝 Original message:&#xA;Thanks for the feedback and discussion. Here are some more comments.&#xA;&#xA;This is relevant if we ever want to hide the node id of the last node: Bob&#xA;&gt; could provide a symmetric&#xA;&gt; encryption key to all its peers with unpublished channels, which the peer&#xA;&gt; can XOR with its own true&#xA;&gt; node id and use the lowest 40 bits (or 46 bits or 58 bits) in the SCID.&#xA;&#xA;&#xA;I don&#39;t understand your point here. Alice cannot hide her node_id from Bob&#xA;since the `node_id` is&#xA;tied to the (unannounced) channel creation.&#xA;&#xA;But this is not an issue. What Alice wants to break is the ability to link&#xA;multiple HTLCs together&#xA;because they use the same `node_id`. Since Alice can use a different&#xA;`node_id` in every invoice,&#xA;it&#39;s easy for her to make sure Carol cannot tie those HTLCs together.&#xA;&#xA;In order to hide from Bob, the best Alice can do is use a different&#xA;`node_id` for each channel she&#xA;opens to Bob and use Tor. This way Bob cannot know that node_id_1 and&#xA;node_id_2 both belong to Alice.&#xA;I don&#39;t think we can do better than that.&#xA;&#xA;I really don&#39;t want a special marker on Carol; she needs to just pay like&#xA;&gt; normal.&#xA;&#xA;&#xA;I agree that this would be the ideal outcome (and my current proposal&#xA;doesn&#39;t achieve that, but I&#39;m&#xA;hoping I can improve it to achieve that). Do note that even though my&#xA;current proposal requires&#xA;a code update from Carol, the code-change would be very small. Adding&#xA;support for `payment_secret`&#xA;did require a change on Carol to improve security; I&#39;m hoping that a small&#xA;enough code-change with&#xA;a big enough privacy improvement would eventually be supported by all three&#xA;implementations (and&#xA;then find its way inside wallets).&#xA;&#xA;I must admit I&#39;m a bit turned off by the state management required by your&#xA;proposal. I&#39;m afraid it&#xA;may be complex to get right, or be subject to fingerprinting and wouldn&#39;t&#xA;result in the privacy&#xA;gain we&#39;re hoping.&#xA;&#xA;I think this really needs to be cheap for Bob; if Bob can be DoS-ed by&#xA;offering this feature, I&#xA;don&#39;t think the Bobs out there will activate it.&#xA;&#xA;I really feel some cryptography trick can allow us to find a solution that&#xA;requires no more than a&#xA;shared secret to be kept between Alice and Bob, and no&#xA;synchronization/state management.&#xA;I&#39;d like to explore this option further.&#xA;&#xA;Cheers,&#xA;Bastien&#xA;&#xA;Le lun. 3 févr. 2020 à 07:51, m.a.holden via Lightning-dev &lt;&#xA;lightning-dev at lists.linuxfoundation.org&gt; a écrit :&#xA;&#xA;&gt; &gt; (I&#39;m seeking a clever way that Bob can assign them and trivially tell&#xA;&gt; &gt; which ID is assigned to which peer, but I can&#39;t figure it out, so I&#xA;&gt; &gt; guess Bob keeps a mapping and restricts each peer to 256 live scids?).&#xA;&gt;&#xA;&gt; Hi Rusty.&#xA;&gt;&#xA;&gt; Here&#39;s a potential way for Alice and Bob to agree a set of 256 scids&#xA;&gt; without any additional messages or changes to existing messages beyond a&#xA;&gt; feature flag and a flag in open_channel, but comes with a computational&#xA;&gt; cost.&#xA;&gt;&#xA;&gt; Alice and Bob agree on a random integer `r`. This could be negotiated on&#xA;&gt; `open_channel`, but we shouldn&#39;t need to send additional information&#xA;&gt; because we already have a random integer we can use: the&#xA;&gt; `temporary_channel_id`. This is not known to anybody besides Alice and Bob.&#xA;&gt;&#xA;&gt; When a channel is locked, Bob computes n=256 scids, using something&#xA;&gt; approximating `concat(n, trunc_bytes(sha256(ec_mult(2^n*r, Q)), 7))`, where&#xA;&gt; `Q` is Alice&#39;s public key for the channel funding transaction.&#xA;&gt;&#xA;&gt; The chance of scid collisions between channels is 2^56, which is probably&#xA;&gt; no cause for concern.&#xA;&gt;&#xA;&gt; Instead of keeping a map of 256 scids for each channel, Bob can use a&#xA;&gt; cuckoo filter for efficiency. The filter can be used for a quick membership&#xA;&gt; test and also as an associative map from scids to channels. It can also&#xA;&gt; support scid deletion in the event of channel closure (at the cost of&#xA;&gt; recomputing 256 ec_mults again).&#xA;&gt;&#xA;&gt; So when Bob receives a new HTLC to forward, he tests it against his cuckoo&#xA;&gt; filter and retreives a candidate set of possible channels to which it may&#xA;&gt; refer. For each channel, he takes the most significant byte of the scid as&#xA;&gt; `m` and performs `trunc_bytes(sha256(ec_mult(2^m*r, Q)), 7)` and tests the&#xA;&gt; least-significant 7 bytes of the result against the scid.&#xA;&gt;&#xA;&gt; Alice does not need to keep all of the scids she may use for invoices&#xA;&gt; because they can be computed on the fly, but she will need to keep a copy&#xA;&gt; of the `temporary_channel_id`.&#xA;&gt;&#xA;&gt; In the reverse direction of Alice forwarding HTLCs to Bob, Bob&#39;s public&#xA;&gt; key for the funding transaction is used instead.&#xA;&gt;&#xA;&gt; Regards,&#xA;&gt; Mark Holden&#xA;&gt; _______________________________________________&#xA;&gt; Lightning-dev mailing list&#xA;&gt; Lightning-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200203/46cc458b/attachment.html&gt;</html></oembed>