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




  <entry>
    <id>https://nostr.ae/nevent1qqs0ycrpfuag9ppr7tl46f65m47wt96s76dncj6pmf4pj8euu8hhrfszypv4j65lcc9xkwalpk58xp3ea6rksj2yxzcptllly43p7rds0yc3wl40yv0</id>
    
      <title type="html">📅 Original date posted:2020-05-04 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0ycrpfuag9ppr7tl46f65m47wt96s76dncj6pmf4pj8euu8hhrfszypv4j65lcc9xkwalpk58xp3ea6rksj2yxzcptllly43p7rds0yc3wl40yv0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswhy72dwykhptwp8wj9z7grgua3ae38evfdep5m6wylhvgdp8h5tq3r670e&#39;&gt;nevent1q…670e&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-05-04&lt;br/&gt;📝 Original message:&amp;gt;&lt;br/&gt;&amp;gt; A side effect of this proposal is it would seem to make it not possible to&lt;br/&gt;&amp;gt; produce a signature for a transaction without having access to the inputs.&lt;br/&gt;&amp;gt; This is limiting for a number of cases where you don&amp;#39;t care about that&lt;br/&gt;&amp;gt; data. There are a litany of use cases where you don&amp;#39;t want to have&lt;br/&gt;&amp;gt; SIGHASH_ALL behavior, and having to sign the scriptpubkeys breaks that. So&lt;br/&gt;&amp;gt; at the very least it should respect other flags.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;I agree, sha_scriptPubKeys should be included only if hash_type does not&lt;br/&gt;match SIGHASH_ANYONECANPAY. I am also sympathetic to aj&amp;#39;s idea of making&lt;br/&gt;the scriptPubKey field dependent on hash_type matching SIGHASH_ANYONECANPAY.&lt;br/&gt;&lt;br/&gt;I also don&amp;#39;t really understand the exact attack. So you submit a&lt;br/&gt;&amp;gt; transaction to the wallet asking them to sign input 10. They sign. They&amp;#39;ve&lt;br/&gt;&amp;gt; committed to the signature being bound to the specific COutpoint and input&lt;br/&gt;&amp;gt; index, so I don&amp;#39;t see how they wouldn&amp;#39;t be required to sign a second&lt;br/&gt;&amp;gt; signature with the other output too? Is there an attack you can describe&lt;br/&gt;&amp;gt; end-to-end relying on this behavior?&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;For example, in a CoinJoin transaction the attacker can construct a&lt;br/&gt;transaction with two inputs (in1, in2) of identical value and two outputs&lt;br/&gt;of identical value, one belonging to the user (user_out) and another&lt;br/&gt;belonging to the attacker (attacker_out). If such a transaction is sent to&lt;br/&gt;the hardware wallet twice with in1 marked as external the first time and&lt;br/&gt;in2 marked as external the second time, then the hardware wallet will&lt;br/&gt;display two signing requests to the user with spending amounts of in2 -&lt;br/&gt;user_out and in1 - user_out respectively. The user will think that they are&lt;br/&gt;signing two different CoinJoin transactions, while in reality they are&lt;br/&gt;signing two different inputs to a single transaction and sending half of&lt;br/&gt;the amount to the attacker.&lt;br/&gt;&lt;br/&gt;As an alternative proposal, I think you can just make a separate BIP for&lt;br/&gt;&amp;gt; some new sigash flags that can be reviewed separately from taproot. There&amp;#39;s&lt;br/&gt;&amp;gt; a lot of value in investing in figuring out more granular controls over&lt;br/&gt;&amp;gt; what the signature hash is you sign, which may have some exciting&lt;br/&gt;&amp;gt; contracting implications!&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;The proposal of adding sha_scriptPubKeys is just an optimization which is&lt;br/&gt;not intended to change what the signature message is committing to. Thus I&lt;br/&gt;don&amp;#39;t see it as warranting a new sigash flag.&lt;br/&gt;&lt;br/&gt;Alternatively, there&amp;#39;s the scheme described in the email you linked by Greg&lt;br/&gt;&amp;gt; Saunders (with the scheme co-attributed to Andrew Poelstra), which seems&lt;br/&gt;&amp;gt; reasonable to me.[1]  It&amp;#39;s only downside (AFAICT) is that it requires an&lt;br/&gt;&amp;gt; extra one-way communication from a signing device to a coordinator.  For a&lt;br/&gt;&amp;gt; true offline signer, that can be annoying, but for an automated hardware&lt;br/&gt;&amp;gt; wallet participating in coinjoins or LN, that doesn&amp;#39;t seem too burdensome&lt;br/&gt;&amp;gt; to me.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Yes, I see this as the correct direction forward. Whatever the exact format&lt;br/&gt;of the ownership proof will be, the proof will need to be signed by the&lt;br/&gt;owner of the UTXO using BIP-0322 or something along those lines. So the&lt;br/&gt;scriptPubKey is needed to verify that signature.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Andrew Kozlik&lt;br/&gt;&lt;br/&gt;On Sat, May 2, 2020 at 11:16 PM Russell O&amp;#39;Connor &amp;lt;roconnor at blockstream.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Sat, May 2, 2020 at 10:26 AM Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; except that we&amp;#39;d arguably still be missing:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;     is this a coinbase output? (Coin.fCoinBase)&lt;br/&gt;&amp;gt;&amp;gt;     what was the height of the coin? (Coin.nHeight)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Maybe committing to the coinbase flag would have some use, but committing&lt;br/&gt;&amp;gt;&amp;gt; to the height would make it hard to chain unconfirmed spends, so at&lt;br/&gt;&amp;gt;&amp;gt; least that part doesn&amp;#39;t seem worth adding.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To add to this point, the height of the coin is something that is *not*&lt;br/&gt;&amp;gt; currently covered by any signature mode and including it would constitute a&lt;br/&gt;&amp;gt; change of an entirely different  caliber; a change that I would strongly&lt;br/&gt;&amp;gt; caution against for your above reason and more.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The coinbase output flag is currently covered by the signature as the&lt;br/&gt;&amp;gt; outpoint hash has the required information (its prevout index of 0xFFFFFFFF&lt;br/&gt;&amp;gt; is only legal in a coinbase transaction).  While I&amp;#39;m not particularly&lt;br/&gt;&amp;gt; enthusiastic about making it easier to distinguish coinbase outputs from&lt;br/&gt;&amp;gt; other outputs, and I worry a little about alternative designs for&lt;br/&gt;&amp;gt; implementing the Bitcoin protocol where this information is not so readily&lt;br/&gt;&amp;gt; available, I suppose I won&amp;#39;t really oppose adding it.  However, I don&amp;#39;t&lt;br/&gt;&amp;gt; think anyone is seriously proposing it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;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/20200504/7722585e/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200504/7722585e/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:24:13&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswgh753p3rjzeqj0pxl7ud9hugem7jgpttz87v7tqm57cxnla6eeqzypv4j65lcc9xkwalpk58xp3ea6rksj2yxzcptllly43p7rds0yc3wgfg9dk</id>
    
      <title type="html">📅 Original date posted:2020-05-01 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswgh753p3rjzeqj0pxl7ud9hugem7jgpttz87v7tqm57cxnla6eeqzypv4j65lcc9xkwalpk58xp3ea6rksj2yxzcptllly43p7rds0yc3wgfg9dk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2e0ssjp8t4cpyk73uq6tu3df5ugxsp6v93wpcm0ut4zczra5peugd4vxs9&#39;&gt;nevent1q…vxs9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-05-01&lt;br/&gt;📝 Original message:Hi Jeremy,&lt;br/&gt;&lt;br/&gt;What you are saying is correct and I am not disputing that there is&lt;br/&gt;sufficient cryptographic commitment in the signature message. As I tried to&lt;br/&gt;explain, my proposal is about avoiding the need for the metadata protocol&lt;br/&gt;you speak of. Avoiding such a protocol has been a design goal in both&lt;br/&gt;BIP-143 [1, 2] and BIP-341 [3, 4], because having to acquire each of the&lt;br/&gt;transactions being spent in their entirety places a significant burden on&lt;br/&gt;offline signing devices.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Andrew&lt;br/&gt;&lt;br/&gt;[1]&lt;br/&gt;&lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki#motivation&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki#motivation&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://bitcointalk.org/index.php?topic=181734.0&#34;&gt;https://bitcointalk.org/index.php?topic=181734.0&lt;/a&gt;&lt;br/&gt;[3]&lt;br/&gt;&lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#cite_note-16&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#cite_note-16&lt;/a&gt;&lt;br/&gt;[4]&lt;br/&gt;&lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#cite_note-17&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#cite_note-17&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;On Fri, May 1, 2020 at 8:56 AM Jeremy &amp;lt;jlrubin at mit.edu&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Andrew,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If you use SIGHASH_ALL it shall sign the COutPoints of all inputs which&lt;br/&gt;&amp;gt; commit to the scriptPubKeys of the txn.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus the 341 hash doesn&amp;#39;t need to sign any additional data.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As a metadata protocol you can provide all input transactions to check the&lt;br/&gt;&amp;gt; scriptPubKeys.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Best,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Jeremy&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; @JeremyRubin &amp;lt;&lt;a href=&#34;https://twitter.com/JeremyRubin&amp;gt&#34;&gt;https://twitter.com/JeremyRubin&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Thu, Apr 30, 2020 at 1:22 AM Andrew Kozlik via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi everyone,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In the current draft of BIP-0341 [1] the signature message commits to the&lt;br/&gt;&amp;gt;&amp;gt; scriptPubKey of the output being spent by the input. I propose that the&lt;br/&gt;&amp;gt;&amp;gt; signature message should commit to the scriptPubKeys of *all* transaction&lt;br/&gt;&amp;gt;&amp;gt; inputs.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In certain applications like CoinJoin, a wallet has to deal with&lt;br/&gt;&amp;gt;&amp;gt; transactions containing external inputs. To calculate the actual amount&lt;br/&gt;&amp;gt;&amp;gt; that the user is spending, the wallet needs to reliably determine for each&lt;br/&gt;&amp;gt;&amp;gt; input whether it belongs to the wallet or not. Without such a mechanism an&lt;br/&gt;&amp;gt;&amp;gt; adversary can fool the wallet into displaying incorrect information about&lt;br/&gt;&amp;gt;&amp;gt; the amount being spent, which can result in theft of user funds [2].&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In order to ascertain non-ownership of an input which is claimed to be&lt;br/&gt;&amp;gt;&amp;gt; external, the wallet needs the scriptPubKey of the previous output spent by&lt;br/&gt;&amp;gt;&amp;gt; this input. It must acquire the full transaction being spent and verify its&lt;br/&gt;&amp;gt;&amp;gt; hash against that which is given in the outpoint. This is an obstacle in&lt;br/&gt;&amp;gt;&amp;gt; the implementation of lightweight air-gapped wallets and hardware wallets&lt;br/&gt;&amp;gt;&amp;gt; in general. If the signature message would commit to the scriptPubKeys of&lt;br/&gt;&amp;gt;&amp;gt; all transaction inputs, then the wallet would only need to acquire the&lt;br/&gt;&amp;gt;&amp;gt; scriptPubKey of the output being spent without having to acquire and verify&lt;br/&gt;&amp;gt;&amp;gt; the hash of the entire previous transaction. If an attacker would provide&lt;br/&gt;&amp;gt;&amp;gt; an incorrect scriptPubKey, then that would cause the wallet to generate an&lt;br/&gt;&amp;gt;&amp;gt; invalid signature message.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Note that committing only to the scriptPubKey of the output being spent&lt;br/&gt;&amp;gt;&amp;gt; is insufficient for this application, because the scriptPubKeys which are&lt;br/&gt;&amp;gt;&amp;gt; needed to ascertain non-ownership of external inputs are precisely the ones&lt;br/&gt;&amp;gt;&amp;gt; that would not be included in any of the signature messages produced by the&lt;br/&gt;&amp;gt;&amp;gt; wallet.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The obvious way to implement this is to add another hash to the signature&lt;br/&gt;&amp;gt;&amp;gt; message:&lt;br/&gt;&amp;gt;&amp;gt; sha_scriptPubKeys (32): the SHA256 of the serialization of all&lt;br/&gt;&amp;gt;&amp;gt; scriptPubKeys of the previous outputs spent by this transaction.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&amp;gt; Andrew Kozlik&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [1]&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#common-signature-message&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#common-signature-message&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; [2]&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-August/014843.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-August/014843.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&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/20200501/a04d22c8/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200501/a04d22c8/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:24:11&#43;02:00</updated>
  </entry>

</feed>