<oembed><type>rich</type><version>1.0</version><title>Rusty Russell [ARCHIVE] wrote</title><author_name>Rusty Russell [ARCHIVE] (npub1zw…hkhpx)</author_name><author_url>https://yabu.me/npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2020-03-09&#xA;📝 Original message:&#xA;I recently hit a dead-end on rendezvous routing; the single-use&#xA;requirement is a showstopper for offers (which are supposed to be static&#xA;and reusable).&#xA;&#xA;Fortunately, t-bast has a scheme for blinded paths (see&#xA;https://gist.github.com/t-bast/9972bfe9523bb18395bdedb8dc691faf ) so&#xA;I&#39;ve been examining that more closely.  I think it can be simplified&#xA;to use more standard primitives.&#xA;&#xA;The problem: Alice wants to present Mallory with a path (Carol, Bob,&#xA;Alice) for which he can create an onion, which is obscured in some way,&#xA;but can be unobscured by the various nodes.  Mallory should be forced to&#xA;use the entire path.&#xA;&#xA;Alice can give Mallory two ECDH blobs to place inside the per-hop&#xA;payload to establish shared secrets with Bob and Carol.  But crucially,&#xA;Bob needs the secret *before* he can unwrap the onion, so the ECDH&#xA;blob for the next peer needs to be sent alongside the onion itself.&#xA;&#xA;t-bast proposed using the secret to XOR the scid, but Christian&#xA;suggested it&#39;s more powerful to encrypt a general payload.&#xA;&#xA;What does this leave us with?&#xA;&#xA;1. A new invoice letter `b`.  Encodes&#xA;   1 or more pubkey/feebase/feeprop/cltvdelta/features/encblob.&#xA;&#xA;2. An additional (tlv of course) field to update_add_htlc, `blinding`.&#xA;&#xA;3. New `tlv_payload` field `encblob` (varlen).&#xA;&#xA;4. ECDH on incoming `blinding` to get a shared secret which tells&#xA;   this node how to tweak its nodeid to decrypt onion, and also how to&#xA;   decrypt `encblob`.  This gives a tlv, which presumably contains&#xA;   `short_channel_id` as well as `blinding`.&#xA;&#xA;5. Use `blinding` for the next update_add_htlc.&#xA;&#xA;6. If you get an error from downstream and you sent `blinding`, turn it&#xA;   into your own error for maximum obfuscation.  Perhaps a new&#xA;   &#34;blinded_path_error&#34;?  Obviously does not include a channel_update :)&#xA;&#xA;So, if you get an invoice `b`, with path starting at (known) Carol:&#xA;&#xA;        Carol/1/1/9/&#34;&#34;/enc1&#xA;          Bob&#39;/1/1/9/&#34;&#34;/enc2&#xA;            [Optional: decoy hops...]&#xA;&#xA;Payer constructs the onion to get to Carol as normal, then:&#xA;&#xA;        Carol: No `blinding` in incoming HTLC, but once it decrypts the&#xA;               onion, she sees `encblob` (value enc1).  Uses first 32&#xA;               bytes of `enc1` as `blinding`: do ECDH to get SS1, uses&#xA;               SS1 to decrypt rest to get next scid and `blinding`, send&#xA;               `blinding` with update_add_htlc to Bob.&#xA;&#xA;        Bob: Gets `blinding` from update_add_htlc. ECDH -&gt; SS2.  Tweak&#xA;               own key with SS2 to decode onion.  Use SS2 to decrypt&#xA;               `enc2` to get next scid and blinding.  Send `blinding`&#xA;               with update_add_htlc to Alice.&#xA;&#xA;        Alice: Gets `blinding` from update_add_htlc. ECDH -&gt; SS3.  Tweak&#xA;               own key with SS3 to decode onion.  If it put in decoy&#xA;               hops, this onion won&#39;t be terminal, but otherwise it can&#xA;               be treated as terminal iff `blinding` is the expected value&#xA;               for this invoice.&#xA;&#xA;Note that this means no payment secret is necessary, since the incoming&#xA;`blinding` serves the same purpose.  If we wanted to, we could (ab)use&#xA;payment_secret as the first 32-bytes to put in Carol&#39;s enc1 (i.e. it&#39;s&#xA;the ECDH for Carol to decrypt enc1).&#xA;&#xA;Thoughts?&#xA;Rusty.</html></oembed>