<oembed><type>rich</type><version>1.0</version><author_name>npub108dfgewsuqzm6cvllzmxsv0xnn69rrjnyg5pa32a727k89ndh3xqmsr4hp</author_name><author_url>https://nostr.ae/npub108dfgewsuqzm6cvllzmxsv0xnn69rrjnyg5pa32a727k89ndh3xqmsr4hp</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2016-01-08&#xA;📝 Original message:On Fri, Jan 8, 2016 at 4:38 AM, Gavin Andresen via bitcoin-dev&#xA;&lt;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt; On Fri, Jan 8, 2016 at 7:02 AM, Rusty Russell &lt;rusty at rustcorp.com.au&gt; wrote:&#xA;&gt;&gt;&#xA;&gt;&gt; Matt Corallo &lt;lf-lists at mattcorallo.com&gt; writes:&#xA;&gt;&gt; &gt; Indeed, anything which uses P2SH is obviously vulnerable if there is&#xA;&gt;&gt; &gt; an attack on RIPEMD160 which reduces it&#39;s security only marginally.&#xA;&gt;&gt;&#xA;&gt;&gt; I don&#39;t think this is true?  Even if you can generate a collision in&#xA;&gt;&gt; RIPEMD160, that doesn&#39;t help you since you need to create a specific&#xA;&gt;&gt; SHA256 hash for the RIPEMD160 preimage.&#xA;&gt;&gt;&#xA;&gt;&gt; Even a preimage attack only helps if it leads to more than one preimage&#xA;&gt;&gt; fairly cheaply; that would make grinding out the SHA256 preimage easier.&#xA;&gt;&gt; AFAICT even MD4 isn&#39;t this broken.&#xA;&gt;&#xA;&gt;&#xA;&gt; It feels like we&#39;ve gone over that before, but I can never remember where or&#xA;&gt; when. I believe consensus was that if we were using the broken MD5 in all&#xA;&gt; the places we use RIPEMD160 we&#39;d still be secure today because of Satoshi&#39;s&#xA;&gt; use of nested hash functions everywhere.&#xA;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; But just with Moore&#39;s law (doubling every 18 months), we&#39;ll worry about&#xA;&gt;&gt; economically viable attacks in 20 years.[1]&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; That&#39;s far enough away that I would choose simplicity, and have all SW&#xA;&gt;&gt; scriptPubKeys simply be &#34;&lt;0&gt; RIPEMD(SHA256(WP))&#34; for now, but it&#39;s&#xA;&gt;&gt; not a no-brainer.&#xA;&gt;&#xA;&gt;&#xA;&gt; Lets see if I&#39;ve followed the specifics of the collision attack correctly,&#xA;&gt; Ethan (or somebody) please let me know if I&#39;m missing something:&#xA;&gt;&#xA;&gt; So attacker is in the middle of establishing a payment channel with&#xA;&gt; somebody. Victim gives their public key, attacker creates the innocent&#xA;&gt; fund-locking script  &#39;2 V A 2 CHECKMULTISIG&#39; (V is victim&#39;s public key, A is&#xA;&gt; attacker&#39;s) but doesn&#39;t give it to the victim yet.&#xA;&gt;&#xA;&gt; Instead they then generate about 2^81scripts that are some form of&#xA;&gt; pay-to-attacker ....&#xA;&gt; ... wait, no that doesn&#39;t work, because SHA256 is used as the inner hash&#xA;&gt; function.  They&#39;d have to generate 2^129 to find a cycle in SHA256.&#xA;&#xA;For 2^80 they simply generate 2^80 scripts that look innocent, and&#xA;2^80 that are not. With high probability there is a collision. I agree&#xA;that most cryptanalysis won&#39;t work because of the nesting, but 2^80 is&#xA;not good.&#xA;&gt;&#xA;&gt; Instead, they .. what? I don&#39;t see a viable attack unless RIPEMD160 and&#xA;&gt; SHA256 (or the combination) suffers a cryptographic break.&#xA;&gt;&#xA;&gt;&#xA;&gt; --&#xA;&gt; --&#xA;&gt; Gavin Andresen&#xA;&gt;&#xA;&gt; _______________________________________________&#xA;&gt; bitcoin-dev mailing list&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&#xA;&#xA;&#xA;&#xA;-- &#xA;&#34;Man is born free, but everywhere he is in chains&#34;.&#xA;--Rousseau.</html></oembed>