<?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/npub1gaszwl7qd0tjmnwcaamgzzgsmzzjlvle6kz0td66pwa8z69vsxsqxgac47.rss" />
  <link href="https://nostr.ae/npub1gaszwl7qd0tjmnwcaamgzzgsmzzjlvle6kz0td66pwa8z69vsxsqxgac47" />
  <id>https://nostr.ae/npub1gaszwl7qd0tjmnwcaamgzzgsmzzjlvle6kz0td66pwa8z69vsxsqxgac47</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://nostr.ae/nevent1qqs0frqnq94lr82786daylv0jyvns6j4zr6j95u97kws3430l7nmj5gzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qs2gfrj</id>
    
      <title type="html">📅 Original date posted:2019-12-18 📝 Original message: &amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0frqnq94lr82786daylv0jyvns6j4zr6j95u97kws3430l7nmj5gzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qs2gfrj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs20s4rl60c7t0r00g8aw22vnrm47yth3e3fnzrum9mndkc6cf0w4skdsv3v&#39;&gt;nevent1q…sv3v&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-12-18&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Responding below&lt;br/&gt;&lt;br/&gt;The core idea is to modify Tapscript&amp;#39;s `OP_CHECKSIG`. Instead of reading the&lt;br/&gt;&amp;gt; signature as a single 64-bytes stack argument, let&amp;#39;s add a small change to&lt;br/&gt;&amp;gt; read&lt;br/&gt;&amp;gt; the signature as two 32-bytes stack arguments: `R` first then `s`.&lt;br/&gt;&amp;gt; Since Taproot already makes changes to this opcode, adding this small&lt;br/&gt;&amp;gt; change&lt;br/&gt;&amp;gt; seems to be quite simple and harmless (and this is the right time to&lt;br/&gt;&amp;gt; propose&lt;br/&gt;&amp;gt; such a change as we&amp;#39;re still in the Taproot review process).&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;I  very much in favor of a mechanism to enable outputs to enforce ECDSA&lt;br/&gt;nonce reuse.&lt;br/&gt;&lt;br/&gt;However I would argue against changing the behavior of OP_CHECKSIG. Subtly&lt;br/&gt;changing the stack behavior of perhaps the most widely used and complex OP&lt;br/&gt;code in Bitcoin is likely to result in bugs in systems that create and sign&lt;br/&gt;transactions. Additionally making this new behavior only activate based on&lt;br/&gt;context is even more likely to cause problems.&lt;br/&gt;&lt;br/&gt;It would likely be safer to have this as a new OP code, say&lt;br/&gt;OP_CHECKSPLITSIG.&lt;br/&gt;&lt;br/&gt;Alternatively we could try to get OP_CAT approved. It is a very simple OP&lt;br/&gt;code, which is easy to explain, generally useful and allows this feature&lt;br/&gt;plus allows many other critical features.&lt;br/&gt;&lt;br/&gt;&amp;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/lightning-dev/attachments/20191218/e7a5abd2/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191218/e7a5abd2/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:57:49&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8g0s2kjzt5z3jdm3sunc6kgyn8nwl5zhcd3e7aajzlx55kdre40gzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qyfa8jw</id>
    
      <title type="html">📅 Original date posted:2019-12-17 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8g0s2kjzt5z3jdm3sunc6kgyn8nwl5zhcd3e7aajzlx55kdre40gzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qyfa8jw" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0pf39xx8e9g284u84tsj4mkjjk7nhdmv8xag7y92kpyfkrhtvgzgelyahe&#39;&gt;nevent1q…yahe&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-12-17&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt;From where I&amp;#39;m sitting the fact that OP_CAT allows people to build&lt;br/&gt;more powerful constructions in Bitcoin without introducing additional&lt;br/&gt;complexity at the consensus layer is a positive not a negative. Using&lt;br/&gt;OP_CAT or OP_SUBSTRING to enforce ECDSA nonce reuse is a very powerful&lt;br/&gt;protocol tool for enforcing fairness in layer two protocols.&lt;br/&gt;&lt;br/&gt;On Tue, Dec 17, 2019 at 11:27 AM ZmnSCPxj via Lightning-dev&lt;br/&gt;&amp;lt;lightning-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Good morning t-bast,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Further, we can enforce that RBF is signalled for every spend of the output by:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     &amp;lt;0&amp;gt; OP_CHECKSEQUENCEVERIFY OP_DROP &amp;lt;R&amp;gt; OP_SWAP OP_CAT &amp;lt;ACINQ&amp;gt; OP_CHECKSIG&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Requiring that RBF is signalled gives a little more assurance.&lt;br/&gt;&amp;gt; Suppose ACINQ becomes evil and double-spends the output.&lt;br/&gt;&amp;gt; The transaction that is posted in the mempool must be marked by RBF due to the `OP_CHECKSEQUENCEVERIFY` opcode, since `nSequence` also doubles as RBF opt-in.&lt;br/&gt;&amp;gt; Then anyone who notices the double-spend can RBF the double-spending transaction to themselves rather than ACINQ.&lt;br/&gt;&amp;gt; This also further publishes ACINQ private key, until the winning transaction has an `OP_RETURN` output that pays the entire value as fees and nobody can RBF it further.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is a minor increase in the assurability of the construction, by making any output that is double-spent directly revocable in favor of the miners.&lt;br/&gt;&amp;gt; Again, it requires `OP_CAT`, which is a very dangerous opcode, allowing such powerful constructions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thanks a lot David for the suggestion and pointers, that&amp;#39;s a really interesting solution.&lt;br/&gt;&amp;gt; &amp;gt; I will dive into that in-depth, it could be very useful for many layer-2 constructions.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thanks ZmnSCPxj as well for the quick feedback and the `OP_CAT` construction,&lt;br/&gt;&amp;gt; &amp;gt; a lot of cool tricks coming up once (if?) we have such tools in the future ;)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Le mar. 17 déc. 2019 à 16:14, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Good morning David, t-bast, and all,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; I&amp;#39;m not aware of any way to currently force single-show signatures in&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Bitcoin, so this is pretty theoretical. Also, single-show signatures&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; add a lot of fragility to any setup and make useful features like RBF&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; fee bumping unavailable.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; With `OP_CAT`, we can enforce that a particular `R` is used, which allows to implement single-show signatures.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;     # Assuming signatures are the concatenation of (R,s)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;     &amp;lt;R&amp;gt; OP_SWAP OP_CAT &amp;lt;ACINQ&amp;gt; OP_CHECKSIG&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; The above would then feed `s` only on the witness stack.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Regards,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;
    </content>
    <updated>2023-06-09T14:57:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgdkyjfmd7mlc6laju4ne3f7wtkgepmga9kn0y968jzs56pk8sgsszyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qsjuppc</id>
    
      <title type="html">📅 Original date posted:2019-10-03 📝 Original message: To ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgdkyjfmd7mlc6laju4ne3f7wtkgepmga9kn0y968jzs56pk8sgsszyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qsjuppc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs06257vu28ssuxhs03kdfyvfu57306tx0za2v0amjhj09u0qjn96sg648ft&#39;&gt;nevent1q…48ft&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-10-03&lt;br/&gt;📝 Original message:&lt;br/&gt;To avoid derailing the NO_INPUT conversation, I have changed the&lt;br/&gt;subject to OP_CAT.&lt;br/&gt;&lt;br/&gt;Responding to:&lt;br/&gt;&amp;#34;&amp;#34;&amp;#34;&lt;br/&gt;* `SIGHASH` flags attached to signatures are a misdesign, sadly&lt;br/&gt;retained from the original BitCoin 0.1.0 Alpha for Windows design, on&lt;br/&gt;par with:&lt;br/&gt;[..]&lt;br/&gt;* `OP_CAT` and `OP_MULT` and `OP_ADD` and friends&lt;br/&gt;[..]&lt;br/&gt;&amp;#34;&amp;#34;&amp;#34;&lt;br/&gt;&lt;br/&gt;OP_CAT is an extremely valuable op code. I understand why it was&lt;br/&gt;removed as the situation at the time with scripts was dire. However&lt;br/&gt;most of the protocols I&amp;#39;ve wanted to build on Bitcoin run into the&lt;br/&gt;limitation that stack values can not be concatenated. For instance&lt;br/&gt;TumbleBit would have far smaller transaction sizes if OP_CAT was&lt;br/&gt;supported in Bitcoin. If it happens to me as a researcher it is&lt;br/&gt;probably holding other people back as well. If I could wave a magic&lt;br/&gt;wand and turn on one of the disabled op codes it would be OP_CAT.  Of&lt;br/&gt;course with the change that size of each concatenated value must be 64&lt;br/&gt;Bytes or less.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Tue, Oct 1, 2019 at 10:04 PM ZmnSCPxj via bitcoin-dev&lt;br/&gt;&amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Good morning lists,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let me propose the below radical idea:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * `SIGHASH` flags attached to signatures are a misdesign, sadly retained from the original BitCoin 0.1.0 Alpha for Windows design, on par with:&lt;br/&gt;&amp;gt;   * 1 RETURN&lt;br/&gt;&amp;gt;   * higher-`nSequence` replacement&lt;br/&gt;&amp;gt;   * DER-encoded pubkeys&lt;br/&gt;&amp;gt;   * unrestricted `scriptPubKey`&lt;br/&gt;&amp;gt;   * Payee-security-paid-by-payer (i.e. lack of P2SH)&lt;br/&gt;&amp;gt;   * `OP_CAT` and `OP_MULT` and `OP_ADD` and friends&lt;br/&gt;&amp;gt;   * transaction malleability&lt;br/&gt;&amp;gt;   * probably many more&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So let me propose the more radical excision, starting with SegWit v1:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Remove `SIGHASH` from signatures.&lt;br/&gt;&amp;gt; * Put `SIGHASH` on public keys.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Public keys are now encoded as either 33-bytes (implicit `SIGHASH_ALL`) or 34-bytes (`SIGHASH` byte, followed by pubkey type, followed by pubkey coordinate).&lt;br/&gt;&amp;gt; `OP_CHECKSIG` and friends then look at the *public key* to determine sighash algorithm rather than the signature.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As we expect public keys to be indirectly committed to on every output `scriptPubKey`, this is automatically output tagging to allow particular `SIGHASH`.&lt;br/&gt;&amp;gt; However, we can then utilize the many many ways to hide public keys away until they are needed, exemplified in MAST-inside-Taproot.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I propose also the addition of the opcode:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     &amp;lt;sighash&amp;gt; &amp;lt;pubkey&amp;gt; OP_SETPUBKEYSIGHASH&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * `sighash` must be one byte.&lt;br/&gt;&amp;gt; * `pubkey` may be the special byte `0x1`, meaning &amp;#34;just use the Taproot internal pubkey&amp;#34;.&lt;br/&gt;&amp;gt; * `pubkey` may be 33-byte public key, in which case the `sighash` byte is just prepended to it.&lt;br/&gt;&amp;gt; * `pubkey` may be 34-byte public key with sighash, in which case the first byte is replaced with `sighash` byte.&lt;br/&gt;&amp;gt; * If `sighash` is `0x00` then the result is a 33-byte public key (the sighash byte is removed) i.e. `SIGHASH_ALL` implicit.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This retains the old feature where the sighash is selected at time-of-spending rather than time-of-payment.&lt;br/&gt;&amp;gt; This is done by using the script:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     &amp;lt;pubkey&amp;gt; OP_SETPUBKEYSIGHASH OP_CHECKSIG&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then the sighash can be put in the witness stack after the signature, letting the `SIGHASH` flag be selected at time-of-signing, but only if the SCRIPT specifically is formed to do so.&lt;br/&gt;&amp;gt; This is malleability-safe as the signature still commits to the `SIGHASH` it was created for.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, by default, public keys will not have an attached `SIGHASH` byte, implying `SIGHASH_ALL` (and disallowing-by-default non-`SIGHASH_ALL`).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This removes the problems with `SIGHASH_NONE` `SIGHASH_SINGLE`, as they are allowed only if the output specifically says they are allowed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Would this not be a superior solution?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&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;
    </content>
    <updated>2023-06-09T14:56:25&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsg4e3gcjlqfa7k2gxrynnzcysztvjpv424afhned60tdnxmhnw3fczyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qle5cyw</id>
    
      <title type="html">📅 Original date posted:2019-10-01 📝 Original message: &amp;gt;I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsg4e3gcjlqfa7k2gxrynnzcysztvjpv424afhned60tdnxmhnw3fczyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qle5cyw" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszlnk27sw8zhqpr477djnxdj6gu30va2jte87ttlm5x4yhdahcs4st2ac4c&#39;&gt;nevent1q…ac4c&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-10-01&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt;I don&amp;#39;t find too compelling the potential problem of a &amp;#39;bad wallet designer&amp;#39;, whether lazy or dogmatic, misusing noinput. I think there are simpler ways to cut corners and there will always be plenty of good wallet options people can choose.&lt;br/&gt;&lt;br/&gt;I want to second this. The most expensive part of wallet design is&lt;br/&gt;engineering time. Writing code that uses a new sighash or a custom&lt;br/&gt;script with a OP_CODE is a very large barrier to use. How many wallets&lt;br/&gt;support multisig or RBF? How much BTC has been stolen over the entire&lt;br/&gt;history of Bitcoin because of sighash SIGHASH_NONE or SIGHASH_SINGLE&lt;br/&gt;vs ECDSA nonce reuse?&lt;br/&gt;&lt;br/&gt;On Tue, Oct 1, 2019 at 9:35 AM Richard Myers &amp;lt;rich at gotenna.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks Christian for pulling together this concise summary.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 1.  General agreement on the usefulness of noinput / anyprevoutanyscript /&lt;br/&gt;&amp;gt;&amp;gt;     anyprevout.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I certainly support the unification and adoption of the sighash_noinput and anyprevoutput* proposals to enable eltoo, but also to make possible better off-chain protocol designs generally.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Among the various advantages previously discussed, the particular use case benefits from eltoo I want to take advantage of is less interactive payment channel negotiation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In talking with people about eltoo this summer, I found most people generally support adding this as an option to Lightning. The only general concern I heard, if any,  was the vague idea that rebindable transactions could be somehow misused or abused.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe when these concerns are made more concrete they can be classified and addressed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t find too compelling the potential problem of a &amp;#39;bad wallet designer&amp;#39;, whether lazy or dogmatic, misusing noinput. I think there are simpler ways to cut corners and there will always be plenty of good wallet options people can choose.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Because scripts signed with no_input signatures are only really exchanged and used for off-chain negotiations, very few should ever appear on chain. Those that do should represent non-cooperative situations that involve signing parties who know not to reuse or share scripts with these public keys again. No third party has any reason to spend value to a multisignature script they don&amp;#39;t control, whether or not a no_input signature exists for it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 2.  Is there strong support or opposition to the chaperone signatures&lt;br/&gt;&amp;gt;&amp;gt;     introduced in anyprevout / anyprevoutanyscript? I think it&amp;#39;d be best to&lt;br/&gt;&amp;gt;&amp;gt;     formulate a concrete set of pros and contras, rather than talk about&lt;br/&gt;&amp;gt;&amp;gt;     abstract dangers or advantages.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As I mentioned before, I don&amp;#39;t think the lazy wallet designer advantage is enough to justify the downsides of chaperone signatures. One additional downside is the additional code complexity required to flag whether or not a chaperone output is included. By comparison, the code changes for creating a no_input digest that skips the prevout and prevscript parts of a tx is much less intrusive and easier to maintain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 3.  The same for output tagging / explicit opt-in. What are the advantages and&lt;br/&gt;&amp;gt;&amp;gt;     disadvantages?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I see the point ZmnSCPxj makes about tagged outputs negatively impacting the anonymity set of taproot transactions. The suggested work around would impose a cost to unilateral closes of an additional translation transaction and not using the work around would cause a hit to anonymity for off-chain script users. I feel both costs are too high relative to the benefit gained of preventing sloppy reuse of public keys.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 4.  Shall we merge BIP-118 and bip-anyprevout. This would likely reduce the&lt;br/&gt;&amp;gt;&amp;gt;     confusion and make for simpler discussions in the end.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe they should be merged. I also think both chaperone signatures and output tagging should become part of the discussion of security alternatives, but not part of the initial specification.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I understand the desire to be conservative with protocol changes that could be misused. However, with just taproot and taproot public key types the anyprevout functionality is already very opt-in and not something that might accidentally get used. Belt-and-suspender protections like chaperone signatures and tagged outputs have their own impacts on code complexity, on-chain transaction sizes and transaction anonymity that also must be considered.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe efforts like descriptors will help people follow best practices when working with complex scripts without pushing extra complexity for safety into the consensus layer of bitcoin. Anywhere we can make core code simpler, and handle foot-guns in higher level non-consensus code, the better.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;
    </content>
    <updated>2023-06-09T14:56:24&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspg2w54645q5jsqlf8ewq3zzcal905tyw33x67uenr7qp7c9am8wszyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qwukm5z</id>
    
      <title type="html">📅 Original date posted:2021-07-09 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspg2w54645q5jsqlf8ewq3zzcal905tyw33x67uenr7qp7c9am8wszyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qwukm5z" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswg7wztcwvpwh97cedavkw7ygn6ntent2lsd3puk63kadu75c03dss2reqz&#39;&gt;nevent1q…reqz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-07-09&lt;br/&gt;📝 Original message:&amp;gt;Yes, quite neat indeed, too bad Lamport signatures are so huge (a couple kilobytes)... blocksize increase *cough*&lt;br/&gt;&lt;br/&gt;Couldn&amp;#39;t you significantly compress the signatures by using either&lt;br/&gt;Winternitz OTS or by using OP_CAT to build a merkle tree so that the&lt;br/&gt;full signature can be derived during script execution from a much&lt;br/&gt;shorter set of seed values?&lt;br/&gt;&lt;br/&gt;On Thu, Jul 8, 2021 at 4:12 AM ZmnSCPxj via bitcoin-dev&lt;br/&gt;&amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Good morning Jeremy,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Yes, quite neat indeed, too bad Lamport signatures are so huge (a couple kilobytes)... blocksize increase *cough*&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Since a quantum computer can derive the EC privkey from the EC pubkey and this scheme is resistant to that, I think you can use a single well-known EC privkey, you just need a unique Lamport keypair for each UTXO (uniqueness being mandatory due to Lamport requiring preimage revelation).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Dear Bitcoin Devs,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; As mentioned previously, OP_CAT (or similar operation) can be used to make Bitcoin &amp;#34;quantum safe&amp;#34; by signing an EC signature. This should work in both Segwit V0 and Tapscript, although you have to use HASH160 for it to fit in Segwit V0.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; See [my blog](&lt;a href=&#34;https://rubin.io/blog/2021/07/06/quantum-bitcoin/&#34;&gt;https://rubin.io/blog/2021/07/06/quantum-bitcoin/&lt;/a&gt;) for the specific construction, reproduced below.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Yet another entry to the &amp;#34;OP_CAT can do that too&amp;#34; list.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Best,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Jeremy&lt;br/&gt;&amp;gt; &amp;gt; -----&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I recently published [a blog&lt;br/&gt;&amp;gt; &amp;gt; post](&lt;a href=&#34;https://rubin.io/blog/2021/07/02/signing-5-bytes/&#34;&gt;https://rubin.io/blog/2021/07/02/signing-5-bytes/&lt;/a&gt;) about signing up to a&lt;br/&gt;&amp;gt; &amp;gt; 5 byte value using Bitcoin script arithmetic and Lamport signatures.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; By itself, this is neat, but a little limited. What if we could sign longer&lt;br/&gt;&amp;gt; &amp;gt; messages? If we can sign up to 20 bytes, we could sign a HASH160 digest which&lt;br/&gt;&amp;gt; &amp;gt; is most likely quantum safe...&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; What would it mean if we signed the HASH160 digest of a signature? What the&lt;br/&gt;&amp;gt; &amp;gt; what? Why would we do that?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Well, as it turns out, even if a quantum computer were able to crack ECDSA, it&lt;br/&gt;&amp;gt; &amp;gt; would yield revealing the private key but not the ability to malleate the&lt;br/&gt;&amp;gt; &amp;gt; content of what was actually signed.  I asked my good friend and cryptographer&lt;br/&gt;&amp;gt; &amp;gt; [Madars Virza](&lt;a href=&#34;https://madars.org/&#34;&gt;https://madars.org/&lt;/a&gt;) if my intuition was correct, and he&lt;br/&gt;&amp;gt; &amp;gt; confirmed that it should be sufficient, but it&amp;#39;s definitely worth closer&lt;br/&gt;&amp;gt; &amp;gt; analysis before relying on this. While the ECDSA signature can be malleated to a&lt;br/&gt;&amp;gt; &amp;gt; different, negative form, if the signature is otherwise made immalleable there&lt;br/&gt;&amp;gt; &amp;gt; should only be one value the commitment can be opened to.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If we required the ECDSA signature be signed with a quantum proof signature&lt;br/&gt;&amp;gt; &amp;gt; algorithm, then we&amp;#39;d have a quantum proof Bitcoin! And the 5 byte signing scheme&lt;br/&gt;&amp;gt; &amp;gt; we discussed previously is a Lamport signature, which is quantum secure.&lt;br/&gt;&amp;gt; &amp;gt; Unfortunately, we need at least 20 contiguous bytes... so we need some sort of&lt;br/&gt;&amp;gt; &amp;gt; OP\_CAT like operation.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; OP\_CAT can&amp;#39;t be directly soft forked to Segwit v0 because it modifies the&lt;br/&gt;&amp;gt; &amp;gt; stack, so instead we&amp;#39;ll (for simplicity) also show how to use a new opcode that&lt;br/&gt;&amp;gt; &amp;gt; uses verify semantics, OP\_SUBSTRINGEQUALVERIFY that checks a splice of a string&lt;br/&gt;&amp;gt; &amp;gt; for equality.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ```&lt;br/&gt;&amp;gt; &amp;gt; ... FOR j in 0..=5&lt;br/&gt;&amp;gt; &amp;gt;     &amp;lt;0&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     ... FOR i in 0..=31&lt;br/&gt;&amp;gt; &amp;gt;         SWAP hash160 DUP &amp;lt;H(K_j_i_1)&amp;gt; EQUAL IF DROP &amp;lt;2**i&amp;gt; ADD ELSE &amp;lt;H(K_j_i_0)&amp;gt; EQUALVERIFY ENDIF&lt;br/&gt;&amp;gt; &amp;gt;     ... END FOR&lt;br/&gt;&amp;gt; &amp;gt;     TOALTSTACK&lt;br/&gt;&amp;gt; &amp;gt; ... END FOR&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; DUP HASH160&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ... IF CAT AVAILABLE&lt;br/&gt;&amp;gt; &amp;gt;     FROMALTSTACK&lt;br/&gt;&amp;gt; &amp;gt;     ... FOR j in 0..=5&lt;br/&gt;&amp;gt; &amp;gt;         FROMALTSTACK&lt;br/&gt;&amp;gt; &amp;gt;         CAT&lt;br/&gt;&amp;gt; &amp;gt;     ... END FOR&lt;br/&gt;&amp;gt; &amp;gt;     EQUALVERIFY&lt;br/&gt;&amp;gt; &amp;gt; ... ELSE SUBSTRINGEQUALVERIFY AVAILABLE&lt;br/&gt;&amp;gt; &amp;gt;     ... FOR j in 0..=5&lt;br/&gt;&amp;gt; &amp;gt;         FROMALTSTACK &amp;lt;0&#43;j*4&amp;gt; &amp;lt;4&#43;j*4&amp;gt; SUBSTRINGEQUALVERIFY DROP DROP DROP&lt;br/&gt;&amp;gt; &amp;gt;     ...  END FOR&lt;br/&gt;&amp;gt; &amp;gt;     DROP&lt;br/&gt;&amp;gt; &amp;gt; ... END IF&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;lt;pk&amp;gt; CHECKSIG&lt;br/&gt;&amp;gt; &amp;gt; ```&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; That&amp;#39;s a long script... but will it fit? We need to verify 20 bytes of message&lt;br/&gt;&amp;gt; &amp;gt; each bit takes around 10 bytes script, an average of 3.375 bytes per number&lt;br/&gt;&amp;gt; &amp;gt; (counting pushes), and two 21 bytes keys = 55.375 bytes of program space and 21&lt;br/&gt;&amp;gt; &amp;gt; bytes of witness element per bit.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; It fits! `20*8*55.375 = 8860`, which leaves 1140 bytes less than the limit for&lt;br/&gt;&amp;gt; &amp;gt; the rest of the logic, which is plenty (around 15-40 bytes required for the rest&lt;br/&gt;&amp;gt; &amp;gt; of the logic, leaving 1100 free for custom signature checking). The stack size&lt;br/&gt;&amp;gt; &amp;gt; is 160 elements for the hash gadget, 3360 bytes.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This can probably be made a bit more efficient by expanding to a ternary&lt;br/&gt;&amp;gt; &amp;gt; representation.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ```&lt;br/&gt;&amp;gt; &amp;gt;         SWAP hash160 DUP &amp;lt;H(K_j_i_0)&amp;gt; EQUAL  IF DROP  ELSE &amp;lt;3**i&amp;gt; SWAP DUP &amp;lt;H(K_j_i_T)&amp;gt; EQUAL IF DROP SUB ELSE &amp;lt;H(K_j_i_1)&amp;gt; EQUALVERIFY ADD  ENDIF ENDIF&lt;br/&gt;&amp;gt; &amp;gt; ```&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This should bring it up to roughly 85 bytes per trit, and there should be 101&lt;br/&gt;&amp;gt; &amp;gt; trits (`log(2**160)/log(3) == 100.94`), so about 8560 bytes... a bit cheaper!&lt;br/&gt;&amp;gt; &amp;gt; But the witness stack is &amp;#34;only&amp;#34; `2121` bytes...&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; As a homework exercise, maybe someone can prove the optimal choice of radix for&lt;br/&gt;&amp;gt; &amp;gt; this protocol... My guess is that base 4 is optimal!&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ## Taproot?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; What about Taproot? As far as I&amp;#39;m aware the commitment scheme (`Q = pG &#43; hash(pG&lt;br/&gt;&amp;gt; &amp;gt; || m)G`) can be securely opened to m even with a quantum computer (finding `q`&lt;br/&gt;&amp;gt; &amp;gt; such that `qG = Q` might be trivial, but suppose key path was disabled, then&lt;br/&gt;&amp;gt; &amp;gt; finding m and p such that the taproot equation holds should be difficult because&lt;br/&gt;&amp;gt; &amp;gt; of the hash, but I&amp;#39;d need to certify that claim better).  Therefore this&lt;br/&gt;&amp;gt; &amp;gt; script can nest inside of a Tapscript path -- Tapscript also does not impose a&lt;br/&gt;&amp;gt; &amp;gt; length limit, 32 byte hashes could be used as well.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Further, to make keys reusable, there could be many Lamport keys comitted inside&lt;br/&gt;&amp;gt; &amp;gt; a taproot tree so that an address could be used for thousands of times before&lt;br/&gt;&amp;gt; &amp;gt; expiring. This could be used as a measure to protect accidental use rather than&lt;br/&gt;&amp;gt; &amp;gt; to support it.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Lastly, Schnorr actually has a stronger non-malleability property than ECDSA,&lt;br/&gt;&amp;gt; &amp;gt; the signatures will be binding to the approved transaction and once Lamport&lt;br/&gt;&amp;gt; &amp;gt; signed, even a quantum computer could not steal the funds.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; --&lt;br/&gt;&amp;gt; &amp;gt; @JeremyRubin&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;
    </content>
    <updated>2023-06-08T00:56:52&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszpdzg0pqc5shckhz5nsv4cxu6sx9kl8exjyute2va6mknzl6mc6szyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6q52n6w8</id>
    
      <title type="html">📅 Original date posted:2019-12-28 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszpdzg0pqc5shckhz5nsv4cxu6sx9kl8exjyute2va6mknzl6mc6szyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6q52n6w8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszchq9xd0tgdg6jv2txqzftnt8pqt0fqfe83eeywae6mc3npgqydszkeqz6&#39;&gt;nevent1q…eqz6&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-12-28&lt;br/&gt;📝 Original message:I&amp;#39;m only going to talk about cashfusion and not the knapsack paper.&lt;br/&gt;&lt;br/&gt;The language they use to describe the cashfusion protocol is very&lt;br/&gt;broad and could describe many things. Because it is hard so vague I&lt;br/&gt;don&amp;#39;t want to dismiss the cashfusion approach out of hand. For&lt;br/&gt;instance they say: &amp;#34;inputs of arbitary amounts in the neighborhood of&lt;br/&gt;~0.1 BCH&amp;#34; what exactly does this mean?&lt;br/&gt;&lt;br/&gt;Attack 1:&lt;br/&gt;If we assume arbitrary means any precision then a trivial attack is&lt;br/&gt;possible. Consider the case where one of the inputs has more precision&lt;br/&gt;than any other input. This allows an attacker to trivially break the&lt;br/&gt;privacy of that input:&lt;br/&gt;&lt;br/&gt;Lets look at a toy example that takes 12 inputs and creates 3 outputs&lt;br/&gt;inputs:&lt;br/&gt;0.1525&lt;br/&gt;0.1225&lt;br/&gt;0.1145&lt;br/&gt;0.1443&lt;br/&gt;0.1144111&lt;br/&gt;0.1001&lt;br/&gt;0.1124&lt;br/&gt;0.1093&lt;br/&gt;0.1113&lt;br/&gt;0.1134&lt;br/&gt;0.1029&lt;br/&gt;0.1206&lt;br/&gt;&lt;br/&gt;Outputs:&lt;br/&gt;0.4648111&lt;br/&gt;0.5185&lt;br/&gt;0.4349&lt;br/&gt;&lt;br/&gt;Clearly output output 0.4648111 contains input 0.1144111.&lt;br/&gt;&lt;br/&gt;Attack 2:&lt;br/&gt;Let&amp;#39;s say you attempt to address this problem this by limiting the&lt;br/&gt;precision of inputs to two decimal places i.e. 0.1X where 0&amp;lt;=X&amp;lt;=9.&lt;br/&gt;Consider the case of 10 users where each user is always joining sets&lt;br/&gt;of 10 inputs to create 1 output. Thus in total you would have 100&lt;br/&gt;inputs and 10 outputs in the coinjoin. If one of those outputs is 2&lt;br/&gt;then you know its inputs must all be 0.2. Using this method you can&lt;br/&gt;start eliminate input output pairs far faster brute force. How much&lt;br/&gt;faster is hard to say without adding additional assumptions for&lt;br/&gt;instance are these inputs amounts drawn from a uniform distribution?&lt;br/&gt;&lt;br/&gt;I want to be clear. I&amp;#39;m not saying cashfusion is broken or that this&lt;br/&gt;more inputs than outputs technique is a dead end. However the&lt;br/&gt;description given is vague and could be interpreted to describe a&lt;br/&gt;broken protocol. Is this actively being used?&lt;br/&gt;&lt;br/&gt;On Fri, Dec 27, 2019 at 8:29 PM nopara73 via bitcoin-dev&lt;br/&gt;&amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The CashFusion research came out of the Bitcoin Cash camp, thus this probably went under the radar of many of you. I would like to ask your opinions on the research&amp;#39;s claim that, if non-equal value coinjoins can be really relied on for privacy or not.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (Btw, there were also similar ideas in the Knapsack paper in 2017: &lt;a href=&#34;https://www.comsys.rwth-aachen.de/fileadmin/papers/2017/2017-maurer-trustcom-coinjoin.pdf&#34;&gt;https://www.comsys.rwth-aachen.de/fileadmin/papers/2017/2017-maurer-trustcom-coinjoin.pdf&lt;/a&gt; )&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/cashshuffle/spec/blob/master/CASHFUSION.md#avoiding-amount-linkages-through-combinatorics&#34;&gt;https://github.com/cashshuffle/spec/blob/master/CASHFUSION.md#avoiding-amount-linkages-through-combinatorics&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I copy the most relevant paragraphs here:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   ---------BEGIN QUOTE ---------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Consider a transaction where 10 people have each brought 10 inputs of arbitary amounts in the neighborhood of ~0.1 BCH. One input might be 0.03771049 BCH; the next might be 0.24881232 BCH, etc. All parties have chosen to consolidate their coins, so the transaction has 10 outputs of around 1 BCH. So the transaction has 100 inputs, and 10 outputs. The first output might be 0.91128495, the next could be 1.79783710, etc.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now, there are 100!/(10!)^10 ~= 10^92 ways to partition the inputs into a list of 10 sets of 10 inputs, but only a tiny fraction of these partitions will produce the precise output list. So, how many ways produce this exact output list? We can estimate with some napkin math. First, recognize that for each partitioning, each output will typically land in a range of ~10^8 discrete possibilities (around 1 BCH wide, with a 0.00000001 BCH resolution). The first 9 outputs all have this range of possibilities, and the last will be constrained by the others. So, the 10^92 possibilies will land somewhere within a 9-dimensional grid that cointains (10^8)^9=10^72 possible distinct sites, one site which is our actual output list. Since we are stuffing 10^92 possibilties into a grid that contains only 10^72 sites, then this means on average, each site will have 10^20 possibilities.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Based on the example above, we can see that not only are there a huge number of partitions, but that even with a fast algorithm that could find matching partitions, it would produce around 10^20 possible valid configurations. With 10^20 possibilities, there is essentially no linkage. The Cash Fusion scheme actually extends this obfuscation even further. Not only can players bring many inputs, they can also have multiple outputs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ---------END QUOTE ---------&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Best,&lt;br/&gt;&amp;gt; Ádám&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;
    </content>
    <updated>2023-06-07T20:22:09&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2hca3ezujxsveyyp60rzqzy29q4c0s505j8ape6z5zqftfwn3xkczyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qnyckp8</id>
    
      <title type="html">📅 Original date posted:2019-10-01 📝 Original message:&amp;gt;I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2hca3ezujxsveyyp60rzqzy29q4c0s505j8ape6z5zqftfwn3xkczyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qnyckp8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsftmatxgmtmululrzfp3y2xeqtkg7d0pll0wucnl2jlj7s7ym7w4cg5w4f8&#39;&gt;nevent1q…w4f8&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-10-01&lt;br/&gt;📝 Original message:&amp;gt;I don&amp;#39;t find too compelling the potential problem of a &amp;#39;bad wallet designer&amp;#39;, whether lazy or dogmatic, misusing noinput. I think there are simpler ways to cut corners and there will always be plenty of good wallet options people can choose.&lt;br/&gt;&lt;br/&gt;I want to second this. The most expensive part of wallet design is&lt;br/&gt;engineering time. Writing code that uses a new sighash or a custom&lt;br/&gt;script with a OP_CODE is a very large barrier to use. How many wallets&lt;br/&gt;support multisig or RBF? How much BTC has been stolen over the entire&lt;br/&gt;history of Bitcoin because of sighash SIGHASH_NONE or SIGHASH_SINGLE&lt;br/&gt;vs ECDSA nonce reuse?&lt;br/&gt;&lt;br/&gt;On Tue, Oct 1, 2019 at 9:35 AM Richard Myers &amp;lt;rich at gotenna.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks Christian for pulling together this concise summary.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 1.  General agreement on the usefulness of noinput / anyprevoutanyscript /&lt;br/&gt;&amp;gt;&amp;gt;     anyprevout.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I certainly support the unification and adoption of the sighash_noinput and anyprevoutput* proposals to enable eltoo, but also to make possible better off-chain protocol designs generally.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Among the various advantages previously discussed, the particular use case benefits from eltoo I want to take advantage of is less interactive payment channel negotiation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In talking with people about eltoo this summer, I found most people generally support adding this as an option to Lightning. The only general concern I heard, if any,  was the vague idea that rebindable transactions could be somehow misused or abused.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe when these concerns are made more concrete they can be classified and addressed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t find too compelling the potential problem of a &amp;#39;bad wallet designer&amp;#39;, whether lazy or dogmatic, misusing noinput. I think there are simpler ways to cut corners and there will always be plenty of good wallet options people can choose.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Because scripts signed with no_input signatures are only really exchanged and used for off-chain negotiations, very few should ever appear on chain. Those that do should represent non-cooperative situations that involve signing parties who know not to reuse or share scripts with these public keys again. No third party has any reason to spend value to a multisignature script they don&amp;#39;t control, whether or not a no_input signature exists for it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 2.  Is there strong support or opposition to the chaperone signatures&lt;br/&gt;&amp;gt;&amp;gt;     introduced in anyprevout / anyprevoutanyscript? I think it&amp;#39;d be best to&lt;br/&gt;&amp;gt;&amp;gt;     formulate a concrete set of pros and contras, rather than talk about&lt;br/&gt;&amp;gt;&amp;gt;     abstract dangers or advantages.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As I mentioned before, I don&amp;#39;t think the lazy wallet designer advantage is enough to justify the downsides of chaperone signatures. One additional downside is the additional code complexity required to flag whether or not a chaperone output is included. By comparison, the code changes for creating a no_input digest that skips the prevout and prevscript parts of a tx is much less intrusive and easier to maintain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 3.  The same for output tagging / explicit opt-in. What are the advantages and&lt;br/&gt;&amp;gt;&amp;gt;     disadvantages?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I see the point ZmnSCPxj makes about tagged outputs negatively impacting the anonymity set of taproot transactions. The suggested work around would impose a cost to unilateral closes of an additional translation transaction and not using the work around would cause a hit to anonymity for off-chain script users. I feel both costs are too high relative to the benefit gained of preventing sloppy reuse of public keys.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 4.  Shall we merge BIP-118 and bip-anyprevout. This would likely reduce the&lt;br/&gt;&amp;gt;&amp;gt;     confusion and make for simpler discussions in the end.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe they should be merged. I also think both chaperone signatures and output tagging should become part of the discussion of security alternatives, but not part of the initial specification.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I understand the desire to be conservative with protocol changes that could be misused. However, with just taproot and taproot public key types the anyprevout functionality is already very opt-in and not something that might accidentally get used. Belt-and-suspender protections like chaperone signatures and tagged outputs have their own impacts on code complexity, on-chain transaction sizes and transaction anonymity that also must be considered.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe efforts like descriptors will help people follow best practices when working with complex scripts without pushing extra complexity for safety into the consensus layer of bitcoin. Anywhere we can make core code simpler, and handle foot-guns in higher level non-consensus code, the better.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;
    </content>
    <updated>2023-06-07T20:20:50&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszva7s2e34p7la6cwkykqz90eveqptz784kk6m5cl5cqtnd76xazgzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qzncjrl</id>
    
      <title type="html">📅 Original date posted:2019-08-02 📝 Original message:Attack ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszva7s2e34p7la6cwkykqz90eveqptz784kk6m5cl5cqtnd76xazgzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qzncjrl" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsye53yl6zaj7766hvqhgz6nwk5vrmlzeyka5t7943lh80k2rzjx9qf5v8vu&#39;&gt;nevent1q…v8vu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-08-02&lt;br/&gt;📝 Original message:Attack 1:&lt;br/&gt;I partition (i.e. eclipse) a bunch of nodes from the network this partition&lt;br/&gt;contains no mining power . I then mine 145 blocks for this partition. I&lt;br/&gt;don&amp;#39;t even need 51% of the mining power because I&amp;#39;m not competing with any&lt;br/&gt;other miners. Under this rule this partition will hardfork from the network&lt;br/&gt;permanently. Under current rules this partition will be able to rejoin the&lt;br/&gt;network as the least weight chain will be orphaned.&lt;br/&gt;&lt;br/&gt;Attack 2:&lt;br/&gt;I pre-mine 145 blocks. A node goes offline for 24 hours, when it rejoins I&lt;br/&gt;feed it 145 blocks which fork off from the consensus chain. I have 24&#43;24&lt;br/&gt;hours to mine these 145 blocks so I should be able to do this with 25% of&lt;br/&gt;the current hash rate at the time the node went offline. Under your rule&lt;br/&gt;each of these offline--&amp;gt;online nodes I attack this way will hardfork&lt;br/&gt;themselves from the rest of the network.&lt;br/&gt;&lt;br/&gt;I believe a moving-checkpoint rule as describe above would make Bitcoin&lt;br/&gt;more vulnerable to 51% attacks.&lt;br/&gt;&lt;br/&gt;A safer rule would be if a node detects a fork with both sides of the split&lt;br/&gt;having  length &amp;gt; 144 blocks, it halts and requests user intervention to&lt;br/&gt;determine which chain to follow.  I don&amp;#39;t think 144 blocks is a great&lt;br/&gt;number to use here as 24 hours is very short. I suspect you could improve&lt;br/&gt;the security of the rule by making the number of blocks a fork most reach&lt;br/&gt;to halt the network proportional to the difference in time between the&lt;br/&gt;timestamp in the block prior to the fork and the current time. I am **NOT**&lt;br/&gt;proposing Bitcoin adopt such a rule.&lt;br/&gt;&lt;br/&gt;NXT has a fundamentally different security model as it uses Proof-of-stake&lt;br/&gt;rather than Proof-of-Work.&lt;br/&gt;&lt;br/&gt;On Wed, Jul 31, 2019 at 2:37 PM Kenshiro [] via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; P.S.: To be clearer, in this example I set an N value of 144 blocks, which&lt;br/&gt;&amp;gt; is approximately 24 hours.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ------------------------------&lt;br/&gt;&amp;gt; *From:* Kenshiro [] &amp;lt;tensiam at hotmail.com&amp;gt;&lt;br/&gt;&amp;gt; *Sent:* Wednesday, July 31, 2019 16:40&lt;br/&gt;&amp;gt; *To:* Alistair Mann &amp;lt;al at pectw.net&amp;gt;; Bitcoin Protocol Discussion &amp;lt;&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt;&lt;br/&gt;&amp;gt; *Subject:* Re: [bitcoin-dev] Add a moving checkpoint to the Bitcoin&lt;br/&gt;&amp;gt; protocol&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; How would a (potentially, state-sponsored) netsplit lasting longer&lt;br/&gt;&amp;gt; than N be&lt;br/&gt;&amp;gt; handled?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It would be detected by the community much before reaching the reorg limit&lt;br/&gt;&amp;gt; of N blocks (it&amp;#39;s 24 hours) so nodes could stop until the netsplit is&lt;br/&gt;&amp;gt; fixed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the extreme case no one notice the network split during more than N&lt;br/&gt;&amp;gt; blocks (24 hours) and there are 2 permanent forks longer than N, nodes&lt;br/&gt;&amp;gt; from one branch could delete their local history so they would join the&lt;br/&gt;&amp;gt; other branch.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ------------------------------&lt;br/&gt;&amp;gt; *From:* Alistair Mann &amp;lt;al at pectw.net&amp;gt;&lt;br/&gt;&amp;gt; *Sent:* Wednesday, July 31, 2019 15:59&lt;br/&gt;&amp;gt; *To:* Kenshiro [] &amp;lt;tensiam at hotmail.com&amp;gt;; Bitcoin Protocol Discussion &amp;lt;&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt;&lt;br/&gt;&amp;gt; *Subject:* Re: [bitcoin-dev] Add a moving checkpoint to the Bitcoin&lt;br/&gt;&amp;gt; protocol&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Wednesday 31 Jul 2019 12:28:58 Kenshiro [] via bitcoin-dev wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I would like to propose that a &amp;#34;moving checkpoint&amp;#34; is added to the&lt;br/&gt;&amp;gt; Bitcoin&lt;br/&gt;&amp;gt; &amp;gt; protocol. It&amp;#39;s a very simple rule already implemented in NXT coin:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; - A node will ignore any new block under nodeBlockHeight - N, so the&lt;br/&gt;&amp;gt; &amp;gt; blockchain becomes truly immutable after N blocks, even during a 51%&lt;br/&gt;&amp;gt; attack&lt;br/&gt;&amp;gt; &amp;gt; which thanks to the moving checkpoint can&amp;#39;t rewrite history older than&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt; &amp;gt; last N blocks.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; How would a (potentially, state-sponsored) netsplit lasting longer than N&lt;br/&gt;&amp;gt; be&lt;br/&gt;&amp;gt; handled?&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Alistair Mann&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;-------------- 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/20190802/9071fcc3/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190802/9071fcc3/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:19:49&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsz9sqz99j0psfkne27rxpeusy8r54v7pamg8jtqhurm2s4eqvs7pszyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qmj8vqe</id>
    
      <title type="html">📅 Original date posted:2019-04-18 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsz9sqz99j0psfkne27rxpeusy8r54v7pamg8jtqhurm2s4eqvs7pszyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qmj8vqe" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv63mxlsp24zn4ppn3kaqu9z5clmgqvthq4yp82kzfw7skapa6c6snv2e43&#39;&gt;nevent1q…2e43&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-04-18&lt;br/&gt;📝 Original message:Hi ZmnSCPxj,&lt;br/&gt;&lt;br/&gt;Let&amp;#39;s see if I understand what you are saying. In your scenario chain&lt;br/&gt;A consists of honest miners (10% of the hash rate) and chain B  (90%&lt;br/&gt;of the hash rate) consists of dishonest miners who are inflating the&lt;br/&gt;coin supply.&lt;br/&gt;&lt;br/&gt;Chain A: S, S&#43;1&lt;br/&gt;Chain B: S, S&#43;1 (invalid), S&#43;2, S&#43;3, S&#43;4, S&#43;5, S&#43;6, S&#43;7, S&#43;8, S&#43;9&lt;br/&gt;&lt;br/&gt;Chain B S&#43;1 has a invalid coinbase&lt;br/&gt;&lt;br/&gt;&amp;gt;At around height S&#43;9, the minority miners generate an alternate block at height S&#43;1. So SPV nodes download S&#43;9 and S&#43;8 on the longer chain, and see nothing wrong with those blocks.&lt;br/&gt;&lt;br/&gt;What I am suggesting is that when the minority miners generate an&lt;br/&gt;alternate block at S&#43;1 (chain A) the SPV node would download blocks&lt;br/&gt;S&#43;1 and S&#43;2 from chain B (the dishonest chain). Since S&#43;1 has the&lt;br/&gt;invalid coinbase the SPV node would learn that chain B is invalid and&lt;br/&gt;abandon it.&lt;br/&gt;&lt;br/&gt;Bitcoin is in big trouble if a malicious party controls 90% of the&lt;br/&gt;mining power. The malicious miners can spend &#43;11% of their mining&lt;br/&gt;power ensuring that the honest chain never reaches consensus by&lt;br/&gt;continuously forking it. The malicious miners can then extend their&lt;br/&gt;favored chain using the other 79% of the mining power. This would&lt;br/&gt;produce a scenario in which users are forced to choose between a&lt;br/&gt;stable chain that violates a consensus rule and an unstable honest&lt;br/&gt;chain that is completely unusable and which never pays out mining&lt;br/&gt;rewards. I agree that SPV nodes and many wallets would make this even&lt;br/&gt;worse especially in their current condition where they just trust the&lt;br/&gt;hash rate/wallet provider and there are no fraud proofs.&lt;br/&gt;&lt;br/&gt;On Thu, Apr 18, 2019 at 8:25 PM ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Good morning Ethan,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sent with ProtonMail Secure Email.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;&amp;gt; On Friday, April 19, 2019 4:12 AM, Ethan Heilman &amp;lt;eth3rs at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;m probably repeating a point which has been said before.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; I suppose a minority miner that wants to disrupt the network could simply create a valid block at block N&#43;1 and deliberately ignore every other valid block at N&#43;1, N&#43;2, N&#43;3 etc. that it did not create itself.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If this minority miner has &amp;gt; 10% of network hashrate, then the rule of&lt;br/&gt;&amp;gt; &amp;gt; thumb above would, on average, give it the ability to disrupt the&lt;br/&gt;&amp;gt; &amp;gt; SPV-using network.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Proposed rule:&lt;br/&gt;&amp;gt; &amp;gt; Whenever a chainsplit occurs SPV clients should download and validate&lt;br/&gt;&amp;gt; &amp;gt; the &amp;#34;longest chain&amp;#34; up to more than one block greater than the height&lt;br/&gt;&amp;gt; &amp;gt; of the losing chain.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Lets say a block split causes chain A and chain B: Chain A is N blocks&lt;br/&gt;&amp;gt; &amp;gt; long, chain B is M blocks long, and N &amp;lt; M. Then the SPV client should&lt;br/&gt;&amp;gt; &amp;gt; download all the block data of N&#43;1 blocks from Chain B to verify&lt;br/&gt;&amp;gt; &amp;gt; availability of chain B. Once the SPV client has verified that chain B&lt;br/&gt;&amp;gt; &amp;gt; is available they can use fraud proofs determine if chain B is valid.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let us then revert to the original scenario.&lt;br/&gt;&amp;gt; Suppose a supermajority (90%) of miners decide to increase inflation of the currency.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; They do this by imposing the rule:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1.  For 1 block, the coinbase is 21,000,000 times the pre-fork coinbase value.&lt;br/&gt;&amp;gt; 2.  For 9 blocks, the coinbase is the pre-fork value.&lt;br/&gt;&amp;gt; 3.  Repeat this pattern every 10 blocks.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The above is a hardfork.&lt;br/&gt;&amp;gt; However, as they believe that SPV nodes dominate the economy, this mining supermajority believes it can take over the network hashpower and impose its will on the network.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; At height S&#43;1, they begin the above rule.&lt;br/&gt;&amp;gt; This implies that at heights S&#43;1, S&#43;11, S&#43;21, s&#43;31... the coinbase violates the pre-hardfork rules.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; At around height S&#43;9, the minority miners generate an alternate block at height S&#43;1.&lt;br/&gt;&amp;gt; So SPV nodes download S&#43;9 and S&#43;8 on the longer chain, and see nothing wrong with those blocks.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; At around height S&#43;18, the minority miners generate an alternate block at height S&#43;2.&lt;br/&gt;&amp;gt; So SPV nodes download S&#43;18, S&#43;17, S&#43;16 and again see nothing wrong with those blocsk.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This can go on for a good amount of time.&lt;br/&gt;&amp;gt; With a &amp;#34;rare enough&amp;#34; inflation event, miners may even be able to spend some coinbases on SPV nodes that SPV nodes become unwilling to revert to the minority pre-hardfork chain, economically locking in the post-hardfork inflation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Again: every rule is an opportunity to loophole.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; An attacker could use this to force SPV clients to download 1 block&lt;br/&gt;&amp;gt; &amp;gt; per block the attacker mines. This is strictly weaker security than&lt;br/&gt;&amp;gt; &amp;gt; provided by a full-node because chain B will only be validated if the&lt;br/&gt;&amp;gt; &amp;gt; client knows chain A exists. If the SPV client&amp;#39;s view of the&lt;br/&gt;&amp;gt; &amp;gt; blockchain is eclipsed then the client will never learn that chain A&lt;br/&gt;&amp;gt; &amp;gt; exists and thus never validate chain B&amp;#39;s availability nor will the&lt;br/&gt;&amp;gt; &amp;gt; client be able to learn fraud proofs about chain B. A full node in&lt;br/&gt;&amp;gt; &amp;gt; this circumstance would notice that the chain B is invalid and reject&lt;br/&gt;&amp;gt; &amp;gt; it because a full node would not depend on fraud proofs. That being&lt;br/&gt;&amp;gt; &amp;gt; said this rule would provide strictly more security than current SPV&lt;br/&gt;&amp;gt; &amp;gt; clients.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; On Thu, Apr 18, 2019 at 3:08 PM ZmnSCPxj via bitcoin-dev&lt;br/&gt;&amp;gt; &amp;gt; bitcoin-dev at lists.linuxfoundation.org wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Good morning Ruben,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Sent with ProtonMail Secure Email.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; On Thursday, April 18, 2019 9:44 PM, Ruben Somsen via bitcoin-dev bitcoin-dev at lists.linuxfoundation.org wrote:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Simplified-Payment-Verification (SPV) is secure under the assumption&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; that the chain with the most Proof-of-Work (PoW) is valid. As many&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; have pointed out before, and attacks like Segwit2x have shown, this is&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; not a safe assumption. What I propose below improves this assumption&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; -- invalid blocks will be rejected as long as there are enough honest&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; miners to create a block within a reasonable time frame. This still&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; doesn’t fully inoculate SPV clients against dishonest miners, but is a&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; clear improvement over regular SPV (and compatible with the privacy&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; improvements of BIP157[0]).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The idea is that a fork is an indication of potential misbehavior --&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; its block header can serve as a PoW fraud proof. Conversely, the lack&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; of a fork is an indication that a block is valid. If a fork is created&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; from a block at height N, this means a subset of miners may disagree&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; on the validity of block N&#43;1. If SPV clients download and verify this&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; block, they can judge for themselves whether or not the chain should&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; be rejected. Of course it could simply be a natural fork, in which&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; case we continue following the chain with the most PoW.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; I presume you mean a chain split?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The way Bitcoin currently works, it is impossible to verify the&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; validity of block N&#43;1 without knowing the UTXO set at block N, even if&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; you are willing to assume that block N (and everything before it) is&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; valid. This would change with the introduction of UTXO set&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; commitments, allowing block N&#43;1 to be validated by verifying whether&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; its inputs are present in the UTXO set that was committed to in block&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; N. An open question is whether a similar result can be achieved&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; without a soft fork that commits to the UTXO set[0][1].&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; If an invalid block is created and only 10% of the miners are honest,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; on average it would take 100 minutes for a valid block to appear.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; During this time, the SPV client will be following the invalid chain&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; and see roughly 9 confirmations before the chain gets rejected. It may&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; therefore be prudent to wait for a number of confirmations that&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; corresponds to the time it may take for the conservative percentage of&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; miners that you think may behave honestly to create a block (including&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; variance).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; I suppose a minority miner that wants to disrupt the network could simply create a valid block at block N&#43;1 and deliberately ignore every other valid block at N&#43;1, N&#43;2, N&#43;3 etc. that it did not create itself.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; If this minority miner has &amp;gt; 10% of network hashrate, then the rule of thumb above would, on average, give it the ability to disrupt the SPV-using network.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 10% of network hashrate to disrupt the SPV-using nodes would be a rather low bar to disruption.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Consider that SPV-using nodes would be disrupted, without this rule, only by &amp;gt;50% network hashrate.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; It is helpful to consider that every rule you impose is potentially a loophole by which a new attack is possible.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Regards,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;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;
    </content>
    <updated>2023-06-07T20:17:41&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8yxyj0ygpw8zysrm78vfa2z9m69z6z4gsq9qcq422r33d9w0es0gzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6q550ex3</id>
    
      <title type="html">📅 Original date posted:2019-04-18 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8yxyj0ygpw8zysrm78vfa2z9m69z6z4gsq9qcq422r33d9w0es0gzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6q550ex3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsda69qcll48r8xrqdpntn5ju90y09v9c68ph5qgen48qzglt9xdasaj893d&#39;&gt;nevent1q…893d&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-04-18&lt;br/&gt;📝 Original message:I&amp;#39;m probably repeating a point which has been said before.&lt;br/&gt;&lt;br/&gt;&amp;gt;I suppose a minority miner that wants to disrupt the network could simply create a *valid* block at block N&#43;1 and deliberately ignore every other valid block at N&#43;1, N&#43;2, N&#43;3 etc. that it did not create itself.&lt;br/&gt;If this minority miner has &amp;gt; 10% of network hashrate, then the rule of&lt;br/&gt;thumb above would, on average, give it the ability to disrupt the&lt;br/&gt;SPV-using network.&lt;br/&gt;&lt;br/&gt;Proposed rule:&lt;br/&gt;Whenever a chainsplit occurs SPV clients should download and validate&lt;br/&gt;the &amp;#34;longest chain&amp;#34; up to more than one block greater than the height&lt;br/&gt;of the losing chain.&lt;br/&gt;&lt;br/&gt;Lets say a block split causes chain A and chain B: Chain A is N blocks&lt;br/&gt;long, chain B is M blocks long, and N &amp;lt; M. Then the SPV client should&lt;br/&gt;download all the block data of N&#43;1 blocks from Chain B to verify&lt;br/&gt;availability of chain B. Once the SPV client has verified that chain B&lt;br/&gt;is available they can use fraud proofs determine if chain B is valid.&lt;br/&gt;&lt;br/&gt;An attacker could use this to force SPV clients to download 1 block&lt;br/&gt;per block the attacker mines. This is strictly weaker security than&lt;br/&gt;provided by a full-node because chain B will only be validated if the&lt;br/&gt;client knows chain A exists. If the SPV client&amp;#39;s view of the&lt;br/&gt;blockchain is eclipsed then the client will never learn that chain A&lt;br/&gt;exists and thus never validate chain B&amp;#39;s availability nor will the&lt;br/&gt;client be able to learn fraud proofs about chain B. A full node in&lt;br/&gt;this circumstance would notice that the chain B is invalid and reject&lt;br/&gt;it because a full node would not depend on fraud proofs. That being&lt;br/&gt;said this rule would provide strictly more security than current SPV&lt;br/&gt;clients.&lt;br/&gt;&lt;br/&gt;On Thu, Apr 18, 2019 at 3:08 PM ZmnSCPxj via bitcoin-dev&lt;br/&gt;&amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Good morning Ruben,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sent with ProtonMail Secure Email.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;&amp;gt; On Thursday, April 18, 2019 9:44 PM, Ruben Somsen via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Simplified-Payment-Verification (SPV) is secure under the assumption&lt;br/&gt;&amp;gt; &amp;gt; that the chain with the most Proof-of-Work (PoW) is valid. As many&lt;br/&gt;&amp;gt; &amp;gt; have pointed out before, and attacks like Segwit2x have shown, this is&lt;br/&gt;&amp;gt; &amp;gt; not a safe assumption. What I propose below improves this assumption&lt;br/&gt;&amp;gt; &amp;gt; -- invalid blocks will be rejected as long as there are enough honest&lt;br/&gt;&amp;gt; &amp;gt; miners to create a block within a reasonable time frame. This still&lt;br/&gt;&amp;gt; &amp;gt; doesn’t fully inoculate SPV clients against dishonest miners, but is a&lt;br/&gt;&amp;gt; &amp;gt; clear improvement over regular SPV (and compatible with the privacy&lt;br/&gt;&amp;gt; &amp;gt; improvements of BIP157[0]).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The idea is that a fork is an indication of potential misbehavior --&lt;br/&gt;&amp;gt; &amp;gt; its block header can serve as a PoW fraud proof. Conversely, the lack&lt;br/&gt;&amp;gt; &amp;gt; of a fork is an indication that a block is valid. If a fork is created&lt;br/&gt;&amp;gt; &amp;gt; from a block at height N, this means a subset of miners may disagree&lt;br/&gt;&amp;gt; &amp;gt; on the validity of block N&#43;1. If SPV clients download and verify this&lt;br/&gt;&amp;gt; &amp;gt; block, they can judge for themselves whether or not the chain should&lt;br/&gt;&amp;gt; &amp;gt; be rejected. Of course it could simply be a natural fork, in which&lt;br/&gt;&amp;gt; &amp;gt; case we continue following the chain with the most PoW.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I presume you mean a chain split?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The way Bitcoin currently works, it is impossible to verify the&lt;br/&gt;&amp;gt; &amp;gt; validity of block N&#43;1 without knowing the UTXO set at block N, even if&lt;br/&gt;&amp;gt; &amp;gt; you are willing to assume that block N (and everything before it) is&lt;br/&gt;&amp;gt; &amp;gt; valid. This would change with the introduction of UTXO set&lt;br/&gt;&amp;gt; &amp;gt; commitments, allowing block N&#43;1 to be validated by verifying whether&lt;br/&gt;&amp;gt; &amp;gt; its inputs are present in the UTXO set that was committed to in block&lt;br/&gt;&amp;gt; &amp;gt; N. An open question is whether a similar result can be achieved&lt;br/&gt;&amp;gt; &amp;gt; without a soft fork that commits to the UTXO set[0][1].&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If an invalid block is created and only 10% of the miners are honest,&lt;br/&gt;&amp;gt; &amp;gt; on average it would take 100 minutes for a valid block to appear.&lt;br/&gt;&amp;gt; &amp;gt; During this time, the SPV client will be following the invalid chain&lt;br/&gt;&amp;gt; &amp;gt; and see roughly 9 confirmations before the chain gets rejected. It may&lt;br/&gt;&amp;gt; &amp;gt; therefore be prudent to wait for a number of confirmations that&lt;br/&gt;&amp;gt; &amp;gt; corresponds to the time it may take for the conservative percentage of&lt;br/&gt;&amp;gt; &amp;gt; miners that you think may behave honestly to create a block (including&lt;br/&gt;&amp;gt; &amp;gt; variance).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I suppose a minority miner that wants to disrupt the network could simply create a *valid* block at block N&#43;1 and deliberately ignore every other valid block at N&#43;1, N&#43;2, N&#43;3 etc. that it did not create itself.&lt;br/&gt;&amp;gt; If this minority miner has &amp;gt; 10% of network hashrate, then the rule of thumb above would, on average, give it the ability to disrupt the SPV-using network.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;10% of network hashrate to disrupt the SPV-using nodes would be a rather low bar to disruption.&lt;br/&gt;&amp;gt; Consider that SPV-using nodes would be disrupted, without this rule, only by &amp;gt;50% network hashrate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It is helpful to consider that every rule you impose is potentially a loophole by which a new attack is possible.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&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;
    </content>
    <updated>2023-06-07T20:17:40&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxezhztry3h4crayxen6y6t8lsju5h02ejy4eszewayqndslcjrfczyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6ql0q9pa</id>
    
      <title type="html">📅 Original date posted:2017-05-22 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxezhztry3h4crayxen6y6t8lsju5h02ejy4eszewayqndslcjrfczyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6ql0q9pa" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsr9r7pa3sq79nxg8ydsymsetureae96s0aj0244td0glte3st989cnk3vlp&#39;&gt;nevent1q…3vlp&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-05-22&lt;br/&gt;📝 Original message:&amp;gt;It&amp;#39;d help your case if you gave us some examples of such scripts being&lt;br/&gt;used.&lt;br/&gt;&lt;br/&gt;I want OP_CAT so that I can securely and compactly verify many hashes and&lt;br/&gt;hash preimages. This would shrink offchain Tumblebit transactions&lt;br/&gt;significantly.&lt;br/&gt;&lt;br/&gt;For instance if I want a transaction TxA which checks that a transaction&lt;br/&gt;TxB releases preimages x1,x2,...,x10 such that&lt;br/&gt;y1=H(x1), y2=H(x2),...,y10=H(x10). Currently I just put y1,...y10 and check&lt;br/&gt;that the preimahes hash correctly. With OP_CAT I would only have to store&lt;br/&gt;one hash in TxA, yhash&lt;br/&gt;&lt;br/&gt;ytotal = H(OP_CAT(H(OP_CAT(y1, y2)),y3)...y10)&lt;br/&gt;&lt;br/&gt;TxA could then just hash all the preimages supplied by TxB and confirm they&lt;br/&gt;hash to TxA. This would reduce the size of TxA from approx 10*32B to&lt;br/&gt;32&#43;10*16B. I have a version which improves this further but it is more&lt;br/&gt;complex.&lt;br/&gt;&lt;br/&gt;Most of the math OP codes aren&amp;#39;t particularly helpful due to their 32bit&lt;br/&gt;nature and their strange overflow behavior.&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/20170522/7a13e539/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170522/7a13e539/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:01:20&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgcprry56nkq9wud2wkyqmvxz99l8cnysgumv5zaey2hep0r5j6rqzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6q3ull6f</id>
    
      <title type="html">📅 Original date posted:2017-02-25 📝 Original message:I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgcprry56nkq9wud2wkyqmvxz99l8cnysgumv5zaey2hep0r5j6rqzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6q3ull6f" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsy45c97m98rnhydtqrwaxtjwsufkg6um50d0pg32303qpcwmfg6fgdesftz&#39;&gt;nevent1q…sftz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-02-25&lt;br/&gt;📝 Original message:I strongly encourage Bitcoin to move from 80-bit collision resistance&lt;br/&gt;(RIPEMD-160) to 128-bit collision resistance (SHA-256).&lt;br/&gt;&lt;br/&gt;On Sat, Feb 25, 2017 at 5:14 PM, Pieter Wuille via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Feb 25, 2017 14:09, &amp;#34;Steve Davis via bitcoin-dev&amp;#34; &amp;lt;bitcoin-dev at lists.&lt;br/&gt;&amp;gt; linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hi Peter,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I really, really don’t want to get into it but segwit has many aspects&lt;br/&gt;&amp;gt; that are less appealing, not least of which being the amount of time it&lt;br/&gt;&amp;gt; would take to reach the critical mass.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Surely there&amp;#39;s a number of alternative approaches which could be explored,&lt;br/&gt;&amp;gt; even if only to make a fair assessment of a best response?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Any alternative to move us away from RIPEMD160 would require:&lt;br/&gt;&amp;gt; * A drafting of a softfork proposal, implementation, testing, review.&lt;br/&gt;&amp;gt; * A new address format&lt;br/&gt;&amp;gt; * Miners accepting the new consensus rules&lt;br/&gt;&amp;gt; * Wallets adopting the new address format, both on the sender side and&lt;br/&gt;&amp;gt; receiver side (which requires new signatures).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I.e., exactly the same as segwit, for which most of these are already&lt;br/&gt;&amp;gt; done. And it would still only apply to wallets adopting it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Pieter&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;-------------- 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/7fecc6c7/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170225/7fecc6c7/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T19:56:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsx0zjrw9qx6u3tczp49qjnqjll9270a34sux2ztd3jyqwpgjzy9dqzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qrw3qjm</id>
    
      <title type="html">📅 Original date posted:2017-02-25 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsx0zjrw9qx6u3tczp49qjnqjll9270a34sux2ztd3jyqwpgjzy9dqzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qrw3qjm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0y4mz6zethktn60dd6729gqnwcmj43jv63p04npc9wmpxytr5ftc6h5jmc&#39;&gt;nevent1q…5jmc&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;You have to not only produce a ripemd160 collision, you have to produce a&lt;br/&gt;collision that is also a valid sha-256 hash - and that&amp;#39;s much much much&lt;br/&gt;more difficult.&lt;br/&gt;&lt;br/&gt;I agree that merely finding a collision in RIPEMD-160 will be hard to use&lt;br/&gt;in Bitcoin.&lt;br/&gt;&lt;br/&gt;However finding a collision in RIPEMD-160(SHA-256(msg)) via bruteforce&lt;br/&gt;(2^80 queries) is not particular more difficult than finding a collision in&lt;br/&gt;RIPEMD-160 via brute force. Furthermore if you find a collision in&lt;br/&gt;RIPEMD-160(SHA-256(msg)) you also get a valid SHA-256 hash for which you&lt;br/&gt;know the preimage.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Sat, Feb 25, 2017 at 1:19 PM, Alice Wonder via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On 02/25/2017 08:10 AM, Ethan Heilman via bitcoin-dev wrote:&lt;br/&gt;&amp;gt;&lt;br/&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;&lt;br/&gt;&amp;gt;&amp;gt; 160bits isn&amp;#39;t enough.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&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; Assuming RIPEMD-160(SHA-256(msg)) has no flaws (i.e. is a random&lt;br/&gt;&amp;gt;&amp;gt; oracle), collisions can be generated in 2^80 queries (actually detecting&lt;br/&gt;&amp;gt;&amp;gt; these collisions requires some time-memory additional trade-offs). The&lt;br/&gt;&amp;gt;&amp;gt; Bitcoin network at the current hash rate performs roughly SHA-256 ~2^78&lt;br/&gt;&amp;gt;&amp;gt; queries a day or 2^80 queries every four days.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; You have to not only produce a ripemd160 collision, you have to produce a&lt;br/&gt;&amp;gt; collision that is also a valid sha-256 hash - and that&amp;#39;s much much much&lt;br/&gt;&amp;gt; more difficult.&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;-------------- 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/11c54e30/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170225/11c54e30/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T19:56:43&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqanzmktw8fsgjgfs9fjmh03q5af96exp2050gvuzfw36grehftygzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qlvpedt</id>
    
      <title type="html">📅 Original date posted:2017-02-25 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqanzmktw8fsgjgfs9fjmh03q5af96exp2050gvuzfw36grehftygzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qlvpedt" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2td2u7kz7eyvvsl0ezt8x4jm43hnzmxfzpfgypa54w6z3erszz4sgalpaa&#39;&gt;nevent1q…lpaa&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;SHA1 is insecure because the SHA1 algorithm is insecure, not because&lt;br/&gt;160bits isn&amp;#39;t enough.&lt;br/&gt;&lt;br/&gt;I would argue that 160-bits isn&amp;#39;t enough for collision resistance. Assuming&lt;br/&gt;RIPEMD-160(SHA-256(msg)) has no flaws (i.e. is a random oracle), collisions&lt;br/&gt;can be generated in 2^80 queries (actually detecting these collisions&lt;br/&gt;requires some time-memory additional trade-offs). The Bitcoin network at&lt;br/&gt;the current hash rate performs roughly SHA-256 ~2^78 queries a day or 2^80&lt;br/&gt;queries every four days. Without any break in RIPEMD-160(SHA-256(msg)) the&lt;br/&gt;US could build an ASIC datacenter and produce RIPEMD-160 collisions for a&lt;br/&gt;fraction of its yearly cryptologic budget.&lt;br/&gt;&lt;br/&gt;The impact of collisions in RIPEMD-160(SHA-256(msg)) according to &amp;#34;On&lt;br/&gt;Bitcoin Security in the Presence of Broken Crypto Primitives&amp;#34;(&lt;br/&gt;&lt;a href=&#34;https://eprint.iacr.org/2016/167.pdf&#34;&gt;https://eprint.iacr.org/2016/167.pdf&lt;/a&gt;):&lt;br/&gt;&lt;br/&gt;&amp;gt;Collisions are similar, though in this case both public keys are under the&lt;br/&gt;adversary’s control, and again the adversary does not have access to the&lt;br/&gt;private keys. In both scenarios, there is a question of nonrepudiation&lt;br/&gt;external to the protocol itself: by presenting a second pre-image of a key&lt;br/&gt;used to sign a transaction, a user/adversary can claim that his coins were&lt;br/&gt;stolen.&lt;br/&gt;&lt;br/&gt;How would such an event effect the price of Bitcoin when headlines are&lt;br/&gt;&amp;#34;Bitcoin&amp;#39;s Cryptography Broken&amp;#34;? How much money could someone make by&lt;br/&gt;playing the market in this way?&lt;br/&gt;&lt;br/&gt;For both reasons of credibility and good engineering (safety&lt;br/&gt;margins) Bitcoin should strive to always use cryptography which is beyond&lt;br/&gt;reproach.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Sat, Feb 25, 2017 at 9:50 AM, Leandro Coutinho via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Google recommeds &amp;#34;migrate to safer cryptographic hashes such as SHA-256&lt;br/&gt;&amp;gt; and SHA-3&amp;#34;&lt;br/&gt;&amp;gt; It does not mention RIPEMD-160&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://security.googleblog.com/2017/02/announcing-first-&#34;&gt;https://security.googleblog.com/2017/02/announcing-first-&lt;/a&gt;&lt;br/&gt;&amp;gt; sha1-collision.html?m=1&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Em 25/02/2017 10:47, &amp;#34;Steve Davis via bitcoin-dev&amp;#34; &amp;lt;bitcoin-dev at lists.&lt;br/&gt;&amp;gt; linuxfoundation.org&amp;gt; escreveu:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &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; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; On Fri, Feb 24, 2017 at 05:49:36PM -0600, Steve Davis via bitcoin-dev&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; If the 20 byte SHA1 is now considered insecure (with good reason), what&lt;br/&gt;&amp;gt; about RIPEMD-160 which is the foundation of Bitcoin addresses?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; SHA1 is insecure because the SHA1 algorithm is insecure, not because&lt;br/&gt;&amp;gt; 160bits isn&amp;#39;t enough.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; AFAIK there aren&amp;#39;t any known weaknesses in RIPEMD160,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; …so far. I wonder how long that vacation will last?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; but it also hasn&amp;#39;t been&lt;br/&gt;&amp;gt; &amp;gt; as closely studied as more common hash algorithms.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ...but we can be sure that it will be, since the dollar value held in&lt;br/&gt;&amp;gt; existing utxos continues to increase...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; That said, Bitcoin uses&lt;br/&gt;&amp;gt; &amp;gt; RIPEMD160(SHA256(msg)), which may make creating collisions harder if an&lt;br/&gt;&amp;gt; attack&lt;br/&gt;&amp;gt; &amp;gt; is found than if it used RIPEMD160 alone.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Does that offer any greater protection? That’s not so clear to me as the&lt;br/&gt;&amp;gt; outputs (at least for p2pkh) only verify the public key against the final&lt;br/&gt;&amp;gt; 20 byte hash. Specifically, in the first (notional) case the challenge&lt;br/&gt;&amp;gt; would be to find a private key that has a public key that hashes to the&lt;br/&gt;&amp;gt; final hash. In the second (realistic) case, you merely need to add the&lt;br/&gt;&amp;gt; sha256 hash into the problem, which doesn’t seem to me to increase the&lt;br/&gt;&amp;gt; difficulty by any significant amount?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; /s&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;&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;-------------- 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/99b5f0a3/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170225/99b5f0a3/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T19:56:41&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs03kgg8pann394hhsnpfp0m056gd00xx6rvf8gltl3tf925f3mawszyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qjk4cz4</id>
    
      <title type="html">📅 Original date posted:2016-06-28 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs03kgg8pann394hhsnpfp0m056gd00xx6rvf8gltl3tf925f3mawszyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qjk4cz4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswue25psl0u8fnjak7yrtcq998ypwpl67szpfnuksp6fs8c34eexgn36gl7&#39;&gt;nevent1q…6gl7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-06-28&lt;br/&gt;📝 Original message:&amp;gt;It&amp;#39;s also not clear to me why the HMAC, vs just SHA256(key|cipher-type|mesg).  But that&amp;#39;s probably just my crypto ignorance...&lt;br/&gt;&lt;br/&gt;SHA256(key|cipher-type|mesg) is an extremely insecure MAC because of&lt;br/&gt;the length extension property of SHA256.&lt;br/&gt;&lt;br/&gt;If I have a tag y = SHA256(key|cipher-type|mesg), I can without&lt;br/&gt;knowing key or msg compute a value y&amp;#39; such that&lt;br/&gt;y&amp;#39; = SHA256(key|cipher-type|mesg|any values I want).&lt;br/&gt;&lt;br/&gt;Thus, an attacker can trivially forge a tag protected by&lt;br/&gt;SHA256(key|cipher-type|mesg).&lt;br/&gt;&lt;br/&gt;For more details see:&lt;br/&gt;&lt;a href=&#34;https://web.archive.org/web/20141029080820/http://vudang.com/2012/03/md5-length-extension-attack/&#34;&gt;https://web.archive.org/web/20141029080820/http://vudang.com/2012/03/md5-length-extension-attack/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;On Tue, Jun 28, 2016 at 9:00 PM, Rusty Russell via bitcoin-dev&lt;br/&gt;&amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; Jonas Schnelli &amp;lt;dev at jonasschnelli.ch&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; To quote:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; HMAC_SHA512(key=ecdh_secret|cipher-type,msg=&amp;#34;encryption key&amp;#34;).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;  K_1 must be the left 32bytes of the HMAC_SHA512 hash.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;  K_2 must be the right 32bytes of the HMAC_SHA512 hash.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; This seems a weak reason to introduce SHA512 to the mix.  Can we just&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; make:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; K_1 = HMAC_SHA256(key=ecdh_secret|cipher-type,msg=&amp;#34;header encryption key&amp;#34;)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; K_2 = HMAC_SHA256(key=ecdh_secret|cipher-type,msg=&amp;#34;body encryption key&amp;#34;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; SHA512_HMAC is used by BIP32 [1] and I guess most clients will somehow&lt;br/&gt;&amp;gt;&amp;gt; make use of bip32 features. I though a single SHA512_HMAC operation is&lt;br/&gt;&amp;gt;&amp;gt; cheaper and simpler then two SHA256_HMAC.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Good point; I would argue that mistake has already been made.  But I was&lt;br/&gt;&amp;gt; looking at appropriating your work for lightning inter-node comms, and&lt;br/&gt;&amp;gt; adding another hash algo seemed unnecessarily painful.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; AFAIK, sha256_hmac is also not used by the current p2p &amp;amp; consensus layer.&lt;br/&gt;&amp;gt;&amp;gt; Bitcoin-Core uses it for HTTP RPC auth and Tor control.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It&amp;#39;s also not clear to me why the HMAC, vs just&lt;br/&gt;&amp;gt; SHA256(key|cipher-type|mesg).  But that&amp;#39;s probably just my crypto&lt;br/&gt;&amp;gt; ignorance...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks!&lt;br/&gt;&amp;gt; Rusty.&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;
    </content>
    <updated>2023-06-07T19:51:34&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs20qrgk3d8f0cagaq6s5ks2496p69vtl23tcprvdwu3fgtd0dx3mgzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6que5ja7</id>
    
      <title type="html">📅 Original date posted:2016-01-07 📝 Original message:Based ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs20qrgk3d8f0cagaq6s5ks2496p69vtl23tcprvdwu3fgtd0dx3mgzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6que5ja7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgm856692e4f976lzj4f2pkt8jp3jqx6uk24jrp70tahh3egwv2kcxkcghe&#39;&gt;nevent1q…cghe&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-01-07&lt;br/&gt;📝 Original message:Based on current GH/s count of 775,464,121 Bitcoin tests 2^80 every 19 days.&lt;br/&gt;log2(775464121*(1000*1000*1000*60*60*24*19)) = ~80.07&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t fully understand the security model of segwit, so my analysis&lt;br/&gt;will assume that any collision is bad.&lt;br/&gt;&lt;br/&gt;&amp;gt;But it also requires O(2^80) storage, which is utterly infeasible&lt;br/&gt;&lt;br/&gt;You don&amp;#39;t store all 2^80 previous hashes, instead you just hash a seed&lt;br/&gt;value 2^80 times, then look for a cycle.&lt;br/&gt;&lt;br/&gt;seed = {0,1}^160&lt;br/&gt;x = hash(seed)&lt;br/&gt;&lt;br/&gt;for i in 2^80:&lt;br/&gt;....x = hash(x)&lt;br/&gt;x_final = x&lt;br/&gt;&lt;br/&gt;y = hash(x_final)&lt;br/&gt;&lt;br/&gt;for j in 2^80:&lt;br/&gt;....if y == x_final:&lt;br/&gt;........print &amp;#34;cycle len: &amp;#34;&#43;j&lt;br/&gt;........break&lt;br/&gt;....y = hash(y)&lt;br/&gt;&lt;br/&gt;If at any point x collides with a prior value of x it will form a&lt;br/&gt;cycle. Thus y will also cycle and collide with x_final. j gives you&lt;br/&gt;the cycle length, which allows you find the collision:&lt;br/&gt;hash^(2^80-j)(seed) == hash^(j)(hash^(2^80-j)(seed)).&lt;br/&gt;&lt;br/&gt;Worst case:&lt;br/&gt;First loop costs 2**80, second loop costs 2**80=j, finding the&lt;br/&gt;colliding value is 2**80. Total cost 2**80&#43;2**80&#43;2**80 = 2**81.5 and&lt;br/&gt;requires storing less than a kilobyte.&lt;br/&gt;&lt;br/&gt;This is a toy example, does not exploit parallelism, time memory trade&lt;br/&gt;offs, can be easily made better, etc...&lt;br/&gt;&lt;br/&gt;On Thu, Jan 7, 2016 at 2:02 PM, Gavin Andresen via bitcoin-dev&lt;br/&gt;&amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; I&amp;#39;m hoisting this from some private feedback I sent on the segregated&lt;br/&gt;&amp;gt; witness BIP:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I said:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;#34;I&amp;#39;d also use RIPEMD160(SHA256()) as the hash function and save the 12&lt;br/&gt;&amp;gt; bytes-- a successful preimage attack against that ain&amp;#39;t gonna happen before&lt;br/&gt;&amp;gt; we&amp;#39;re all dead. I&amp;#39;m probably being dense, but I just don&amp;#39;t see how a&lt;br/&gt;&amp;gt; collision attack is relevant here.&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Pieter responded:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;#34;The problem case is where someone in a contract setup shows you a script,&lt;br/&gt;&amp;gt; which you accept as being a payment to yourself. An attacker could use a&lt;br/&gt;&amp;gt; collision attack to construct scripts with identical hashes, only one of&lt;br/&gt;&amp;gt; which does have the property you want, and steal coins.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So you really want collision security, and I don&amp;#39;t think 80 bits is&lt;br/&gt;&amp;gt; something we should encourage for that. Normal pubkey hashes don&amp;#39;t have that&lt;br/&gt;&amp;gt; problem, as they can&amp;#39;t be constructed to pay to you.&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ... but I&amp;#39;m unconvinced:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;#34;But it is trivial for contract wallets to protect against collision&lt;br/&gt;&amp;gt; attacks-- if you give me a script that is &amp;#34;gavin_pubkey CHECKSIG&lt;br/&gt;&amp;gt; arbitrary_data OP_DROP&amp;#34; with &amp;#34;I promise I&amp;#39;m not trying to rip you off, just&lt;br/&gt;&amp;gt; ignore that arbitrary data&amp;#34; a wallet can just refuse. Even more likely, a&lt;br/&gt;&amp;gt; contract wallet won&amp;#39;t even recognize that as a pay-to-gavin transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I suppose it could be looking for some form of &amp;#34;gavin_pubkey&lt;br/&gt;&amp;gt; somebody_else_pubkey CHECKMULTISIG ... with the attacker using&lt;br/&gt;&amp;gt; somebody_else_pubkey to force the collision, but, again, trivial contract&lt;br/&gt;&amp;gt; protocol tweaks (&amp;#34;send along a proof you have the private key corresponding&lt;br/&gt;&amp;gt; to the public key&amp;#34; or &amp;#34;everybody pre-commits pubkeys they&amp;#39;ll use at protocol&lt;br/&gt;&amp;gt; start&amp;#34;) would protect against that.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Adding an extra 12 bytes to every segwit to prevent an attack that takes&lt;br/&gt;&amp;gt; 2^80 computation and 2^80 storage, is unlikely to be a problem in practice,&lt;br/&gt;&amp;gt; and is trivial to protect against is the wrong tradeoff to make.&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 20 bytes instead of 32 bytes is a savings of almost 40%, which is&lt;br/&gt;&amp;gt; significant.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The general question I&amp;#39;d like to raise on this list is:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Should we be worried, today, about collision attacks against RIPEMD160 (our&lt;br/&gt;&amp;gt; 160-bit hash)?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Mounting a successful brute-force collision attack would require at least&lt;br/&gt;&amp;gt; O(2^80) CPU, which is kinda-sorta feasible (Pieter pointed out that Bitcoin&lt;br/&gt;&amp;gt; POW has computed more SHA256 hashes than that). But it also requires O(2^80)&lt;br/&gt;&amp;gt; storage, which is utterly infeasible (there is something on the order of&lt;br/&gt;&amp;gt; 2^35 bytes of storage in the entire world).  Even assuming doubling every&lt;br/&gt;&amp;gt; single year (faster than Moore&amp;#39;s Law), we&amp;#39;re four decades away from an&lt;br/&gt;&amp;gt; attacker with THE ENTIRE WORLD&amp;#39;s storage capacity being able to mount a&lt;br/&gt;&amp;gt; collision attack.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; References:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://en.wikipedia.org/wiki/Collision_attack&#34;&gt;https://en.wikipedia.org/wiki/Collision_attack&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://vsatglobalseriesblog.wordpress.com/2013/06/21/in-2013-the-amount-of-data-generated-worldwide-will-reach-four-zettabytes/&#34;&gt;https://vsatglobalseriesblog.wordpress.com/2013/06/21/in-2013-the-amount-of-data-generated-worldwide-will-reach-four-zettabytes/&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; Gavin Andresen&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;
    </content>
    <updated>2023-06-07T19:47:41&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8ryy9fhh4y54yn8le4d9restpt4awjx8426zvmn0uj64cnyy3ckczyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qxxsc4a</id>
    
      <title type="html">📅 Original date posted:2016-01-07 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8ryy9fhh4y54yn8le4d9restpt4awjx8426zvmn0uj64cnyy3ckczyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qxxsc4a" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs28d485x2y37k9cfa6xytqjjn4lhf7xakalsrzkdza9mxd7kmrjcqj0dvc3&#39;&gt;nevent1q…dvc3&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-01-07&lt;br/&gt;📝 Original message:&amp;gt;Ethan:  your algorithm will find two arbitrary values that collide. That isn&amp;#39;t useful as an attack in the context we&amp;#39;re talking about here (both of those values will be useless as coin destinations with overwhelming probability).&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not sure exactly the properties you want here and determining&lt;br/&gt;these properties is not an easy task, but the case is far worse than&lt;br/&gt;just two random values. For instance: (a). with a small modification&lt;br/&gt;my algorithm can also find collisions containing targeted substrings,&lt;br/&gt;(b). length extension attacks are possible with RIPEMD160.&lt;br/&gt;&lt;br/&gt;(a). targeted cycles:&lt;br/&gt;&lt;br/&gt;target1 = &amp;#34;str to prepend&amp;#34;&lt;br/&gt;target2 = &amp;#34;str to end with&amp;#34;&lt;br/&gt;&lt;br/&gt;seed = {0,1}^160&lt;br/&gt;x = hash(seed)&lt;br/&gt;&lt;br/&gt;for i in 2^80:&lt;br/&gt;....x = hash(target1||x||target2)&lt;br/&gt;x_final = x&lt;br/&gt;&lt;br/&gt;y = hash(tartget1||x_final||target2)&lt;br/&gt;&lt;br/&gt;for j in 2^80:&lt;br/&gt;....if y == x_final:&lt;br/&gt;........print &amp;#34;cycle len: &amp;#34;&#43;j&lt;br/&gt;........break&lt;br/&gt;....y = hash(target1||y||target2)&lt;br/&gt;&lt;br/&gt;If a collision is found, the two colliding inputs must both start with&lt;br/&gt;&amp;#34;str to prepend&amp;#34; and end with the phrase &amp;#34;str to end with&amp;#34;. As before&lt;br/&gt;this only requires 2^81.5 computations and no real memory. For an&lt;br/&gt;additional 2**80 an adversary has an good change of finding two&lt;br/&gt;different targeted substrings which collide. Consider the case where&lt;br/&gt;the attacker mixes the targeted strings with the hash output:&lt;br/&gt;&lt;br/&gt;hash(&amp;#34;my name is=0x329482039483204324423&amp;#34;&#43;x[1]&#43;&amp;#34;, my favorite number&lt;br/&gt;is=&amp;#34;&#43;x) where x[1] is the first bit of x.&lt;br/&gt;&lt;br/&gt;(b). length extension attacks&lt;br/&gt;&lt;br/&gt;Even if all the adversary can do is create two random values that&lt;br/&gt;collide, you can append substrings to the input and get collisions.&lt;br/&gt;Once you find two random values hash(x) = hash(y), you could use a&lt;br/&gt;length extension attack on RIPEMD-160 to find hash(x||z) = hash(y||z).&lt;br/&gt;&lt;br/&gt;Now the bitcoin wiki says:&lt;br/&gt;&amp;#34;The padding scheme is identical to MD4 using Merkle–Damgård&lt;br/&gt;strengthening to prevent length extension attacks.&amp;#34;[1]&lt;br/&gt;&lt;br/&gt;Which is confusing to me because:&lt;br/&gt;&lt;br/&gt;1. MD4 is vulnerable to length extension attacks&lt;br/&gt;2. Merkle–Damgård strengthening does not protect against length&lt;br/&gt;extension: &amp;#34;Indeed, we already pointed out that none of the 64&lt;br/&gt;variants above can withstand the &amp;#39;extension&amp;#39; attack on the MAC&lt;br/&gt;application, even with the Merkle-Damgard strengthening&amp;#34; [2]&lt;br/&gt;3. RIPEMD-160 is vulnerable to length extension attacks, is Bitcoin&lt;br/&gt;using a non-standard version of RIPEMD-160.&lt;br/&gt;&lt;br/&gt;RIPEMD160(SHA256()) does not protect against length extension attacks&lt;br/&gt;on SHA256, but should protect RIPEMD-160 against length extension&lt;br/&gt;attacks as RIPEMD-160 uses 512-bit message blocks. That being said we&lt;br/&gt;should be very careful here. Research has been done that shows that&lt;br/&gt;cascading the same hash function twice is weaker than using HMAC[3]. I&lt;br/&gt;can&amp;#39;t find results on cascading RIPEMD160(SHA256()).&lt;br/&gt;&lt;br/&gt;RIPEMD160(SHA256()) seems better than RIPEMD160() though, but security&lt;br/&gt;should not rest on the notion that an attacker requires 2**80 memory,&lt;br/&gt;many targeted collision attacks can work without much memory.&lt;br/&gt;&lt;br/&gt;[1]: &lt;a href=&#34;https://en.bitcoin.it/wiki/RIPEMD-160&#34;&gt;https://en.bitcoin.it/wiki/RIPEMD-160&lt;/a&gt;&lt;br/&gt;[2]: &amp;#34;Merkle-Damgard Revisited: How to Construct a Hash Function&amp;#34;&lt;br/&gt;&lt;a href=&#34;https://www.cs.nyu.edu/~puniya/papers/merkle.pdf&#34;&gt;https://www.cs.nyu.edu/~puniya/papers/merkle.pdf&lt;/a&gt;&lt;br/&gt;[3]: &lt;a href=&#34;https://www.cs.nyu.edu/~dodis/ps/h-of-h.pdf&#34;&gt;https://www.cs.nyu.edu/~dodis/ps/h-of-h.pdf&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;On Thu, Jan 7, 2016 at 4:06 PM, Gavin Andresen via bitcoin-dev&lt;br/&gt;&amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; Maybe I&amp;#39;m asking this question on the wrong mailing list:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Matt/Adam: do you have some reason to think that RIPEMD160 will be broken&lt;br/&gt;&amp;gt; before SHA256?&lt;br/&gt;&amp;gt; And do you have some reason to think that they will be so broken that the&lt;br/&gt;&amp;gt; nested hash construction RIPEMD160(SHA256()) will be vulnerable?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Adam: re: &amp;#34;where to stop&amp;#34;  :  I&amp;#39;m suggesting we stop exactly at the current&lt;br/&gt;&amp;gt; status quo, where we use RIPEMD160 for P2SH and P2PKH.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Ethan:  your algorithm will find two arbitrary values that collide. That&lt;br/&gt;&amp;gt; isn&amp;#39;t useful as an attack in the context we&amp;#39;re talking about here (both of&lt;br/&gt;&amp;gt; those values will be useless as coin destinations with overwhelming&lt;br/&gt;&amp;gt; probability).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Dave: you described a first preimage attack, which is 2**160 cpu time and no&lt;br/&gt;&amp;gt; storage.&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; Gavin Andresen&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;
    </content>
    <updated>2023-06-07T19:47:39&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswdrgcnt034p6tuuryf352c5zlq57e0thhurj23m6y9xn4j2kpg9qzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qhw5jc5</id>
    
      <title type="html">📅 Original date posted:2016-01-07 📝 Original message:Based ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswdrgcnt034p6tuuryf352c5zlq57e0thhurj23m6y9xn4j2kpg9qzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qhw5jc5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxx9w60hhp8f3avyxmjxz7h77dc8h2yd6cjvd5ta0889w3t6qps3qluwtc5&#39;&gt;nevent1q…wtc5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-01-07&lt;br/&gt;📝 Original message:Based on current GH/s count of 775,464,121 Bitcoin tests 2^80 every 19 days.&lt;br/&gt;log2(775464121*(1000*1000*1000*60*60*24*19)) = ~80.07&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t fully understand the security model of segwit, so my analysis&lt;br/&gt;will assume that any collision is bad.&lt;br/&gt;&lt;br/&gt;&amp;gt;But it also requires O(2^80) storage, which is utterly infeasible&lt;br/&gt;&lt;br/&gt;You don&amp;#39;t store all 2^80 previous hashes, instead you just hash a seed&lt;br/&gt;value 2^80 times, then look for a cycle.&lt;br/&gt;&lt;br/&gt;seed = {0,1}^160&lt;br/&gt;x = hash(seed)&lt;br/&gt;&lt;br/&gt;for i in 2^80:&lt;br/&gt;....x = hash(x)&lt;br/&gt;x_final = x&lt;br/&gt;&lt;br/&gt;y = hash(x_final)&lt;br/&gt;&lt;br/&gt;for j in 2^80:&lt;br/&gt;....if y == x_final:&lt;br/&gt;........print &amp;#34;cycle len: &amp;#34;&#43;j&lt;br/&gt;........break&lt;br/&gt;....y = hash(y)&lt;br/&gt;&lt;br/&gt;If at any point x collides with a prior value of x it will form a&lt;br/&gt;cycle. Thus y will also cycle and collide with x_final. j gives you&lt;br/&gt;the cycle length, which allows you find the collision:&lt;br/&gt;hash^(2^80-j)(seed) == hash^(j)(hash^(2^80-j)(seed)).&lt;br/&gt;&lt;br/&gt;Worst case:&lt;br/&gt;First loop costs 2**80, second loop costs 2**80=j, finding the&lt;br/&gt;colliding value is 2**80. Total cost 2**80&#43;2**80&#43;2**80 = 2**81.5 and&lt;br/&gt;requires storing less than a kilobyte.&lt;br/&gt;&lt;br/&gt;This is a toy example, does not exploit parallelism, time memory trade&lt;br/&gt;offs, can be easily made better, etc...&lt;br/&gt;&lt;br/&gt;On Thu, Jan 7, 2016 at 2:02 PM, Gavin Andresen via bitcoin-dev&lt;br/&gt;&amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; I&amp;#39;m hoisting this from some private feedback I sent on the segregated&lt;br/&gt;&amp;gt; witness BIP:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I said:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;#34;I&amp;#39;d also use RIPEMD160(SHA256()) as the hash function and save the 12&lt;br/&gt;&amp;gt; bytes-- a successful preimage attack against that ain&amp;#39;t gonna happen before&lt;br/&gt;&amp;gt; we&amp;#39;re all dead. I&amp;#39;m probably being dense, but I just don&amp;#39;t see how a&lt;br/&gt;&amp;gt; collision attack is relevant here.&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Pieter responded:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;#34;The problem case is where someone in a contract setup shows you a script,&lt;br/&gt;&amp;gt; which you accept as being a payment to yourself. An attacker could use a&lt;br/&gt;&amp;gt; collision attack to construct scripts with identical hashes, only one of&lt;br/&gt;&amp;gt; which does have the property you want, and steal coins.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So you really want collision security, and I don&amp;#39;t think 80 bits is&lt;br/&gt;&amp;gt; something we should encourage for that. Normal pubkey hashes don&amp;#39;t have that&lt;br/&gt;&amp;gt; problem, as they can&amp;#39;t be constructed to pay to you.&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ... but I&amp;#39;m unconvinced:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;#34;But it is trivial for contract wallets to protect against collision&lt;br/&gt;&amp;gt; attacks-- if you give me a script that is &amp;#34;gavin_pubkey CHECKSIG&lt;br/&gt;&amp;gt; arbitrary_data OP_DROP&amp;#34; with &amp;#34;I promise I&amp;#39;m not trying to rip you off, just&lt;br/&gt;&amp;gt; ignore that arbitrary data&amp;#34; a wallet can just refuse. Even more likely, a&lt;br/&gt;&amp;gt; contract wallet won&amp;#39;t even recognize that as a pay-to-gavin transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I suppose it could be looking for some form of &amp;#34;gavin_pubkey&lt;br/&gt;&amp;gt; somebody_else_pubkey CHECKMULTISIG ... with the attacker using&lt;br/&gt;&amp;gt; somebody_else_pubkey to force the collision, but, again, trivial contract&lt;br/&gt;&amp;gt; protocol tweaks (&amp;#34;send along a proof you have the private key corresponding&lt;br/&gt;&amp;gt; to the public key&amp;#34; or &amp;#34;everybody pre-commits pubkeys they&amp;#39;ll use at protocol&lt;br/&gt;&amp;gt; start&amp;#34;) would protect against that.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Adding an extra 12 bytes to every segwit to prevent an attack that takes&lt;br/&gt;&amp;gt; 2^80 computation and 2^80 storage, is unlikely to be a problem in practice,&lt;br/&gt;&amp;gt; and is trivial to protect against is the wrong tradeoff to make.&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 20 bytes instead of 32 bytes is a savings of almost 40%, which is&lt;br/&gt;&amp;gt; significant.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The general question I&amp;#39;d like to raise on this list is:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Should we be worried, today, about collision attacks against RIPEMD160 (our&lt;br/&gt;&amp;gt; 160-bit hash)?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Mounting a successful brute-force collision attack would require at least&lt;br/&gt;&amp;gt; O(2^80) CPU, which is kinda-sorta feasible (Pieter pointed out that Bitcoin&lt;br/&gt;&amp;gt; POW has computed more SHA256 hashes than that). But it also requires O(2^80)&lt;br/&gt;&amp;gt; storage, which is utterly infeasible (there is something on the order of&lt;br/&gt;&amp;gt; 2^35 bytes of storage in the entire world).  Even assuming doubling every&lt;br/&gt;&amp;gt; single year (faster than Moore&amp;#39;s Law), we&amp;#39;re four decades away from an&lt;br/&gt;&amp;gt; attacker with THE ENTIRE WORLD&amp;#39;s storage capacity being able to mount a&lt;br/&gt;&amp;gt; collision attack.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; References:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://en.wikipedia.org/wiki/Collision_attack&#34;&gt;https://en.wikipedia.org/wiki/Collision_attack&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://vsatglobalseriesblog.wordpress.com/2013/06/21/in-2013-the-amount-of-data-generated-worldwide-will-reach-four-zettabytes/&#34;&gt;https://vsatglobalseriesblog.wordpress.com/2013/06/21/in-2013-the-amount-of-data-generated-worldwide-will-reach-four-zettabytes/&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; Gavin Andresen&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;
    </content>
    <updated>2023-06-07T19:31:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8xy4eshcl3axpqu9g2n9vkegqxetegaxeet040yf883d9fnkaq0szyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qcdafre</id>
    
      <title type="html">📅 Original date posted:2016-01-07 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8xy4eshcl3axpqu9g2n9vkegqxetegaxeet040yf883d9fnkaq0szyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qcdafre" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2talyjskja4qts09lsfvmvq4nr5kgs5afqm0mwrrtvqjdzyktefgdkfxnc&#39;&gt;nevent1q…fxnc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-01-07&lt;br/&gt;📝 Original message:&amp;gt;Ethan:  your algorithm will find two arbitrary values that collide. That isn&amp;#39;t useful as an attack in the context we&amp;#39;re talking about here (both of those values will be useless as coin destinations with overwhelming probability).&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not sure exactly the properties you want here and determining&lt;br/&gt;these properties is not an easy task, but the case is far worse than&lt;br/&gt;just two random values. For instance: (a). with a small modification&lt;br/&gt;my algorithm can also find collisions containing targeted substrings,&lt;br/&gt;(b). length extension attacks are possible with RIPEMD160.&lt;br/&gt;&lt;br/&gt;(a). targeted cycles:&lt;br/&gt;&lt;br/&gt;target1 = &amp;#34;str to prepend&amp;#34;&lt;br/&gt;target2 = &amp;#34;str to end with&amp;#34;&lt;br/&gt;&lt;br/&gt;seed = {0,1}^160&lt;br/&gt;x = hash(seed)&lt;br/&gt;&lt;br/&gt;for i in 2^80:&lt;br/&gt;....x = hash(target1||x||target2)&lt;br/&gt;x_final = x&lt;br/&gt;&lt;br/&gt;y = hash(tartget1||x_final||target2)&lt;br/&gt;&lt;br/&gt;for j in 2^80:&lt;br/&gt;....if y == x_final:&lt;br/&gt;........print &amp;#34;cycle len: &amp;#34;&#43;j&lt;br/&gt;........break&lt;br/&gt;....y = hash(target1||y||target2)&lt;br/&gt;&lt;br/&gt;If a collision is found, the two colliding inputs must both start with&lt;br/&gt;&amp;#34;str to prepend&amp;#34; and end with the phrase &amp;#34;str to end with&amp;#34;. As before&lt;br/&gt;this only requires 2^81.5 computations and no real memory. For an&lt;br/&gt;additional 2**80 an adversary has an good change of finding two&lt;br/&gt;different targeted substrings which collide. Consider the case where&lt;br/&gt;the attacker mixes the targeted strings with the hash output:&lt;br/&gt;&lt;br/&gt;hash(&amp;#34;my name is=0x329482039483204324423&amp;#34;&#43;x[1]&#43;&amp;#34;, my favorite number&lt;br/&gt;is=&amp;#34;&#43;x) where x[1] is the first bit of x.&lt;br/&gt;&lt;br/&gt;(b). length extension attacks&lt;br/&gt;&lt;br/&gt;Even if all the adversary can do is create two random values that&lt;br/&gt;collide, you can append substrings to the input and get collisions.&lt;br/&gt;Once you find two random values hash(x) = hash(y), you could use a&lt;br/&gt;length extension attack on RIPEMD-160 to find hash(x||z) = hash(y||z).&lt;br/&gt;&lt;br/&gt;Now the bitcoin wiki says:&lt;br/&gt;&amp;#34;The padding scheme is identical to MD4 using Merkle–Damgård&lt;br/&gt;strengthening to prevent length extension attacks.&amp;#34;[1]&lt;br/&gt;&lt;br/&gt;Which is confusing to me because:&lt;br/&gt;&lt;br/&gt;1. MD4 is vulnerable to length extension attacks&lt;br/&gt;2. Merkle–Damgård strengthening does not protect against length&lt;br/&gt;extension: &amp;#34;Indeed, we already pointed out that none of the 64&lt;br/&gt;variants above can withstand the &amp;#39;extension&amp;#39; attack on the MAC&lt;br/&gt;application, even with the Merkle-Damgard strengthening&amp;#34; [2]&lt;br/&gt;3. RIPEMD-160 is vulnerable to length extension attacks, is Bitcoin&lt;br/&gt;using a non-standard version of RIPEMD-160.&lt;br/&gt;&lt;br/&gt;RIPEMD160(SHA256()) does not protect against length extension attacks&lt;br/&gt;on SHA256, but should protect RIPEMD-160 against length extension&lt;br/&gt;attacks as RIPEMD-160 uses 512-bit message blocks. That being said we&lt;br/&gt;should be very careful here. Research has been done that shows that&lt;br/&gt;cascading the same hash function twice is weaker than using HMAC[3]. I&lt;br/&gt;can&amp;#39;t find results on cascading RIPEMD160(SHA256()).&lt;br/&gt;&lt;br/&gt;RIPEMD160(SHA256()) seems better than RIPEMD160() though, but security&lt;br/&gt;should not rest on the notion that an attacker requires 2**80 memory,&lt;br/&gt;many targeted collision attacks can work without much memory.&lt;br/&gt;&lt;br/&gt;[1]: &lt;a href=&#34;https://en.bitcoin.it/wiki/RIPEMD-160&#34;&gt;https://en.bitcoin.it/wiki/RIPEMD-160&lt;/a&gt;&lt;br/&gt;[2]: &amp;#34;Merkle-Damgard Revisited: How to Construct a Hash Function&amp;#34;&lt;br/&gt;&lt;a href=&#34;https://www.cs.nyu.edu/~puniya/papers/merkle.pdf&#34;&gt;https://www.cs.nyu.edu/~puniya/papers/merkle.pdf&lt;/a&gt;&lt;br/&gt;[3]: &lt;a href=&#34;https://www.cs.nyu.edu/~dodis/ps/h-of-h.pdf&#34;&gt;https://www.cs.nyu.edu/~dodis/ps/h-of-h.pdf&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;On Thu, Jan 7, 2016 at 4:06 PM, Gavin Andresen via bitcoin-dev&lt;br/&gt;&amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; Maybe I&amp;#39;m asking this question on the wrong mailing list:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Matt/Adam: do you have some reason to think that RIPEMD160 will be broken&lt;br/&gt;&amp;gt; before SHA256?&lt;br/&gt;&amp;gt; And do you have some reason to think that they will be so broken that the&lt;br/&gt;&amp;gt; nested hash construction RIPEMD160(SHA256()) will be vulnerable?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Adam: re: &amp;#34;where to stop&amp;#34;  :  I&amp;#39;m suggesting we stop exactly at the current&lt;br/&gt;&amp;gt; status quo, where we use RIPEMD160 for P2SH and P2PKH.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Ethan:  your algorithm will find two arbitrary values that collide. That&lt;br/&gt;&amp;gt; isn&amp;#39;t useful as an attack in the context we&amp;#39;re talking about here (both of&lt;br/&gt;&amp;gt; those values will be useless as coin destinations with overwhelming&lt;br/&gt;&amp;gt; probability).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Dave: you described a first preimage attack, which is 2**160 cpu time and no&lt;br/&gt;&amp;gt; storage.&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; Gavin Andresen&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;
    </content>
    <updated>2023-06-07T19:31:30&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspd4wlmu6ldj6vzr6sk5cawljnx5p25cgx678zf5jyxvvxumdexjgzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6q8tz7e7</id>
    
      <title type="html">📅 Original date posted:2014-06-03 📝 Original message:An ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspd4wlmu6ldj6vzr6sk5cawljnx5p25cgx678zf5jyxvvxumdexjgzyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6q8tz7e7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9wts0ctpzxggsvs4zg93td7pws5eqjtxme8nt897r9nnmmcl2fsg53ff6d&#39;&gt;nevent1q…ff6d&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2014-06-03&lt;br/&gt;📝 Original message:An attack on the mining difficulty algorithm does not imply violation of&lt;br/&gt;the typical security properties of a cryptographic hash function*.&lt;br/&gt;&lt;br/&gt;Assume someone discovers a method which makes it far easier to discover new&lt;br/&gt;blocks, this method: may or may not be implementable by the current SHA256&lt;br/&gt;ASIC hardware.&lt;br/&gt;&lt;br/&gt;1. If it is usable by the mining hardware, then there will be brief period&lt;br/&gt;of overproduction and then difficulty will adjust. If the attack is so bad&lt;br/&gt;that difficulty can&amp;#39;t scale and we run out of a leading zero&amp;#39;s, then the&lt;br/&gt;SHA256 collision resistance is broken and we have bigger problems. Under&lt;br/&gt;this scenario, everyone would see the need to immediately switch to new&lt;br/&gt;hardware as people could create cycles and irreconcilable forks in the&lt;br/&gt;block chain&lt;br/&gt;&lt;br/&gt;2. If the attack is not usable by the mining hardware, then the miners will&lt;br/&gt;need to switch to new ASICs anyways and the hash function can be changed&lt;br/&gt;without resistance.&lt;br/&gt;&lt;br/&gt;But lets ignore all that and say, for some unspecified reason, the bitcoin&lt;br/&gt;community wants to switch hash functions and has some lead time to do so.&lt;br/&gt;One could require that miners find two blocks, one computed using SHA256&lt;br/&gt;and one computed using the new hash function. We could then slowly shift&lt;br/&gt;the difficulty from SHA256 to the new hash function. This would allow&lt;br/&gt;miners a semi-predicable roadmap to switch their infrastructure away from&lt;br/&gt;SHA256.&lt;br/&gt;&lt;br/&gt;* It would be a distinguisher which would be bad, but collision resistance&lt;br/&gt;could be merely weakened.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Tue, Jun 3, 2014 at 12:52 AM, Luke Dashjr &amp;lt;luke at dashjr.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Tuesday, June 03, 2014 4:29:55 AM xor wrote:&lt;br/&gt;&amp;gt; &amp;gt; Hi,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I thought a lot about the worst case scenario of SHA256d being broken in&lt;br/&gt;&amp;gt; a&lt;br/&gt;&amp;gt; &amp;gt; way which could be abused to&lt;br/&gt;&amp;gt; &amp;gt; A) reduce the work of mining a block by some significant amount&lt;br/&gt;&amp;gt; &amp;gt; B) reduce the work of mining a block to zero, i.e. allow instant mining.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; C) fabricate past blocks entirely.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If SHA256d is broken, Bitcoin as it is fails entirely.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Luke&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ------------------------------------------------------------------------------&lt;br/&gt;&amp;gt; Learn Graph Databases - Download FREE O&amp;#39;Reilly Book&lt;br/&gt;&amp;gt; &amp;#34;Graph Databases&amp;#34; is the definitive new guide to graph databases and their&lt;br/&gt;&amp;gt; applications. Written by three acclaimed leaders in the field,&lt;br/&gt;&amp;gt; this first edition is now available. Download your free book today!&lt;br/&gt;&amp;gt; &lt;a href=&#34;http://p.sf.net/sfu/NeoTech&#34;&gt;http://p.sf.net/sfu/NeoTech&lt;/a&gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Bitcoin-development mailing list&lt;br/&gt;&amp;gt; Bitcoin-development at lists.sourceforge.net&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.sourceforge.net/lists/listinfo/bitcoin-development&#34;&gt;https://lists.sourceforge.net/lists/listinfo/bitcoin-development&lt;/a&gt;&lt;br/&gt;&amp;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/20140603/5a51bf30/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20140603/5a51bf30/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T17:22:13&#43;02:00</updated>
  </entry>

</feed>