<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-11&#xA;📝 Original message:&#xA;&gt; s = k + H(kG || kJ || P || P2 || utxo || receiving-node) x&#xA;&#xA;&gt; and as before transfer opening: (P, P2, u, s, e) with receiving-node&#xA;implicitly reconstructed to do the verification of the Schnorr sig. It&#39;s&#xA;basically a message in a signature.&#xA;&#xA;Oh that&#39;s *much* nicer than calculating a second commitment. Verification&#xA;by any node that&#39;s not the intended recipient will fail, as they&#39;ll use the&#xA;wrong node_id (their own).&#xA;&#xA;It seems unnecessary to me to commit to the utxo, since the pubkey pair&#xA;effectively does that. What&#39;s the motivation for including it? Though, now&#xA;that I think about it, it does seem imperative to verify that the pubkey&#xA;provided is in fact locked to by the utxo script, which we can do since the&#xA;script will have been provided in the `tx_add_input` message.&#xA;&#xA;Seems worth nothing that, given such a proof, you can grind to find out who&#xA;the intended node was. However, if the failure is indeed because of the&#xA;&#34;venus flytrap&#34; attack I mentioned above, it&#39;d pretty obviously be the node&#xA;sending you the invalid signature (or a node that they spoofed/MITM&#39;d),&#xA;which isn&#39;t much of a leak.  Actually, this &#39;grindability&#39; might be quite&#xA;useful for finding the originator of the attack, if needed. There&#39;s no&#xA;reason for you to leak a PoDLE signature, but if you do you&#39;re&#xA;potentially tying an H2 commitment offer to your node id. Seems very nice&#xA;indeed!&#xA;&#xA;One of the stated goals of implementing PoDLEs was to be &#34;compatible with&#xA;JoinMarket&#34;, but I believe this compatibility goal only extends as far as&#xA;the H2 construction (and not the proof), so we&#39;re ok there with this tweak.&#xA;&#xA;Cheers!&#xA;niftynei&#xA;&#xA;On Tue, Feb 11, 2020 at 10:05 AM AdamISZ via Lightning-dev &lt;&#xA;lightning-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&#xA;&gt; niftynei, ZmnSCPxj and list:&#xA;&gt;&#xA;&gt;&#xA;&gt; Zmn** pinged me about this discussion and I thought I could add something&#xA;&gt; directly:&#xA;&gt;&#xA;&gt;&#xA;&gt; First, re:&#xA;&gt; &gt; I&#39;d like to propose that we add a second commitment requirement to the&#xA;&gt; PoDLE that JoinMarket uses, to limit the use of a commitment&#39;s validity to&#xA;&gt; be only between an initiator and a single peer. Otherwise you can enable&#xA;&gt; something I&#39;ll call the &#34;pouncing venus-flytrap attack&#34;[1].&#xA;&gt;&#xA;&gt; Here&#39;s some thoughts that may give context to this (excellent) observation:&#xA;&gt;&#xA;&gt; This issue didn&#39;t crop up (well, kinda! I do remember discussion about it)&#xA;&gt; in our use case because takers always send out to 5-12 (typically) makers&#xA;&gt; at once, and the HP2 only needs to get broadcast by one to stop any reuse.&#xA;&gt; But whichever way you look at it, it&#39;s a very good point! And in LN case,&#xA;&gt; seems like a very substantial attack (certainly no question it could be&#xA;&gt; allowed for 2 party protocol).&#xA;&gt;&#xA;&gt; In case a brief summary of JM mechanism is helpful, I added some info on&#xA;&gt; the the taker-maker conversation at the end of this mail [1].&#xA;&gt;&#xA;&gt; Second, re:&#xA;&gt; &gt; ## Mitigation&#xA;&gt; &gt; Have each initiator provide two commitments: one to the shared/global J&#xA;&gt; &gt; point and one to a point that is found from the hash of the&#xA;&gt; non-initiating&#xA;&gt; &gt; node&#39;s node_id.[2]&#xA;&gt;&#xA;&gt; I get the thinking here, and it makes a lot of sense, but I do think it&#xA;&gt; can be done more compactly.&#xA;&gt; If the commitment is H(P2), the opening of the commitment could be altered&#xA;&gt; to include the receiving node:&#xA;&gt;&#xA;&gt; s = k + H(kG || kJ || P || P2 || utxo || receiving-node) x&#xA;&gt;&#xA;&gt; and as before transfer opening: (P, P2, u, s, e) with receiving-node&#xA;&gt; implicitly reconstructed to do the verification of the Schnorr sig. It&#39;s&#xA;&gt; basically a message in a signature.&#xA;&gt;&#xA;&gt; As you note, we wouldn&#39;t want to ban usage of a H(P2) value based on an&#xA;&gt; incorrect opening; we just use that failure to decide to not hand over our&#xA;&gt; utxo information (as receiver of the commitment). But unless I missed&#xA;&gt; something, doing it the above way is the more logical/compact choice.&#xA;&gt;&#xA;&gt; Seems like there&#39;s a lot of fine nuance here. A malicious counterparty can&#xA;&gt; always choose to blacklist. In Joinmarket we accept (because of our&#xA;&gt; stringent no-identity policy) some roughness and assume some meaningful&#xA;&gt; level of honest participation. A Taker issuing a request to 10 cps hopes&#xA;&gt; that at least some number (min 4 by default) will actually respond to an&#xA;&gt; honest request; if say 8 of 10 do so, he will do the coinjoin with those.&#xA;&gt; That it is brittle or flaky is why we allow 3 tries for each qualifying&#xA;&gt; utxo (qualified on age, size), and also allow custom insertion of&#xA;&gt; additional utxos (although it&#39;s rarely if ever needed). It works fine in&#xA;&gt; practice, for now, but it is not watertight; if you have overwhelmingly&#xA;&gt; malicious counterparties you are kinda screwed from other angles, as well&#xA;&gt; as this one. Meanwhile on the Maker side we&#39;re trying to create a kind of&#xA;&gt; &#39;herd immunity&#39;; as long as some few of them are honest, word will get out&#xA;&gt; about used commitments which will stop free spam queries,&#xA;&gt;   at least (but it&#39;s not a super strong defence!).&#xA;&gt;&#xA;&gt;&#xA;&gt; [1] Taker-Maker convo (excerpt); some notes re: commitments/PoDLE.&#xA;&gt; ===&#xA;&gt; !fill amount, oid, commitment (HP2)&#xA;&gt; -- this is where a taker sends to each maker an hp2 value. This is the&#xA;&gt; step intended to enforce scarcity, and the assumption in JM was always that&#xA;&gt; this would basically inevitably get shared. Because there are typically&#xA;&gt; 5-12 makers involved, this seemed a reasonably safe assumption.&#xA;&gt; If the commitment value is already used and thus not valid, it gets&#xA;&gt; broadcast immediately. If it&#39;s not, it only gets shared as part of the&#xA;&gt; !ioauth step below.&#xA;&gt;&#xA;&gt; !pubkey key&#xA;&gt;&#xA;&gt; -- this is just the maker giving an ephemeral key for the encryption&#xA;&gt;&#xA;&gt; !auth (s, e, u, P, P2)&#xA;&gt; -- (encrypted) this is the taker opening the above commitment. It&#39;s rather&#xA;&gt; weird at first sight, because he is opening immediately after committing,&#xA;&gt; with apparently no step inbetween; but in fact the implicit intermediate&#xA;&gt; step is the broadcast (exactly what is being questioned with &#39;venus&#xA;&gt; flytrap&#39;).&#xA;&gt;&#xA;&gt; !ioauth maker-utxo-data&#xA;&gt; -- notice the maker is only sending this utxo data (encrypted of course)&#xA;&gt; after proof of ownership of the utxo above.&#xA;&gt; It&#39;s only at this step that the hp2 commitment value is (a) added to the&#xA;&gt; maker&#39;s local &#34;used up&#34; list, and (b)privmsged to 1  randomly chosen other&#xA;&gt; bots in the trading pit, who then pubmsgs it to everyone (and that happens&#xA;&gt; multiple times because multiple makers in tx), and they in turn record it&#xA;&gt; as &#34;used&#34;.&#xA;&gt;&#xA;&gt; The mechanism is both not very strong - we use 3 allowed attempts per utxo&#xA;&gt; - and imperfect in its &#34;justice&#34;; such commitments can be &#34;used up&#34; by&#xA;&gt; failures of one&#39;s counterparties. But it does serve to stop trivial global&#xA;&gt; snooping, and doesn&#39;t cost anything in terms of identity or locked funds,&#xA;&gt; so it has served a purpose (we did actually see such attacks before it, and&#xA;&gt; not after it).&#xA;&gt;&#xA;&gt; I&#39;d also note that in terms of the venus flytrap attack mentioned, there&#xA;&gt; could be a small time window between one maker receiving !auth and at least&#xA;&gt; one other honest maker getting to broadcast step at !ioauth; while I don&#39;t&#xA;&gt; think that&#39;s very practical in our use case, it is for sure a theoretical&#xA;&gt; concern and removing it could be either slightly, or extremely, important&#xA;&gt; in another use case.&#xA;&gt;&#xA;&gt; Thanks,&#xA;&gt; Adam Gibson/waxwing/AdamISZ&#xA;&gt;&#xA;&gt; Sent with ProtonMail Secure Email.&#xA;&gt;&#xA;&gt;&#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/20200211/d140fadd/attachment-0001.html&gt;</html></oembed>