<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-24&#xA;📝 Original message:&#xA;Good morning list,&#xA;&#xA;After exploring decoys [1], which is a cheap way of doing route blinding,&#xA;I&#39;m turning back to exploring rendezvous.&#xA;The previous mails on the mailing list mentioned that there was a&#xA;technicality&#xA;to make the HMACs check out, but didn&#39;t provide a lot of details.&#xA;The issue is that the filler generation needs to take into account some hops&#xA;that will be added *later*, by the payer.&#xA;&#xA;However it is quite easy to work-around, with a few space trade-offs.&#xA;Let&#39;s consider a typical rendezvous setup, where Alice wants to be paid via&#xA;rendezvous Bob, and Carol wants to pay that invoice:&#xA;&#xA;Carol -&gt; ... -&gt; Bob -&gt; ... -&gt; Alice&#xA;&#xA;If Alice knows how many bytes Carol is going to use for her part of the&#xA;onion&#xA;payloads, Alice can easily take them into account when generating her&#xA;filler by&#xA;pre-pending the same amount of `0` bytes. It seems reasonable to impose a&#xA;fixed&#xA;number of onion bytes for each side of the rendezvous (650 each?) so Alice&#xA;would&#xA;know that amount.&#xA;&#xA;When Carol completes the onion with her part of the route, she simply needs&#xA;to&#xA;generate filler data for her part of the route following the normal Sphinx&#xA;protocol&#xA;and apply it to the onion she found in the invoice.&#xA;&#xA;But the tricky part is that she needs to give Bob a way of generating the&#xA;same&#xA;filler data to unapply it. Then all HMACs correctly check out.&#xA;&#xA;I see two ways of doing that:&#xA;&#xA;* Carol simply sends that filler (650 bytes), probably via a TLV in&#xA;`update_add_htlc`.&#xA;This means every intermediate hop needs to forward that, which is painful&#xA;and&#xA;potentially leaking too much data.&#xA;* Carol provides Bob with the rho keys used to generate her filler, and the&#xA;length&#xA;used by each hop. This leaks to Bob an upper bound on the number of hops&#xA;and the&#xA;number of bytes sent to each hop.&#xA;&#xA;Since shift-and-xor kind of crypto is hard to read as equations, but very&#xA;easy to&#xA;read as diagrams, I spent a bit of time doing beautiful ASCII art [2].&#xA;Don&#39;t hesitate&#xA;to have a look at it to find more details about how that works. You can&#xA;also print&#xA;that on t-shirts to look fancy at conferences. I also have some sample code&#xA;working&#xA;in eclair [3] for those who can read Scala without getting headaches.&#xA;&#xA;Are there other tricks we can use to reconcile both sides of the onion at&#xA;Bob&#39;s?&#xA;Maybe cdecker (or someone else) has an ace up his sleeve for me there? :)&#xA;&#xA;One important thing to note is that rendezvous on normal onions will be&#xA;costly to&#xA;integrate into invoices: it takes 1366 bytes to include one onion, and if&#xA;we want&#xA;to handle route failures or let the sender use multi-part, we will need to&#xA;have a&#xA;handful of pre-encrypted onions in the invoice (hence a few kB, which may&#xA;not be&#xA;practical for QR codes).&#xA;&#xA;But I did mention before that doing rendezvous on the trampoline onion&#xA;could have&#xA;better properties [4]. When doing that, having Carol transmit her filler&#xA;data only&#xA;to Bob, via the outer onion payload becomes practical and doesn&#39;t leak&#xA;information.&#xA;Multi-part would work with a single trampoline onion in the invoice (~500&#xA;bytes),&#xA;because nodes can do MPP between trampoline nodes thanks to the&#xA;onion-in-onion&#xA;construction. We simply need to decide the size of the trampoline onion to&#xA;allow&#xA;each side of the rendezvous to be able to insert a number of hops we&#39;re&#xA;comfortable&#xA;with. You can find more details in the &#34;Rendezvous on a trampoline&#34; section&#xA;of [2].&#xA;&#xA;I&#39;m really interested in other approaches to making rendezvous work with&#xA;the HMACs&#xA;correctly checking out. If people on this list have drafts, intuitions or&#xA;random&#xA;thoughts about possible constructions, please share them, I&#39;d be happy to&#xA;dive into&#xA;them to explore alternatives to the one I found, hoping we can make this&#xA;work and&#xA;provide this feature to our users in the near future.&#xA;&#xA;A small side-note on Hornet. Hornet does offer many features that I believe&#xA;we will&#xA;want in Lightning in the future. It may seem that doing a custom rendezvous&#xA;scheme&#xA;is a waste of time since we&#39;ll ditch it once/if we implement Hornet. While&#xA;that is&#xA;true in the long run, I believe that if we&#39;re able to find a rendezvous&#xA;scheme that&#xA;isn&#39;t too much work to implement, it makes sense to have something&#xA;available soon-ish.&#xA;Hornet will likely be a longer-term effort that we won&#39;t get as soon as&#xA;we&#39;d like&#xA;(especially since it will probably require a network-wide update). But who&#xA;knows, maybe&#xA;we may see that we are trying to create many features that are already&#xA;built into Hornet&#xA;(rendezvous, directed message support, etc) and will decide to implement&#xA;Hornet sooner&#xA;than expected?&#xA;&#xA;Cheers,&#xA;Bastien&#xA;&#xA;[1]&#xA;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002435.html&#xA;[2] https://gist.github.com/t-bast/ab42a7f52eb2e73105557957c8359601&#xA;[3] https://github.com/ACINQ/eclair/tree/sphinx-rendezvous&#xA;[4]&#xA;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002237.html&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200224/02d2cd82/attachment-0001.html&gt;</html></oembed>