<oembed><type>rich</type><version>1.0</version><title>Anthony Towns [ARCHIVE] wrote</title><author_name>Anthony Towns [ARCHIVE] (npub17r…x9l2h)</author_name><author_url>https://yabu.me/npub17rld56k4365lfphyd8u8kwuejey5xcazdxptserx03wc4jc9g24stx9l2h</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2021-10-09&#xA;📝 Original message:&#xA;On Sat, Oct 09, 2021 at 12:21:03PM +0000, Jonas Nick wrote:&#xA;&gt; it seems like parts of this proposal rely on deterministic nonces in MuSig.&#xA;&#xA;The &#34;deterministic&#34; nonces are combined with &#34;recoverable&#34; nonces via&#xA;musig2, so I think that part is a red-herring?&#xA;&#xA;They&#39;re &#34;deterministic&#34; in the sense that the person who generated the&#xA;nonce needs to be able to recover the secret/dlog for the nonce later,&#xA;without having to store unique randomness for it. Thinking about it,&#xA;I think you could make the &#34;deterministic&#34; nonce secrets be&#xA;&#xA;   H( private-key, msg, other-party&#39;s-nonce-pair, 1 )&#xA;   H( private-key, msg, other-party&#39;s-nonce-pair, 2 )&#xA;&#xA;because you only need to recover the secret if the other party posts a&#xA;sig for a revoked transaction, in which case you can lookup their nonce&#xA;directly anyway. And you&#39;re choosing your &#34;deterministic&#34; nonce after&#xA;knowing what their (&#34;revocable&#34;) nonce is, so can include it in the hash.&#xA;&#xA;As far as the revocable nonce goes, you should only be generating a&#xA;single signature based on that, since that&#39;s used to finish things off&#xA;and post the tx on chain.&#xA;&#xA;&gt; Generally, this is insecure unless combined with heavy machinery that proves&#xA;&gt; correctness of the nonce derivation in zero knowledge. If one signer uses&#xA;&gt; deterministic nonces and another signer uses random nonces, then two signing&#xA;&gt; sessions will have different challenge hashes which results in nonce reuse by&#xA;&gt; the first signer [0]. Is there a countermeasure against this attack in the&#xA;&gt; proposal? What are the inputs to the function that derive DA1, DA2? Is the&#xA;&gt; assumption that a signer will not sign the same message more than once?&#xA;&#xA;I had been thinking DA1,DA2 = f(seed,n) where n increases each round, but I&#xA;think the above would work and be an improvement. ie:&#xA;&#xA;   Bob has a shachain based secret generator, producing secrets s_0 to&#xA;   s_(2**48). If you&#39;ve seen s_0 to s_n, you only need to keep O(log(n))&#xA;   of those values to regenerate all of them.&#xA;&#xA;   Bob generates RB1_n and RB2_n as H(s_n, 1)*G and H(s_n, 2)*G and sends&#xA;   those values to Alice.&#xA;&#xA;   Alice determines the message (ie, the transaction), and sets da1_n&#xA;   and da2_n as H(A_priv, msg, RB1_n, RB2_n, 1) and H(A_priv, msg, RB1_n,&#xA;   RB2_n, 2). She then calculates k=H(da1_n, da2_n, RB1_n, RB2_n), and&#xA;   signs for her nonce which da1_n+k*da2_n, and sends da1_n*G and&#xA;   da2_n*G and the partial signature to Bob.&#xA;&#xA;   Bob checks and records Alice&#39;s musig2 derivation and partial signature,&#xA;   but does not sign himself.&#xA;&#xA;   _If_ Bob wants to close the channel and publish the tx, he completes&#xA;   the signature by signing with nonce RB1_n + k*RB2_n.&#xA;&#xA;If you can convince Bob to close the channel repeatedly, using the&#xA;same nonce pair, then he&#39;ll have problems -- but if you can do that,&#xA;you can probably trick him into closing the channel with old state,&#xA;which gives him the same problems by design... Or that&#39;s my take.&#xA;&#xA;&gt; It may be worth pointing out that an adaptor signature scheme can not treat&#xA;&gt; MuSig2 as a black box as indicated in the &#34;Adaptor Signatures&#34; section [1].&#xA;&#xA;Hmm, you had me panicking that I&#39;d been describing how to combine the&#xA;two despite having decided it wasn&#39;t necessary to combine them... :)&#xA;&#xA;(I figured doing musig for k ptlcs for every update would get old fast --&#xA;if you maxed the channel out with ~400 inflight ptlcs you&#39;d be exchanging&#xA;~800 nonces for every update. OTOH, I guess that&#39;s the only thing you&#39;d&#xA;be saving, and the cost is ~176 bytes of extra witness data per ptlc...&#xA;Hmm...)&#xA;&#xA;Cheers,&#xA;aj</html></oembed>