<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated></updated>
  <generator>https://nostr.ae</generator>

  <title>Nostr notes by </title>
  <author>
    <name></name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://nostr.ae/npub1nf4hx3yuahf4awyzsdfzh6gelr8ef4d8yqeker5y8sku64k48c7qcgkps5.rss" />
  <link href="https://nostr.ae/npub1nf4hx3yuahf4awyzsdfzh6gelr8ef4d8yqeker5y8sku64k48c7qcgkps5" />
  <id>https://nostr.ae/npub1nf4hx3yuahf4awyzsdfzh6gelr8ef4d8yqeker5y8sku64k48c7qcgkps5</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://nostr.ae/nevent1qqst3jatzrtsjvf6y95pygasg48v7mdthk7lj07jvegpkcewjeg0sgqzyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrckm9nnj</id>
    
      <title type="html">📅 Original date posted:2017-03-19 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqst3jatzrtsjvf6y95pygasg48v7mdthk7lj07jvegpkcewjeg0sgqzyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrckm9nnj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsylm8k9s6epz63gv2e5sn3xtztsqrskjntgksce4vjyqzqclrrm2c2ghhd8&#39;&gt;nevent1q…hhd8&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-03-19&lt;br/&gt;📝 Original message:&amp;gt; On Mar 19, 2017, at 7:00 AM, bitcoin-dev-request at lists.linuxfoundation.org wrote:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; GitHub doesn&amp;#39;t allow people to have multiple accounts last I checked.&lt;br/&gt;&lt;br/&gt;GitHub doesn’t allow email addresses to have multiple accounts.&lt;br/&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170319/55fab487/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170319/55fab487/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T17:57:22Z</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsg9d7qwwtxcx3wvgs3a4wvaz6hgfhz4q4ahpxchn4awxsu8282tcgzyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrclg3wrm</id>
    
      <title type="html">📅 Original date posted:2017-02-26 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsg9d7qwwtxcx3wvgs3a4wvaz6hgfhz4q4ahpxchn4awxsu8282tcgzyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrclg3wrm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgcprry56nkq9wud2wkyqmvxz99l8cnysgumv5zaey2hep0r5j6rq6e0k8g&#39;&gt;nevent1q…0k8g&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-02-26&lt;br/&gt;📝 Original message:Hi Pieter,&lt;br/&gt;&lt;br/&gt;&amp;gt; On Feb 25, 2017, at 4:14 PM, Pieter Wuille &amp;lt;pieter.wuille at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Any alternative to move us away from RIPEMD160 would require:&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;lt;snipped&amp;gt;&lt;br/&gt;&lt;br/&gt;“Any alternative”? What about reverting to:&lt;br/&gt;&lt;br/&gt;[&amp;lt;public_key&amp;gt;, OP_CHECKSIG]&lt;br/&gt;&lt;br/&gt;or perhaps later&lt;br/&gt;&lt;br/&gt;[&amp;lt;“compressed” public_key&amp;gt;, OP_CHECKSIG]&lt;br/&gt;&lt;br/&gt;This appears to get away from the issue without introducing a lot of other concerns?&lt;br/&gt;&lt;br/&gt;(IIRC the RIPEMD thing was justified on convenience and compactness).&lt;br/&gt;&lt;br/&gt;Could that be the alternative?&lt;br/&gt;&lt;br/&gt;/s
    </content>
    <updated>2023-06-07T17:56:46Z</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsw9mmmntdy2ucxkxz5mnklsxm88pd4re4nkyzsu230cv5ywyq0zpgzyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrcrat3m6</id>
    
      <title type="html">📅 Original date posted:2017-02-25 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsw9mmmntdy2ucxkxz5mnklsxm88pd4re4nkyzsu230cv5ywyq0zpgzyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrcrat3m6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsttrgjfp0s02vtu2s86fmx7y7z82nwhphepnr59kz4wz0u96lk4sgneazh0&#39;&gt;nevent1q…azh0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-02-25&lt;br/&gt;📝 Original message:Hi Peter,&lt;br/&gt;&lt;br/&gt;&amp;gt; On Feb 25, 2017, at 3:40 PM, Peter Todd &amp;lt;pete at petertodd.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; On Sat, Feb 25, 2017 at 03:34:33PM -0600, Steve Davis wrote:&lt;br/&gt;&amp;gt;&amp;gt; Yea, well. I don’t think it is ethical to post instructions without an associated remediation (BIP) if you don’t see the potential attack.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I can&amp;#39;t agree with you at all there: we&amp;#39;re still at the point where the&lt;br/&gt;&amp;gt; computational costs of such attacks limit their real-world impact, which is&lt;br/&gt;&amp;gt; exactly when you want the *maximum* exposure to what they are and what the&lt;br/&gt;&amp;gt; risks are, so that people develop mitigations.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;I agree with the latter part of your statement but am actually much less confident about the first part… I need to run some numbers on that.&lt;br/&gt;&lt;br/&gt;&amp;gt; Keeping details secret tends to keep the attacks out of public view, which&lt;br/&gt;&amp;gt; might be a good trade-off in a situation where the attacks are immediately&lt;br/&gt;&amp;gt; practical and the need to deploy a fix is well understood. But we&amp;#39;re in the&lt;br/&gt;&amp;gt; exact opposite situation.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; I was rather hoping that we could have a fuller discussion of what the best practical response would be to such an issue?&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Deploying segwit&amp;#39;s 256-bit digests is a response that&amp;#39;s already fully coded and&lt;br/&gt;&amp;gt; ready to deploy, with the one exception of a new address format. That address&lt;br/&gt;&amp;gt; format is being actively worked on, and could be deployed relatively quickly if&lt;br/&gt;&amp;gt; needed.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;I really, really don’t want to get into it but segwit has many aspects that are less appealing, not least of which being the amount of time it would take to reach the critical mass. &lt;br/&gt;&lt;br/&gt;Surely there&amp;#39;s a number of alternative approaches which could be explored, even if only to make a fair assessment of a best response?&lt;br/&gt;&lt;br/&gt;/s
    </content>
    <updated>2023-06-07T17:56:45Z</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsze4pkax8xcysjcxz9g8xx6n4zquxr9kvtnqmd6dm6z34yl4x0pvgzyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrcv4ardg</id>
    
      <title type="html">📅 Original date posted:2017-02-25 📝 Original message:Yea, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsze4pkax8xcysjcxz9g8xx6n4zquxr9kvtnqmd6dm6z34yl4x0pvgzyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrcv4ardg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9a5wpljhxsf228vtt0h6m0cg9xzn4zjk3rxwhlwd7xnny674gwfsdeat6j&#39;&gt;nevent1q…at6j&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-02-25&lt;br/&gt;📝 Original message:Yea, well. I don’t think it is ethical to post instructions without an associated remediation (BIP) if you don’t see the potential attack.&lt;br/&gt;&lt;br/&gt;I was rather hoping that we could have a fuller discussion of what the best practical response would be to such an issue?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; On Feb 25, 2017, at 3:21 PM, Dave Scotese &amp;lt;dscotese at litmocracy.com&amp;gt; wrote:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I was under the impression that RIPEMD160(SHA256(msg)) is used to turn a PUBLIC key (msg) into a bitcoin address, so yeah, you could identify ANOTHER (or the same, I guess - how would you know?) public key that has the same bitcoin address if RIPEMD-160 collisions are easy, but I don&amp;#39;t see how that has any effect on anyone.  Maybe I&amp;#39;m restating what Peter wrote.  If so, confirmation would be nice.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; On Sat, Feb 25, 2017 at 1:04 PM, Peter Todd via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org &amp;lt;mailto:bitcoin-dev at lists.linuxfoundation.org&amp;gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; On Sat, Feb 25, 2017 at 03:53:12PM -0500, Russell O&amp;#39;Connor wrote:&lt;br/&gt;&amp;gt; &amp;gt; On Sat, Feb 25, 2017 at 2:12 PM, Peter Todd via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt; &amp;gt; bitcoin-dev at lists.linuxfoundation.org &amp;lt;mailto:bitcoin-dev at lists.linuxfoundation.org&amp;gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; On Sat, Feb 25, 2017 at 11:10:02AM -0500, Ethan Heilman via bitcoin-dev&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;SHA1 is insecure because the SHA1 algorithm is insecure, not because&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 160bits isn&amp;#39;t enough.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; I would argue that 160-bits isn&amp;#39;t enough for collision resistance.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Assuming&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; RIPEMD-160(SHA-256(msg)) has no flaws (i.e. is a random oracle),&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; collisions&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; That&amp;#39;s something that we&amp;#39;re well aware of; there have been a few&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; discussions on&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; this list about how P2SH&amp;#39;s 160-bits is insufficient in certain use-cases&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; such&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; as multisig.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; However, remember that a 160-bit *security level* is sufficient, and&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; RIPEMD160&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; has 160-bit security against preimage attacks. Thus things like&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; pay-to-pubkey-hash are perfectly secure: sure you could generate two&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; pubkeys&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; that have the same RIPEMD160(SHA256()) digest, but if someone does that it&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; doesn&amp;#39;t cause the Bitcoin network itself any harm, and doing so is&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; something&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; you choose to do to yourself.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Be aware that the issue is more problematic for more complex contracts.&lt;br/&gt;&amp;gt; &amp;gt; For example, you are building a P2SH 2-of-2 multisig together with someone&lt;br/&gt;&amp;gt; &amp;gt; else if you are not careful, party A can hand their key over to party B,&lt;br/&gt;&amp;gt; &amp;gt; who can may try to generate a collision between their second key and&lt;br/&gt;&amp;gt; &amp;gt; another 2-of-2 multisig where they control both keys. See&lt;br/&gt;&amp;gt; &amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-January/012205.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-January/012205.html&lt;/a&gt; &amp;lt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-January/012205.html&amp;gt&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-January/012205.html&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I&amp;#39;m very aware of that, in fact I think I may have even been the first person&lt;br/&gt;&amp;gt; to post on this list the commit-reveal mitigation.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Note how I said earlier in the message you&amp;#39;re replying to that &amp;#34;P2SH&amp;#39;s 160-bits&lt;br/&gt;&amp;gt; is insufficient in certain use-cases such as multisig&amp;#34;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://petertodd.org&#34;&gt;https://petertodd.org&lt;/a&gt; &amp;lt;&lt;a href=&#34;https://petertodd.org/&amp;gt&#34;&gt;https://petertodd.org/&amp;gt&lt;/a&gt;; &amp;#39;peter&amp;#39;[:-1]@petertodd.org &amp;lt;&lt;a href=&#34;http://petertodd.org/&amp;gt&#34;&gt;http://petertodd.org/&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org &amp;lt;mailto:bitcoin-dev at lists.linuxfoundation.org&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt; &amp;lt;&lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&amp;gt&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; -- &lt;br/&gt;&amp;gt; I like to provide some work at no charge to prove my value. Do you need a techie?  &lt;br/&gt;&amp;gt; I own Litmocracy &amp;lt;&lt;a href=&#34;http://www.litmocracy.com/&amp;gt&#34;&gt;http://www.litmocracy.com/&amp;gt&lt;/a&gt;; and Meme Racing &amp;lt;&lt;a href=&#34;http://www.memeracing.net/&amp;gt&#34;&gt;http://www.memeracing.net/&amp;gt&lt;/a&gt;; (in alpha). &lt;br/&gt;&amp;gt; I&amp;#39;m the webmaster for The Voluntaryist &amp;lt;&lt;a href=&#34;http://www.voluntaryist.com/&amp;gt&#34;&gt;http://www.voluntaryist.com/&amp;gt&lt;/a&gt;; which now accepts Bitcoin.&lt;br/&gt;&amp;gt; I also code for The Dollar Vigilante &amp;lt;&lt;a href=&#34;http://dollarvigilante.com/&amp;gt&#34;&gt;http://dollarvigilante.com/&amp;gt&lt;/a&gt;;.&lt;br/&gt;&amp;gt; &amp;#34;He ought to find it more profitable to play by the rules&amp;#34; - Satoshi Nakamoto&lt;br/&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170225/461ac05d/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170225/461ac05d/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T17:56:44Z</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2ptvmvcheq94gq5zcddteuw6sscsx0vly489lmvg3349hkcmx77szyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrcwj3ldf</id>
    
      <title type="html">📅 Original date posted:2017-02-25 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2ptvmvcheq94gq5zcddteuw6sscsx0vly489lmvg3349hkcmx77szyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrcwj3ldf" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsglnstaqsn3yy4phhk905qy7kdqedvet2ducmpzk94fx56tk7echq944qwr&#39;&gt;nevent1q…4qwr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-02-25&lt;br/&gt;📝 Original message:&amp;gt; On Feb 24, 2017, at 7:01 PM, Peter Todd &amp;lt;pete at petertodd.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; On Fri, Feb 24, 2017 at 05:49:36PM -0600, Steve Davis via bitcoin-dev wrote:&lt;br/&gt;&amp;gt;&amp;gt; If the 20 byte SHA1 is now considered insecure (with good reason), what about RIPEMD-160 which is the foundation of Bitcoin addresses?&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; SHA1 is insecure because the SHA1 algorithm is insecure, not because 160bits isn&amp;#39;t enough.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; AFAIK there aren&amp;#39;t any known weaknesses in RIPEMD160,&lt;br/&gt;&lt;br/&gt;…so far. I wonder how long that vacation will last?&lt;br/&gt;&lt;br/&gt;&amp;gt; but it also hasn&amp;#39;t been&lt;br/&gt;&amp;gt; as closely studied as more common hash algorithms.&lt;br/&gt;&lt;br/&gt;...but we can be sure that it will be, since the dollar value held in existing utxos continues to increase...&lt;br/&gt;&lt;br/&gt;&amp;gt; That said, Bitcoin uses&lt;br/&gt;&amp;gt; RIPEMD160(SHA256(msg)), which may make creating collisions harder if an attack&lt;br/&gt;&amp;gt; is found than if it used RIPEMD160 alone.&lt;br/&gt;&lt;br/&gt;Does that offer any greater protection? That’s not so clear to me as the outputs (at least for p2pkh) only verify the public key against the final 20 byte hash. Specifically, in the first (notional) case the challenge would be to find a private key that has a public key that hashes to the final hash. In the second (realistic) case, you merely need to add the sha256 hash into the problem, which doesn’t seem to me to increase the difficulty by any significant amount? &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;/s
    </content>
    <updated>2023-06-07T17:56:40Z</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfl5t9au9dak0sfr4tqhglp8r2d2uqq4z4xqxxpmdeedrf4qrgd4qzyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrc59hl9s</id>
    
      <title type="html">📅 Original date posted:2017-02-24 📝 Original message:If the ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfl5t9au9dak0sfr4tqhglp8r2d2uqq4z4xqxxpmdeedrf4qrgd4qzyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrc59hl9s" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9jv2cd0tqzecvlzqs40vre2g5rmwv6xzxgxfuuwj3v9ec0ham8yg34mgzh&#39;&gt;nevent1q…mgzh&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-02-24&lt;br/&gt;📝 Original message:If the 20 byte SHA1 is now considered insecure (with good reason), what about RIPEMD-160 which is the foundation of Bitcoin addresses?&lt;br/&gt;&lt;br/&gt;Is that also susceptible to such an attack vector?&lt;br/&gt;&lt;br/&gt;What does that mean for old addresses?&lt;br/&gt;&lt;br/&gt;etc&lt;br/&gt;&lt;br/&gt;/s&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Date: Fri, 24 Feb 2017 11:04:54 &#43;0100&lt;br/&gt;&amp;gt; From: Tim Ruffing &amp;lt;tim.ruffing at mmci.uni-saarland.de&amp;gt;&lt;br/&gt;&amp;gt; To: bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; Subject: Re: [bitcoin-dev] SHA1 collisions make Git vulnerable to&lt;br/&gt;&amp;gt; 	attakcs by third-parties, not just repo maintainers&lt;br/&gt;&amp;gt; Message-ID: &amp;lt;1487930694.1528.1.camel at mmci.uni-saarland.de&amp;gt;&lt;br/&gt;&amp;gt; Content-Type: text/plain; charset=&amp;#34;UTF-8&amp;#34;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; On Fri, 2017-02-24 at 00:57 &#43;0100, Aymeric Vitte via bitcoin-dev wrote:&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; I have not worked on this since some time, so that&amp;#39;s just thoughts,&lt;br/&gt;&amp;gt;&amp;gt; but maybe it can render things much more difficult&lt;br/&gt;&amp;gt;&amp;gt; than???????computing two files until the same hash is found&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; You basically rely on the idea that specific collisions are more&lt;br/&gt;&amp;gt; difficult to find.?This trick or similar tricks will not help.?(And&lt;br/&gt;&amp;gt; actually, the more files you add to the hash, the more freedom you give&lt;br/&gt;&amp;gt; the attacker.)&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Even if certain collisions are more difficult to find today (which is&lt;br/&gt;&amp;gt; certainly true), the general rule is that someone will prove you wrong&lt;br/&gt;&amp;gt; in a year.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Even if ignore security entirely, switching to new hash function is&lt;br/&gt;&amp;gt; much simpler trying to fix the usage of a broken hash function.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Relying on SHA1 is hopeless. We have to get rid of it.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Best,&lt;br/&gt;&amp;gt; Tim&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; ------------------------------&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Message: 2&lt;br/&gt;&amp;gt; Date: Fri, 24 Feb 2017 16:18:43 &#43;0100&lt;br/&gt;&amp;gt; From: Aymeric Vitte &amp;lt;vitteaymeric at gmail.com&amp;gt;&lt;br/&gt;&amp;gt; To: bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; Subject: Re: [bitcoin-dev] SHA1 collisions make Git vulnerable to&lt;br/&gt;&amp;gt; 	attakcs by third-parties, not just repo maintainers&lt;br/&gt;&amp;gt; Message-ID: &amp;lt;15848c1b-2873-35e8-0588-c636126257df at gmail.com&amp;gt;&lt;br/&gt;&amp;gt; Content-Type: text/plain; charset=utf-8&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Not sure that you really read deeply what I sent, because stating that&lt;br/&gt;&amp;gt; hashing files continuously instead of hashing the intermediate steps&lt;br/&gt;&amp;gt; just gives more latitude to the attacker can&amp;#39;t be true when the attacker&lt;br/&gt;&amp;gt; has absolutely no control over the past files&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I did not write this as a workaround to fix SHA1, which will be dead&lt;br/&gt;&amp;gt; soon or later but as maybe some general concept that could possibly help&lt;br/&gt;&amp;gt; whatever hash function you are using for objects that are not frozen but&lt;br/&gt;&amp;gt; extending (ie the original email stating that trees might be some kind&lt;br/&gt;&amp;gt; of worse candidates for collisions reminded me this), indeed it makes no&lt;br/&gt;&amp;gt; sense to patch SHA1 or play around, but this kind of proposal could&lt;br/&gt;&amp;gt; accompany the defunct&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; The drawback is that you have to keep the hash state when you close the&lt;br/&gt;&amp;gt; latest hash computation in order to start the next one&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Then the question is: knowing the hash state, is it as easy to find a&lt;br/&gt;&amp;gt; collision between two files that will be computed in the next round than&lt;br/&gt;&amp;gt; finding a collision between two files only?&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Knowing that you can probably modify the hash state with some&lt;br/&gt;&amp;gt; unpredictable patterns&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Most likely the answer is: no, it&amp;#39;s (astronomically?) more difficult&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Please take it as a suggestion that might be explored (ps: I have the&lt;br/&gt;&amp;gt; code for this if needed) rather than an affirmation, still amazed as&lt;br/&gt;&amp;gt; shown in the few links provided (among others) that each time I raise&lt;br/&gt;&amp;gt; this subject nobody really pays attention (what&amp;#39;s the use case?, etc)&lt;br/&gt;&amp;gt; and by the fact that it&amp;#39;s apparently used by only one project in the&lt;br/&gt;&amp;gt; world and not supported by any library&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Le 24/02/2017 ? 11:04, Tim Ruffing via bitcoin-dev a ?crit :&lt;br/&gt;&amp;gt;&amp;gt; On Fri, 2017-02-24 at 00:57 &#43;0100, Aymeric Vitte via bitcoin-dev wrote:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I have not worked on this since some time, so that&amp;#39;s just thoughts,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; but maybe it can render things much more difficult&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; than       computing two files until the same hash is found&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; You basically rely on the idea that specific collisions are more&lt;br/&gt;&amp;gt;&amp;gt; difficult to find. This trick or similar tricks will not help. (And&lt;br/&gt;&amp;gt;&amp;gt; actually, the more files you add to the hash, the more freedom you give&lt;br/&gt;&amp;gt;&amp;gt; the attacker.)&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Even if certain collisions are more difficult to find today (which is&lt;br/&gt;&amp;gt;&amp;gt; certainly true), the general rule is that someone will prove you wrong&lt;br/&gt;&amp;gt;&amp;gt; in a year.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Even if ignore security entirely, switching to new hash function is&lt;br/&gt;&amp;gt;&amp;gt; much simpler trying to fix the usage of a broken hash function.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Relying on SHA1 is hopeless. We have to get rid of it.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Best,&lt;br/&gt;&amp;gt;&amp;gt; Tim&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; -- &lt;br/&gt;&amp;gt; Zcash wallets made simple: &lt;a href=&#34;https://github.com/Ayms/zcash-wallets&#34;&gt;https://github.com/Ayms/zcash-wallets&lt;/a&gt;&lt;br/&gt;&amp;gt; Bitcoin wallets made simple: &lt;a href=&#34;https://github.com/Ayms/bitcoin-wallets&#34;&gt;https://github.com/Ayms/bitcoin-wallets&lt;/a&gt;&lt;br/&gt;&amp;gt; Get the torrent dynamic blocklist: &lt;a href=&#34;http://peersm.com/getblocklist&#34;&gt;http://peersm.com/getblocklist&lt;/a&gt;&lt;br/&gt;&amp;gt; Check the 10 M passwords list: &lt;a href=&#34;http://peersm.com/findmyass&#34;&gt;http://peersm.com/findmyass&lt;/a&gt;&lt;br/&gt;&amp;gt; Anti-spies and private torrents, dynamic blocklist: &lt;a href=&#34;http://torrent-live.org&#34;&gt;http://torrent-live.org&lt;/a&gt;&lt;br/&gt;&amp;gt; Peersm : &lt;a href=&#34;http://www.peersm.com&#34;&gt;http://www.peersm.com&lt;/a&gt;&lt;br/&gt;&amp;gt; torrent-live: &lt;a href=&#34;https://github.com/Ayms/torrent-live&#34;&gt;https://github.com/Ayms/torrent-live&lt;/a&gt;&lt;br/&gt;&amp;gt; node-Tor : &lt;a href=&#34;https://www.github.com/Ayms/node-Tor&#34;&gt;https://www.github.com/Ayms/node-Tor&lt;/a&gt;&lt;br/&gt;&amp;gt; GitHub : &lt;a href=&#34;https://www.github.com/Ayms&#34;&gt;https://www.github.com/Ayms&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; ------------------------------&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Message: 3&lt;br/&gt;&amp;gt; Date: Fri, 24 Feb 2017 17:30:49 &#43;0100&lt;br/&gt;&amp;gt; From: Tim Ruffing &amp;lt;tim.ruffing at mmci.uni-saarland.de&amp;gt;&lt;br/&gt;&amp;gt; To: bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; Subject: Re: [bitcoin-dev] SHA1 collisions make Git vulnerable to&lt;br/&gt;&amp;gt; 	attakcs by third-parties, not just repo maintainers&lt;br/&gt;&amp;gt; Message-ID: &amp;lt;1487953849.5148.2.camel at mmci.uni-saarland.de&amp;gt;&lt;br/&gt;&amp;gt; Content-Type: text/plain; charset=&amp;#34;UTF-8&amp;#34;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; On Fri, 2017-02-24 at 16:18 &#43;0100, Aymeric Vitte via bitcoin-dev wrote:&lt;br/&gt;&amp;gt;&amp;gt; Not sure that you really read deeply what I sent, because stating&lt;br/&gt;&amp;gt;&amp;gt; that&lt;br/&gt;&amp;gt;&amp;gt; hashing files continuously instead of hashing the intermediate steps&lt;br/&gt;&amp;gt;&amp;gt; just gives more latitude to the attacker can&amp;#39;t be true when the&lt;br/&gt;&amp;gt;&amp;gt; attacker&lt;br/&gt;&amp;gt;&amp;gt; has absolutely no control over the past files&lt;br/&gt;&amp;gt; What prevents the attacker to provide different past files when talking&lt;br/&gt;&amp;gt; to parties who are still in the initial state?&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Then the question is: knowing the hash state, is it as easy to find a&lt;br/&gt;&amp;gt;&amp;gt; collision between two files that will be computed in the next round&lt;br/&gt;&amp;gt;&amp;gt; than&lt;br/&gt;&amp;gt;&amp;gt; finding a collision between two files only?&lt;br/&gt;&amp;gt; With the original usage of the hash function, the hash state is always&lt;br/&gt;&amp;gt; the initial state. Now that the attacker has some control over the hash&lt;br/&gt;&amp;gt; state even. In other words, if the original use of the hash function&lt;br/&gt;&amp;gt; was vulnerable, then your scheme is vulnerable for the initial state.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Concrete attack: If you can find x != y with H(x) = H(y), then you can&lt;br/&gt;&amp;gt; also find m, x != y, with H(m||x) = H(m||y), just by setting m = &amp;#34;&amp;#34;. &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Not sure if this is the right place to discuss that issue though...&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Best,&lt;br/&gt;&amp;gt; Tim&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; ------------------------------&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Message: 4&lt;br/&gt;&amp;gt; Date: Fri, 24 Feb 2017 18:29:50 &#43;0100&lt;br/&gt;&amp;gt; From: Aymeric Vitte &amp;lt;vitteaymeric at gmail.com&amp;gt;&lt;br/&gt;&amp;gt; To: Tim Ruffing &amp;lt;tim.ruffing at mmci.uni-saarland.de&amp;gt;,	Bitcoin Protocol&lt;br/&gt;&amp;gt; 	Discussion &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt;&lt;br/&gt;&amp;gt; Subject: Re: [bitcoin-dev] SHA1 collisions make Git vulnerable to&lt;br/&gt;&amp;gt; 	attakcs by third-parties, not just repo maintainers&lt;br/&gt;&amp;gt; Message-ID: &amp;lt;b557a0de-2492-80a1-eff7-229503ae382d at gmail.com&amp;gt;&lt;br/&gt;&amp;gt; Content-Type: text/plain; charset=windows-1252&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; ??? apparently we are not discussing the same thing&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Maybe I did not provide the right links (reading them again I myself&lt;br/&gt;&amp;gt; don&amp;#39;t find them so clear), see maybe again&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/whatwg/streams/issues/33#issuecomment-28045860&#34;&gt;https://github.com/whatwg/streams/issues/33#issuecomment-28045860&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; a - b - c -d&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; hash(a)&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; hash(a&#43;b)&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; etc&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; But you are not going to rehash from the beginning, then:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; update a --&amp;gt; keep the remaining bytes a_ (&#43; hash state 1) --&amp;gt; digest&lt;br/&gt;&amp;gt; a=hash(a)&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; update a_&#43;b from hash state 1--&amp;gt; keep the remaining bytes b_ (&#43; hash&lt;br/&gt;&amp;gt; state 2) --&amp;gt; digest a_&#43;b=hash(a&#43;b)&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; etc&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Basically that&amp;#39;s similar to a real time progressive hash of chunks of a&lt;br/&gt;&amp;gt; file that you are streaming and therefore don&amp;#39;t know what will come next&lt;br/&gt;&amp;gt; (per opposition to hashing a file that you already have), this could&lt;br/&gt;&amp;gt; apply to trees&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; This is different from something like:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; hash(a)&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; hash(hash(a) &#43;hash(b))&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; etc&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; There is no initial state, and the attacker can&amp;#39;t modify what was&lt;br/&gt;&amp;gt; already hashed, to make it more difficult you can probably modify the&lt;br/&gt;&amp;gt; hash state N&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Le 24/02/2017 ? 17:30, Tim Ruffing via bitcoin-dev a ?crit :&lt;br/&gt;&amp;gt;&amp;gt; On Fri, 2017-02-24 at 16:18 &#43;0100, Aymeric Vitte via bitcoin-dev wrote:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Not sure that you really read deeply what I sent, because stating&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; that&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; hashing files continuously instead of hashing the intermediate steps&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; just gives more latitude to the attacker can&amp;#39;t be true when the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; attacker&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; has absolutely no control over the past files&lt;br/&gt;&amp;gt;&amp;gt; What prevents the attacker to provide different past files when talking&lt;br/&gt;&amp;gt;&amp;gt; to parties who are still in the initial state?&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Then the question is: knowing the hash state, is it as easy to find a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; collision between two files that will be computed in the next round&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; than&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; finding a collision between two files only?&lt;br/&gt;&amp;gt;&amp;gt; With the original usage of the hash function, the hash state is always&lt;br/&gt;&amp;gt;&amp;gt; the initial state. Now that the attacker has some control over the hash&lt;br/&gt;&amp;gt;&amp;gt; state even. In other words, if the original use of the hash function&lt;br/&gt;&amp;gt;&amp;gt; was vulnerable, then your scheme is vulnerable for the initial state.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Concrete attack: If you can find x != y with H(x) = H(y), then you can&lt;br/&gt;&amp;gt;&amp;gt; also find m, x != y, with H(m||x) = H(m||y), just by setting m = &amp;#34;&amp;#34;. &lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Not sure if this is the right place to discuss that issue though...&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Best,&lt;br/&gt;&amp;gt;&amp;gt; Tim&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; -- &lt;br/&gt;&amp;gt; Zcash wallets made simple: &lt;a href=&#34;https://github.com/Ayms/zcash-wallets&#34;&gt;https://github.com/Ayms/zcash-wallets&lt;/a&gt;&lt;br/&gt;&amp;gt; Bitcoin wallets made simple: &lt;a href=&#34;https://github.com/Ayms/bitcoin-wallets&#34;&gt;https://github.com/Ayms/bitcoin-wallets&lt;/a&gt;&lt;br/&gt;&amp;gt; Get the torrent dynamic blocklist: &lt;a href=&#34;http://peersm.com/getblocklist&#34;&gt;http://peersm.com/getblocklist&lt;/a&gt;&lt;br/&gt;&amp;gt; Check the 10 M passwords list: &lt;a href=&#34;http://peersm.com/findmyass&#34;&gt;http://peersm.com/findmyass&lt;/a&gt;&lt;br/&gt;&amp;gt; Anti-spies and private torrents, dynamic blocklist: &lt;a href=&#34;http://torrent-live.org&#34;&gt;http://torrent-live.org&lt;/a&gt;&lt;br/&gt;&amp;gt; Peersm : &lt;a href=&#34;http://www.peersm.com&#34;&gt;http://www.peersm.com&lt;/a&gt;&lt;br/&gt;&amp;gt; torrent-live: &lt;a href=&#34;https://github.com/Ayms/torrent-live&#34;&gt;https://github.com/Ayms/torrent-live&lt;/a&gt;&lt;br/&gt;&amp;gt; node-Tor : &lt;a href=&#34;https://www.github.com/Ayms/node-Tor&#34;&gt;https://www.github.com/Ayms/node-Tor&lt;/a&gt;&lt;br/&gt;&amp;gt; GitHub : &lt;a href=&#34;https://www.github.com/Ayms&#34;&gt;https://www.github.com/Ayms&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; ------------------------------&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Message: 5&lt;br/&gt;&amp;gt; Date: Fri, 24 Feb 2017 14:20:19 -0800&lt;br/&gt;&amp;gt; From: Bram Cohen &amp;lt;bram at bittorrent.com&amp;gt;&lt;br/&gt;&amp;gt; To: Peter Todd &amp;lt;pete at petertodd.org&amp;gt;&lt;br/&gt;&amp;gt; Cc: Bitcoin Protocol Discussion&lt;br/&gt;&amp;gt; 	&amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt;&lt;br/&gt;&amp;gt; Subject: Re: [bitcoin-dev] A Better MMR Definition&lt;br/&gt;&amp;gt; Message-ID:&lt;br/&gt;&amp;gt; 	&amp;lt;CA&#43;KqGkpi4GvgU-K6vt-U5ZN4AkpjZ0rruzddoJS4-V0TcnyqUQ at mail.gmail.com&amp;gt;&lt;br/&gt;&amp;gt; Content-Type: text/plain; charset=&amp;#34;utf-8&amp;#34;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; So your idea is to cluster entries by entry time because newer things are&lt;br/&gt;&amp;gt; more likely to leave and updating multiple things near each other is&lt;br/&gt;&amp;gt; cheaper?&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; That can be done with my tool. Instead of using hashes for the values being&lt;br/&gt;&amp;gt; stored, you use position entries. The first entry gets a value of all&lt;br/&gt;&amp;gt; zeros, the next one a one followed by all zeros, then the next two&lt;br/&gt;&amp;gt; correspond to the first two with the second bit flipped to one, then the&lt;br/&gt;&amp;gt; next four the first four with the third bit flipped to one, etc. It&lt;br/&gt;&amp;gt; probably performs a little bit better to do it two bits at a time instead&lt;br/&gt;&amp;gt; of one so that the entries are 00, 01, 10, 11, 0001, 0010, 0011, 0101,&lt;br/&gt;&amp;gt; 0110, 0111, 1001, etc. If you were to really use this you&amp;#39;d probably want&lt;br/&gt;&amp;gt; to to add some optimizations to use the fact that the terminals fit in 64&lt;br/&gt;&amp;gt; bits instead of 256, but it mostly works unchanged, and gets whatever&lt;br/&gt;&amp;gt; benefits there are to this clustering plus the high performance&lt;br/&gt;&amp;gt; implementation tricks I&amp;#39;ve built which I keep complaining that nobody&amp;#39;s&lt;br/&gt;&amp;gt; giving feedback on.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I&amp;#39;m not sold on this being a win: The empirical access patterns are&lt;br/&gt;&amp;gt; unknown, it requires an extra cache miss per lookup to find the entry&lt;br/&gt;&amp;gt; number, it may be that everything is optimized well enough without it for&lt;br/&gt;&amp;gt; there to be no meaningful gains, and it&amp;#39;s a bunch of extra complexity. What&lt;br/&gt;&amp;gt; should be done is that a plain vanilla UTXO set solution is optimized as&lt;br/&gt;&amp;gt; well as it can be first, and then the insertion ordering trick is tried as&lt;br/&gt;&amp;gt; an optimization to see if it&amp;#39;s an improvement. Without that baseline&lt;br/&gt;&amp;gt; there&amp;#39;s no meaningful basis for comparison, and I&amp;#39;m quite confident that a&lt;br/&gt;&amp;gt; naive implementation which just allocates individual nodes will&lt;br/&gt;&amp;gt; underperform the thing I&amp;#39;ve come up with, even without adding optimizations&lt;br/&gt;&amp;gt; related to fitting in 64 bits.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; On Thu, Feb 23, 2017 at 8:36 PM, Peter Todd &amp;lt;pete at petertodd.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; On Thu, Feb 23, 2017 at 07:32:43PM -0800, Bram Cohen wrote:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; On Thu, Feb 23, 2017 at 7:15 PM, Peter Todd &amp;lt;pete at petertodd.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Glad we&amp;#39;re on the same page with regard to what&amp;#39;s possible in TXO&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; commitments.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Secondly, am I correct in saying your UTXO commitments scheme requires&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; random&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; access? While you describe it as a &amp;#34;merkle set&amp;#34;, obviously to be&lt;br/&gt;&amp;gt;&amp;gt; merkelized&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it&amp;#39;ll have to have an ordering of some kind. What do you propose that&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ordering&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to be?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; The ordering is by the bits in the hash. Technically it&amp;#39;s a Patricia&lt;br/&gt;&amp;gt;&amp;gt; Trie.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I&amp;#39;m using &amp;#39;merkle tree&amp;#39; to refer to basically anything with a hash root.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; The hash of what? The values in the set?&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Maybe more specifically, what exact values do you propose to be in the&lt;br/&gt;&amp;gt;&amp;gt; set?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; That is unspecified in the implementation, it just takes a 256 bit value&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; which is presumably a hash of something. The intention is to nail down a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; simple format and demonstrate good performance and leave those semantics&lt;br/&gt;&amp;gt;&amp;gt; to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; a higher layer. The simplest thing would be to hash together the txid and&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; output number.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Ok, so let&amp;#39;s assume the values in the set are the unspent outpoints.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Since we&amp;#39;re ordering by the hash of the values in the set, outpoints will&lt;br/&gt;&amp;gt;&amp;gt; be&lt;br/&gt;&amp;gt;&amp;gt; distributed uniformly in the set, and thus the access pattern of data in&lt;br/&gt;&amp;gt;&amp;gt; the&lt;br/&gt;&amp;gt;&amp;gt; set is uniform.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Now let&amp;#39;s fast-forward 10 years. For the sake of argument, assume that for&lt;br/&gt;&amp;gt;&amp;gt; every 1 UTXO in the set that corresponds to funds in someone&amp;#39;s wallet that&lt;br/&gt;&amp;gt;&amp;gt; are&lt;br/&gt;&amp;gt;&amp;gt; likely to be spent, there are 2^12 = 4096 UTXO&amp;#39;s that have been permanently&lt;br/&gt;&amp;gt;&amp;gt; lost (and/or created in spam attacks) and thus will never be spent.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Since lost UTXO&amp;#39;s are *also* uniformly distributed, if I&amp;#39;m processing a new&lt;br/&gt;&amp;gt;&amp;gt; block that spends 2^12 = 4096 UTXO&amp;#39;s, on average for each UTXO spent, I&amp;#39;ll&lt;br/&gt;&amp;gt;&amp;gt; have to update log2(4096) = 12 more digests than I would have had those&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;dead&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt; UTXO&amp;#39;s not existed.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Concretely, imagine our UTXO set had just 8 values in it, and we were&lt;br/&gt;&amp;gt;&amp;gt; updating&lt;br/&gt;&amp;gt;&amp;gt; two of them:&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt;               #&lt;br/&gt;&amp;gt;&amp;gt;              / \&lt;br/&gt;&amp;gt;&amp;gt;             /   \&lt;br/&gt;&amp;gt;&amp;gt;            /     \&lt;br/&gt;&amp;gt;&amp;gt;           /       \&lt;br/&gt;&amp;gt;&amp;gt;          /         \&lt;br/&gt;&amp;gt;&amp;gt;         #           #&lt;br/&gt;&amp;gt;&amp;gt;        / \         / \&lt;br/&gt;&amp;gt;&amp;gt;       /   \       /   \&lt;br/&gt;&amp;gt;&amp;gt;      #     .     .     #&lt;br/&gt;&amp;gt;&amp;gt;     / \   / \   / \   / \&lt;br/&gt;&amp;gt;&amp;gt;    .   X .   . .   . X   .&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; To mark two coins as spent, we&amp;#39;ve had to update 5 inner nodes.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Now let&amp;#39;s look at what happens in an insertion-ordered TXO commitment&lt;br/&gt;&amp;gt;&amp;gt; scheme.&lt;br/&gt;&amp;gt;&amp;gt; For sake of argument, let&amp;#39;s assume the best possible case, where every UTXO&lt;br/&gt;&amp;gt;&amp;gt; spent in that same block was recently created. Since the UTXO&amp;#39;s are&lt;br/&gt;&amp;gt;&amp;gt; recently&lt;br/&gt;&amp;gt;&amp;gt; created, chances are almost every single one of those &amp;#34;dead&amp;#34; UTXO&amp;#39;s will&lt;br/&gt;&amp;gt;&amp;gt; have&lt;br/&gt;&amp;gt;&amp;gt; been created in the past. Thus, since this is an insertion-ordered data&lt;br/&gt;&amp;gt;&amp;gt; structure, those UTXO&amp;#39;s exist in an older part of the data structure that&lt;br/&gt;&amp;gt;&amp;gt; our&lt;br/&gt;&amp;gt;&amp;gt; new block doesn&amp;#39;t need to modify at all.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Concretely, again let&amp;#39;s imagine a TXO commitment with 8 values in it, and&lt;br/&gt;&amp;gt;&amp;gt; two&lt;br/&gt;&amp;gt;&amp;gt; of them being spent:&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt;               #&lt;br/&gt;&amp;gt;&amp;gt;              / \&lt;br/&gt;&amp;gt;&amp;gt;             /   \&lt;br/&gt;&amp;gt;&amp;gt;            /     \&lt;br/&gt;&amp;gt;&amp;gt;           /       \&lt;br/&gt;&amp;gt;&amp;gt;          /         \&lt;br/&gt;&amp;gt;&amp;gt;         .           #&lt;br/&gt;&amp;gt;&amp;gt;        / \         / \&lt;br/&gt;&amp;gt;&amp;gt;       /   \       /   \&lt;br/&gt;&amp;gt;&amp;gt;      .     .     .     #&lt;br/&gt;&amp;gt;&amp;gt;     / \   / \   / \   / \&lt;br/&gt;&amp;gt;&amp;gt;    .   . .   . .   . X   X&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; To mark two coins as spent, we&amp;#39;ve only had to update 3 inner nodes; while&lt;br/&gt;&amp;gt;&amp;gt; our&lt;br/&gt;&amp;gt;&amp;gt; tree is higher with those lost coins, those extra inner nodes are amortised&lt;br/&gt;&amp;gt;&amp;gt; across all the coins we have to update.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; The situation gets even better when we look at the *new* UTXO&amp;#39;s that our&lt;br/&gt;&amp;gt;&amp;gt; block&lt;br/&gt;&amp;gt;&amp;gt; creates. Suppose our UTXO set has size n. To mark a single coin as spent,&lt;br/&gt;&amp;gt;&amp;gt; we&lt;br/&gt;&amp;gt;&amp;gt; have to update log2(n) inner nodes. We do get to amortise this a bit at&lt;br/&gt;&amp;gt;&amp;gt; the top&lt;br/&gt;&amp;gt;&amp;gt; levels in the tree, but even if we assume the amortisation is totally free,&lt;br/&gt;&amp;gt;&amp;gt; we&amp;#39;re updating at least log2(n) - log2(m) inner nodes &amp;#34;under&amp;#34; the amortised&lt;br/&gt;&amp;gt;&amp;gt; nodes at the top of the tree for *each* new node.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Meanwhile with an insertion-ordered TXO commitment, each new UTXO added to&lt;br/&gt;&amp;gt;&amp;gt; the&lt;br/&gt;&amp;gt;&amp;gt; data set goes in the same place - the end. So almost none of the existing&lt;br/&gt;&amp;gt;&amp;gt; data&lt;br/&gt;&amp;gt;&amp;gt; needs to be touched to add the new UTXOs. Equally, the hashing required&lt;br/&gt;&amp;gt;&amp;gt; for the&lt;br/&gt;&amp;gt;&amp;gt; new UTXO&amp;#39;s can be done in an incremental fashion that&amp;#39;s very L1/L2 cache&lt;br/&gt;&amp;gt;&amp;gt; friendly.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; tl;dr: Precisely because access patterns in TXO commitments are *not*&lt;br/&gt;&amp;gt;&amp;gt; uniform,&lt;br/&gt;&amp;gt;&amp;gt; I think we&amp;#39;ll find that from a L1/L2/etc cache perspective alone, TXO&lt;br/&gt;&amp;gt;&amp;gt; commitments will result in better performance than UTXO commitments.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Now it is true that Bitcoin&amp;#39;s current design means we&amp;#39;ll need a map of&lt;br/&gt;&amp;gt;&amp;gt; confirmed outpoints to TXO insertion order indexes. But it&amp;#39;s not&lt;br/&gt;&amp;gt;&amp;gt; particularly&lt;br/&gt;&amp;gt;&amp;gt; hard to add that &amp;#34;metadata&amp;#34; to transactions on the P2P layer in the same&lt;br/&gt;&amp;gt;&amp;gt; way&lt;br/&gt;&amp;gt;&amp;gt; that segwit added witnesses to transactions without modifying how txids&lt;br/&gt;&amp;gt;&amp;gt; were&lt;br/&gt;&amp;gt;&amp;gt; calculated; if you only connect to peers who provide you with TXO index&lt;br/&gt;&amp;gt;&amp;gt; information in blocks and transactions, you don&amp;#39;t need to keep that map&lt;br/&gt;&amp;gt;&amp;gt; yourself.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Finally, note how this makes transactions *smaller* in many circumstances:&lt;br/&gt;&amp;gt;&amp;gt; it&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; just a 8-byte max index rather than a 40 byte outpoint.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; --&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://petertodd.org&#34;&gt;https://petertodd.org&lt;/a&gt; &amp;#39;peter&amp;#39;[:-1]@petertodd.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; -------------- next part --------------&lt;br/&gt;&amp;gt; An HTML attachment was scrubbed...&lt;br/&gt;&amp;gt; URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170224/63ab2731/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170224/63ab2731/attachment.html&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; ------------------------------&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; End of bitcoin-dev Digest, Vol 21, Issue 34&lt;br/&gt;&amp;gt; *******************************************
    </content>
    <updated>2023-06-07T17:56:39Z</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszp2wqdm09nn78wfmwn2ffq8uw3cerjdaxjxd8g4fn0wwels9ylaczyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrcyrs4fr</id>
    
      <title type="html">📅 Original date posted:2017-01-02 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszp2wqdm09nn78wfmwn2ffq8uw3cerjdaxjxd8g4fn0wwels9ylaczyzdxku6ynnkaxh4cs2p4y2lfr8uvl9x45usrxmywss7zmn2k65lrcyrs4fr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqg0m2uwldkq6nepdklgu5njp9hx8ufsueyhn2y33xs3z8n0jt24qxcxrj3&#39;&gt;nevent1q…xrj3&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-01-02&lt;br/&gt;📝 Original message:Hi all,&lt;br/&gt;&lt;br/&gt;Suppose someone were to use the following pk_script:&lt;br/&gt;&lt;br/&gt;[op_2dup, op_2dup, op_2dup, op_2dup, op_2dup, ...(to limit)..., op_2dup, op_hash160, &amp;lt;addr_hash&amp;gt;, op_equalverify, op_checksig]&lt;br/&gt;&lt;br/&gt;This still seems to be valid AFAICS, and may be a potential attack vector?&lt;br/&gt;&lt;br/&gt;Thanks.&lt;br/&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170102/ac515115/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170102/ac515115/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T17:55:17Z</updated>
  </entry>

</feed>