<oembed><type>rich</type><version>1.0</version><title>Lloyd Fournier [ARCHIVE] wrote</title><author_name>Lloyd Fournier [ARCHIVE] (npub1kh…y05yp)</author_name><author_url>https://yabu.me/npub1khlhcuz0jrjwa0ayznq2q9agg4zvxfvx5x7jljrvwnpfzngrcf0q7y05yp</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2021-01-28&#xA;📝 Original message:&#xA;On Wed, Jan 20, 2021 at 12:34 PM Rusty Russell &lt;rusty at rustcorp.com.au&gt;&#xA;wrote:&#xA;&#xA;&gt;&#xA;&gt;&#xA;&gt; Yes, sorry.  I assumed immediate broadcast + 60 second wait for&#xA;&gt; conflicts.  It&#39;s this scheme I was trying to shoehorn into the mempool&#xA;&gt; (broadcast signalling tx, wait, try to RBF it with a real open).  But&#xA;&gt; there are three problems with doing that:&#xA;&gt;&#xA;&gt; 1. Everyone knows what you&#39;re doing, as they see the signalling tx (and&#xA;&gt;    it needs to commit to a challenge, such as using OP_RETURN, so you&#xA;&gt;    can&#39;t simply reuse the same tx).&#xA;&gt; 2. Bitcoind doesn&#39;t tell you if it encounters a conflicting tx from a&#xA;&gt;    peer, so we&#39;d probably need to gossip this via lightning instead.&#xA;&gt; 3. If tx fees are low, the signalling tx might get mined.&#xA;&gt;&#xA;&#xA;I think immediate broadcast of signaling TX is a bad idea even if it&#39;s done&#xA;over lightning since it leaks that the UTXO associated with the signaling&#xA;TX is creating a channel (even if the channel was meant to be private).&#xA;You could argue that the signaling TX need not be associated with a UTXO&#xA;but I find this awkward.&#xA;Lazily broadcast, signaling txs are a good way to protect against&#xA;sequential attacks but are weak against parallel attacks. Unfortunately I&#xA;think protection of the former means very little without the latter.&#xA;&#xA;&#xA;&gt;&#xA;&gt; &gt; There are several (perhaps addressable) downsides to this scheme but it&#xA;&gt; at&#xA;&gt; &gt; least has better protection against parallel attacks than the others.&#xA;&gt; &gt; Since it is effective it would also break the &#34;middleman&#34; idea unless&#xA;&gt; Alice&#xA;&gt; &gt; funds with two utxos (a different h2 for each party) or there is some way&#xA;&gt; &gt; for all parties involved in the funding to distinguish gossiped h2s from&#xA;&gt; &gt; their funding session from others.&#xA;&gt;&#xA;&gt; Yes, every initiator needs to provide an h2, and it has to be their own.&#xA;&gt; But you don&#39;t care (and can&#39;t know) that there&#39;s an h2 for another&#xA;&gt; input, too.  If Alice wants to initialte an open with Carol while Bob is&#xA;&gt; initiating an opening with her, she&#39;s got to provide her own UTXO &amp;&#xA;&gt; PoDLE.&#xA;&gt;&#xA;&gt; Another point: the idea was that the accepting node would sign the&#xA;&gt; gossip msg, and only known nodes (i.e. ones with a public channel) would&#xA;&gt; be allowed to do so.  This gives easy anti-spam: if Alice starts&#xA;&gt; spamming a giant pile of h2s, we start randomly dropping them.  That&#xA;&gt; doesn&#39;t degrade the protection much: a single UTXO reuse might slip&#xA;&gt; through, but a larger number would still be detected with P approaching&#xA;&gt; 1.&#xA;&gt;&#xA;&gt;&#xA;Ok since it appears eagerly broadcasted PoDLEs are the only proposal that&#xA;can protect against parallel attacks let&#39;s try and put the best version of&#xA;it forward.&#xA;Here&#39;s my shot.&#xA;&#xA;Let H0 and H1 be 32-byte output hash functions.&#xA;&#xA;1. In any of the `tx_add_input` messages the initiator may attach a PoDLE&#xA;which contains the public key for an input as well as a P2 (the public key&#xA;projected onto a different generator).&#xA;2. Upon receiving the PoDLE, the peer checks its validity and creates a&#xA;&#34;claim&#34; message claiming the UTXO which contains.&#xA;    i) H0(P2)&#xA;    ii) A MAC (e.g. Poly1305) produced with the H1(P2) as the key and&#xA;claimer_node_id as the message -- required so conflicting claim messages&#xA;can only be produced by someone who actually knows P2.&#xA;    iii) The claimer_node_id and a BIP340 signature under it over the rest&#xA;of the message data -- required to stop spam: only accept and re-broadcast&#xA;these messages from nodes who have real channels.&#xA;   The peer broadcasts this claim message if they haven&#39;t before received a&#xA;valid claim message with H0(P2) and a valid MAC.&#xA;3. Any node receiving the claim message checks whether it has seen it&#xA;already (same H0(P2) and MAC). If not, checks the signature against&#xA;claimer_node_id and checks whether that node is valid (or perhaps&#xA;blacklisted because it has spammed too many claim messages recently),&#xA;stores (H0(P2), MAC, claimer_node_id) it and re-broadcasts the message to&#xA;its peers.&#xA;4. The claiming node waits ~60 seconds to see if it receives a conflicting&#xA;claim message where the H0(P2) is the same and the MAC is different and&#xA;valid. If they don&#39;t receive that then they carry on to add their own utxos.&#xA;&#xA;I believe this does guarantee what we wanted: an attacker will only be able&#xA;to do the attack once per UTXO. This is better than I expected to find at&#xA;the beginning of entering into this subject!&#xA;This certainly seems to be the strongest in the class of solutions.&#xA;&#xA;Now I&#39;d like to make the strongest possible argument against it in favor of&#xA;just doing nothing (for now) at the protocol level about this problem.&#xA;&#xA;Consider the following propositions:&#xA;1. The public nodes that will offer dual funding and are susceptible to&#xA;this attack will be the kind that have a lot of churn i.e. they dual fund a&#xA;channel, when that closes they use the remaining funds to fund another&#xA;channel.&#xA;2. Chainalysis already works very well at identifying the UTXOs these kinds&#xA;of nodes. If the change output of a funding or the closing output are&#xA;reused in another public channel it is easy to identify which node was&#xA;funding what with the techniques in [1,2].&#xA;3. It is therefore rather redundant to do this type of active UTXO probing&#xA;since all you need to do is wait and be patient. Churning public nodes will&#xA;eventually use their UTXO to do a dual or single funding. Then by&#xA;cross-layer de-anonymization techniques you will be able to determine that&#xA;they owned that UTXO without ever interacting with the node.&#xA;4. These techniques can even be applied to private channels at least while&#xA;they are identifiable on the blockchain (in [2] using chainalysis they can&#xA;identify one node involved in a private channel 79% of the time).&#xA;5. There is of course some extra advantage in doing this attack but looking&#xA;at the effectiveness of techniques in [1,2] and my intuition about how&#xA;churning nodes are most susceptible to these techniques I *guess* it&#xA;wouldn&#39;t be much. If this is the case then chainalysis companies may not be&#xA;able to justify  doing active attacks when passive attacks work almost as&#xA;well.&#xA;6. It may be more effective to deal with UTXO probing outside of the&#xA;protocol. For example, a group of dual-funders could maintain a shared UTXO&#xA;blacklist and use chainalysis on it to not only ban single UTXOs but entire&#xA;clusters of outputs. i.e. do chainalysis on the chainalyzers! There are&#xA;some efforts to create open tools to do Chainalysis [3] that could be&#xA;leveraged against this attack. This might be much more effective than&#xA;PoDLEs as just spending the output somewhere else would not be enough to&#xA;use it again in the attack.&#xA;7. The above PoDLE proposal actually creates a new extra bit of data that&#xA;can be used for chainalysis -- when you broadcast the claim message you are&#xA;saying you&#39;re going to make a dual funded channel sometime soon. So&#xA;Chainalysis can look in the next block for something that looks like a dual&#xA;funding and know you participated. This could be quite valuable for them&#xA;and I would hesitate to give it to them in the anticipation of them doing&#xA;an attack they may never actually do.&#xA;8. If all of the above points are not enough to prevent this attack from&#xA;being widespread and the above PoDLE proposal is still the best idea I&#xA;guess it wouldn&#39;t be too hard to shoehorn it into the protocol later.&#xA;&#xA;At the moment my bias is towards doing nothing and keeping things simple.&#xA;It seems chainalysis techniques are effective at associating funding UTXOs&#xA;to nodes for the most common usage patterns. Taproot will change the game&#xA;for private channels but won&#39;t do much for public channels.&#xA;Having said that -- it was a thing in JoinMarket so I might be wrong. I can&#xA;offer some conjecture as to why JoinMarket had this issue: if you can find&#xA;all the maker UTXOs before and after a join then you have removed a lot of&#xA;the anonymity set. Since CoinJoin is a UTXO privacy technology this makes&#xA;sense.&#xA;&#xA;[1] https://arxiv.org/abs/2007.00764&#xA;[2] https://arxiv.org/pdf/2003.12470.pdf&#xA;[3] https://graphsense.info/&#xA;&#xA;I am told there is a new revision of [1] coming out any day now that will&#xA;present a few more tricks and have contributions directly from a scientist&#xA;at Chainalsysis (the company).&#xA;&#xA;Cheers,&#xA;&#xA;LL&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20210128/1f7d828d/attachment.html&gt;</html></oembed>