<oembed><type>rich</type><version>1.0</version><title>lisa neigut [ARCHIVE] wrote</title><author_name>lisa neigut [ARCHIVE] (npub1sp…s64t2)</author_name><author_url>https://yabu.me/npub1sprhp66c693av0c0n9had046hcdcckp2th25fnmphwstc5e4wg9qxs64t2</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2020-02-10&#xA;📝 Original message:&#xA;Here&#39;s some thoughts I had on PoDLE&#39;s and lightning. An enormous&#xA;tip-of-the-hat is due to ZmnSCPxj for surfacing the work that JoinMarket&#xA;has done here already.&#xA;&#xA;- The initiating message (in the case of open channel, this would be&#xA;`open_channel2`) is extended to include an &#39;H2&#39; field in its TLV, a 32-byte&#xA;hash commitment to the P2 key.&#xA;- Only one H2 commitment is required.&#xA;- The `tx_add_input` message, as specified previously, is extended to an&#xA;include a TLV type. This must be present on the input addition that&#xA;corresponds with the UTXO used for the originally transmitted commitment&#xA;- The non-initiator SHOULD wait to send any `tx_add_input` messages of&#xA;their own until after receiving a `tx_add_input` message with a valid PoDLE&#xA;TLV extension.&#xA;&#xA;1. tlvs: `add_input_tlvs`&#xA;2. types:&#xA;    1. type: 1 (`proof_of_dle`)&#xA;    2. data:&#xA;        *[`64*byte`:`s||e`]&#xA;        *[`33*byte`:pubkey`]&#xA;        *[`33*byte`:pubkey2`]&#xA;&#xA;- If the proof is incorrect, the non-initiator MAY fail the transaction&#xA;collaboration or respond with `tx_complete`. There is no need for them to&#xA;publish the PoDLE.&#xA;- If the proof is correct, the non-initiator verifies that the commitment&#xA;(hash of pubkey2) has not been communicated to them via gossip.&#xA;- If the proof is not in their gossip store, the transaction collaboration&#xA;continues. It is considered &#39;safe&#39; for the non-initiator to send&#xA;`tx_add_input` to their peer.&#xA;- If the proof IS in their gossip store, the transaction collaboration&#xA;SHOULD reply with `tx_complete`. It is considered &#39;unsafe&#39; for the&#xA;non-initiator to send `tx_add_input`. (This allows errored/erroring&#xA;initiators to use blacklisted utxos, however it prevents them from privy to&#xA;any other nodes&#39; UTXO set.)&#xA;- The initiator MUST NOT remove the committed to UTXO from the&#xA;collaboration set.&#xA;&#xA;- If the transaction collaboration fails/is errored by the initiator,&#xA;    - the non-initiator SHOULD broadcast the original PoDLE commitment to&#xA;the gossip network.&#xA;    - the non-initiator MAY delay broadcast to allow the initiating node to&#xA;re-attempt the open.&#xA;&#xA;The gossip message for a PoDLE blacklist entry is as follows:&#xA;&#xA;1. type: 259 (`podle_blacklist`)&#xA;2. data:&#xA;    *[`signature`:`signature`]&#xA;    *[`32*byte`:`H2`]&#xA;    *[`point`:`node_id`]&#xA;    *[`u32`:`timestamp`]&#xA;&#xA;Note that the `node_id` is the id of the node that signs (and broadcasts)&#xA;the blacklisted PoDLE. h/t to ZmnSCPxj for the gossip construction.&#xA;The timestamp is added as a convenience for peers to trim/discard blacklist&#xA;participants as they wish depending on time/staleness.&#xA;&#xA;## Some Notes:&#xA;- The JoinMarket protocol allows nodes to use any of a range of secondary&#xA;points for J. Since the lightning version of this allows blacklisted UTXOs&#xA;to still open channels, albeit without participation from the peer, it&#xA;seems unnecessary to allow for more than one valid J point. I&#39;d propose&#xA;fixing the J the same zero-index point used by JoinMarket. This reduces the&#xA;number of valid H2&#39;s that are available for any given utxo set, while also&#xA;keeping blacklisted H2&#39;s compatible with the blacklist set generated by&#xA;JoinMarket implementations.&#xA;- The blacklist originates from the &#39;non-initiating&#39; peer, and does not&#xA;reveal the offending node&#39;s id.&#xA;- Assuming that every node honestly participates in the blacklist, only&#xA;verified H2&#39;s will be submitted to the blacklist&#xA;- A malicious non-initiator can only prevent an honest initiator from using&#xA;the committed UTXO for collaborative transactions; they won&#39;t prevent them&#xA;from successfully initiating a one-sided transaction with honest peers.&#xA;- Only nodes that have at least one public channel will be able to&#xA;contribute to the public PoDLE blacklist. This means it&#39;s possible for a&#xA;malicious initiator to grief non-public nodes without much consequence,&#xA;however this requires the ability to send inbound messages to private&#xA;nodes, i.e. more likely for a close or splice interaction.&#xA;- As ZmnSCPxj has pointed out elsewhere, a malicious peer could broadcast&#xA;junk H2&#39;s; it is acceptable to rate-limit the number of PoDLE blacklists&#xA;generated by a peer.peer&#xA;- It is possible for a malicious peer to fail to relay their `H2` entries&#xA;in the blacklisted gossip set.&#xA;- Duplicate H2 gossip should replace older timestamped versions.&#xA;- Elsewhere we&#39;ve had a discussion/concern over floods of PoDLE blacklist&#xA;messages. It&#39;s possible for gossip message floods to originate from a&#xA;malicious peer; they also might signal an ongoing probe attempt. Given a&#xA;timestamp and a rough measure of the number of utxos&#39; currently outstanding&#xA;in the mempool, however, it should be possible to distinguish the two.&#xA;&#xA;## Open Questions:&#xA;- Should PoDLE be required for every collaborative transaction (opens,&#xA;splices + closes), or only for opens? It seems reasonable to limit them&#xA;just to opens, as for all others you&#39;ll already have a shared UTXO with the&#xA;peer.&#xA;- Is fixing the generator point too restrictive? JoinMarket allows for a&#xA;range of acceptable NUMS (J) points (up to 256). The smaller the pool of&#xA;eligible J&#39;s, the smaller the pool of potential blacklisted PoDLE&#39;s (up to&#xA;no. NUMs * current utxo count). One upside to allowing a larger pool of J&#39;s&#xA;means that the same UTXO can be retried on failure. One downside to&#xA;allowing a pool of J&#39;s means that a single UTXO can be validly retried in a&#xA;probe attack against a variety of peers.&#xA;&#xA;On Thu, Jan 30, 2020 at 5:32 PM ZmnSCPxj &lt;ZmnSCPxj at protonmail.com&gt; wrote:&#xA;&#xA;&gt; Good morning darosior, ariard, niftynei, and list,&#xA;&gt;&#xA;&gt; &gt; We could also consider PoDLE as used in JoinMarket, which solves a&#xA;&gt; similar problem.&#xA;&gt; &gt;&#xA;&gt; https://gist.github.com/AdamISZ/9cbba5e9408d23813ca8#defence-2-committing-to-a-utxo-in-publicplaintext-at-the-start-of-the-handshake&#xA;&gt; &gt; Basically, a PoDLE commits to a UTXO, without being trivially grindable&#xA;&gt; from the UTXO set and also including a proof that the creator of the PoDLE&#xA;&gt; knows the secret key behind it.&#xA;&gt; &gt; It can later be opened to reveal which UTXO the opener allocated.&#xA;&gt; &gt; If the opener aborts (i.e. does not provide its signatures to the&#xA;&gt; funding transaction) then the acceptor can gossip the UTXO and the revealed&#xA;&gt; PoDLE as well to the rest of Lightning, so that the opener at least cannot&#xA;&gt; reuse the same UTXO to probe other potential acceptors.&#xA;&gt; &gt; (though, my understanding, there is no clear way to determine when we&#xA;&gt; can safely delete old PoDLEs: maybe each node can keep it around for a&#xA;&gt; month, which might be good enough to limit the practical ability of a snoop&#xA;&gt; to probe other nodes)&#xA;&gt; &gt; I believe JoinMarket also has solved the issue of allowing a UTXO to be&#xA;&gt; used at most N times (for example due to &#34;honest&#34; failures, such as&#xA;&gt; connectivity interruptions which might cause an abort of the protocol); I&#xA;&gt; think it involves appending a single byte to something that is hashed, and&#xA;&gt; ensuring its value is less than N, so that it can only be used from 0 to N&#xA;&gt; - 1 (and thus allow a UTXO to be used at most N times).&#xA;&gt; &gt;&#xA;&gt; &gt; Getting into contact with waxwing / Adam Gibson for this might be useful&#xA;&gt; to fill out how PoDLE works and so on; basically, I believe this issue is a&#xA;&gt; practically solved problem already for JoinMarket, though waxwing may be&#xA;&gt; able to provide a more nuanced opinion.&#xA;&gt;&#xA;&gt; I communicated with waxwing, and he said:&#xA;&gt;&#xA;&gt; * See also: https://joinmarket.me/blog/blog/poodle \[sic\].&#xA;&gt; * The counter I mentioned is implemented using the second generator point.&#xA;&gt;   * The PoDLE construction requires the standard base point `G`, and&#xA;&gt; another generator point `J`.&#xA;&gt;   * To create the generator point `J`, JoinMarket appends the counter byte&#xA;&gt; (the one used to limit N number of uses of the same UTXO) to `G`, hashes&#xA;&gt; it, then uses a coerce-to-point.&#xA;&gt; * PoDLE is sometimes called DLEQ elsewhere.&#xA;&gt; * There is no concrete answer on &#34;when to delete old PoDLE&#34;; JoinMarket&#xA;&gt; never deletes (though they might if throughput increases).&#xA;&gt; * Watermarks like `nLockTime`, `nSequence`, `nVersion` are currently fixed&#xA;&gt; values; JoinMarket sees no reason to change this since equal-valued&#xA;&gt; CoinJoins are otherwise obvious to chain analysis anyway.&#xA;&gt;   * But note: JoinMarket implements PayJoin, which is not otherwise&#xA;&gt; obvious onchain, and does indeed do anti-fee-sniping emulation for PayJoin.&#xA;&gt;   * JoinMarket also strives to make similar feerates across users.&#xA;&gt;&#xA;&gt; In any case, for myself, my thoughts are:&#xA;&gt;&#xA;&gt; * I observe that our use-case is quite similar to a PayJoin:&#xA;&gt;   * The opener proposes to make a payment (to a channel between the opener&#xA;&gt; and the acceptor, rather than outright giving control to the acceptor as in&#xA;&gt; PayJoin).&#xA;&gt;   * The acceptor adds some UTXOs which will contribute to the payment&#xA;&gt; output (i.e. the channel).&#xA;&gt;   * This probably does mean we want to later consider `nLockTime`&#xA;&gt; anti-fee-sniping as well in multi-funded channel opens.&#xA;&gt; * Speaking of multi-funded channel opens, it seems to me this interactive&#xA;&gt; tx construction mechanism as well can be later used for channel factories.&#xA;&gt;   * Similarly, PoDLE techniques would be useful as well to multi-funded&#xA;&gt; channel factories.&#xA;&gt; * It would probably be a good idea to share PoDLE format with JoinMarket&#xA;&gt; so we can share PoDLE with them (there could be bridges that share PoDLE&#xA;&gt; between a JoinMarket maker and a Lightning node, and each network already&#xA;&gt; has its own gossip protocols, so LN just needs a gossip protocol for&#xA;&gt; sharing PoDLEs as well).&#xA;&gt; * Probably we can mandate in some BOLT spec to retain PoDLE for at least a&#xA;&gt; year or a month or two weeks or so, which should be enough to slow down&#xA;&gt; probe attempts.&#xA;&gt;&#xA;&gt; Regards,&#xA;&gt; ZmnSCPxj&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200210/047f7af7/attachment.html&gt;</html></oembed>