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




  <entry>
    <id>https://nostr.ae/nevent1qqsgd3utx7c9xru8wqw4yqj98ke0cl8vjvaful5u4ant6gzdax8u7gczyq6jkd2n3d6me5fcfjef3lk6v90y23qe4mqsvceferpl7wap3mneg0hegmk</id>
    
      <title type="html">📅 Original date posted:2022-08-09 📝 Original message: As ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgd3utx7c9xru8wqw4yqj98ke0cl8vjvaful5u4ant6gzdax8u7gczyq6jkd2n3d6me5fcfjef3lk6v90y23qe4mqsvceferpl7wap3mneg0hegmk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0xq8kurela4fhdg9v9f4h8wfjpws0crkjf8ty2p9nr9kverv6qlsadt8cg&#39;&gt;nevent1q…t8cg&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-08-09&lt;br/&gt;📝 Original message:&lt;br/&gt;As raised by @crypto-iq and @roasbeef, splices which permit arbitrary&lt;br/&gt;script and input inclusion are at risk of being mempool pinned. Here we&lt;br/&gt;present a solution to this splice pinning problem.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;## Background&lt;br/&gt;&lt;br/&gt;Pinning can be done by building a very large “junk” transaction that spends&lt;br/&gt;from an important pending one. There are two known pinning vectors:&lt;br/&gt;ancestor bulking thru addition of new inputs and junk pinning via the&lt;br/&gt;spending of outputs.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Pinning pushes transactions to the bottom of the priority list without a&lt;br/&gt;practical way of bumping it up. It is in effect a griefing attack, but in&lt;br/&gt;the case of lightning can risk funds loss for HTLCs that have timed out for&lt;br/&gt;a pinned commitment transaction.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Anchor outputs were introduced to lightning to mitigate the junk pinning&lt;br/&gt;vector; they work by adding a minimum of  `1 CSV` lock to all outputs on&lt;br/&gt;the commitment transaction except for two “anchor” outputs, one for each&lt;br/&gt;channel peer. (These take advantage of a 1-tx carve-out exception to enable&lt;br/&gt;propagation of anchors despite any junk attached to the peer’s anchor).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;## Mitigation&lt;br/&gt;&lt;br/&gt;Splice transactions are susceptible to both junk and bulk pinning attacks.&lt;br/&gt;Here’s how we propose mitigating these for splice.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[ &lt;img src=&#34;https://i.imgur.com/ayiO1Qt.png&#34;&gt; ]&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;For “ancestor bulking”, every `tx_add_input` proposed by a peer must be&lt;br/&gt;included in the UTXO set. A node MUST verify the presence of a proposed&lt;br/&gt;input before adding it to the splicing transaction.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;For “output junk”, every output included directly in a splice transaction&lt;br/&gt;MUST be a v0 P2SH witness script which begins with a minimum of `1 CSV`&lt;br/&gt;relative timelock. No output on the splice transaction will be spendable&lt;br/&gt;until it is included in a block. This prevents junk pinning by removing the&lt;br/&gt;ability to propose spends of splice outputs before the transaction is&lt;br/&gt;included in a block.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;There are two side effects here.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;1) You cannot CPFP a splice transaction. All splices must be RBF’d to be&lt;br/&gt;fee-bumped. The interactive tx protocol already provides a protocol for&lt;br/&gt;initiating an RBF, which we re-use for splicing.&lt;br/&gt;&lt;br/&gt;2) Arbitrary 3rd party scriptPubKeys are not permissible directly into the&lt;br/&gt;splice tx.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;In order for this to work we need to validate that every output has a 1&lt;br/&gt;block CSV. There are two output types to consider:&lt;br/&gt;&lt;br/&gt;   1. New channel outpoints&lt;br/&gt;   2. Arbitrary splice out funds&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;For arbitrary splice out, funds can be included in a “fan-out” transaction.&lt;br/&gt;Here standard pay to address etc outputs can live. The output leading to&lt;br/&gt;the fan-out transaction will be a P2WSH that also begins with [OP_1,&lt;br/&gt;OP_CHECKSEQUENCEVERIFY] (referred to from here on as ‘1 CSV’). Each splice&lt;br/&gt;party SHOULD build a fan-out transaction for all arbitrary spliced outputs.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[ &lt;img src=&#34;https://i.imgur.com/40Dy3oq.png&#34;&gt; ]&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Splice-in transactions will not require any fan-out children as long as all&lt;br/&gt;change goes into the channel outpoint.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;For new channel outpoints, the v0 witness script should be modified to&lt;br/&gt;start with [OP_1, OP_CHECKSEQUENCEVERIFY]. It needs to be the first item in&lt;br/&gt;the script to allow easy validation that it is used and not hidden in a&lt;br/&gt;false conditional. This would need to be applied to post-splice channel&lt;br/&gt;outpoints and probably dual funding channels should add it as well so they&lt;br/&gt;can be successfully included in splices.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;### interactive tx protocol changes&lt;br/&gt;&lt;br/&gt;For splices, `tx_add_output` MUST include the `witness_script` in the tlv.&lt;br/&gt;Upon receiving outputs, nodes must validate the script matches the script&lt;br/&gt;hash in the output and that it begins with a minimum of 1 CSV.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;## HTLC Timeouts and Splices&lt;br/&gt;&lt;br/&gt;Typically when this technique is used, one or two anchor outputs are added&lt;br/&gt;to purposely allow for CPFP fee bumping. But, turns out, we already have a&lt;br/&gt;usable anchor in the original commitment transaction! Very exciting.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;The interactive tx protocol mandates that splice txs are RBF-enabled.&lt;br/&gt;Broadcast splice proposals can be replaced out for the original commitment&lt;br/&gt;transaction at any time. Since the original commitment transaction has&lt;br/&gt;existing anchors, these may be used to increase fees on a force close. This&lt;br/&gt;combined with every other output in the tree being locked behind a 1 CSV&lt;br/&gt;means the force close will always have top mempool priority, mitigating the&lt;br/&gt;“output junk” style pin.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;- Nifty &amp;amp; Dusty&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/20220809/d79c4ee0/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20220809/d79c4ee0/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:06:39&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsretl0gzzjq5fskfscmz7vqjhswarlym8mmlcslndcpluatn4kt9gzyq6jkd2n3d6me5fcfjef3lk6v90y23qe4mqsvceferpl7wap3mnegjmu7sn</id>
    
      <title type="html">📅 Original date posted:2020-03-02 📝 Original message:Stepan ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsretl0gzzjq5fskfscmz7vqjhswarlym8mmlcslndcpluatn4kt9gzyq6jkd2n3d6me5fcfjef3lk6v90y23qe4mqsvceferpl7wap3mnegjmu7sn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxzatx7vcqkhpskqfm8x0lj9kd0q5yav2l0ertkfewvyeu7eg0h3qltjtwk&#39;&gt;nevent1q…jtwk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-03-02&lt;br/&gt;📝 Original message:Stepan have you spent any time considering a scheme that could involve HD&lt;br/&gt;keys, preregistering n (ie. 1000) preimages, or something similar to reduce&lt;br/&gt;the number of rounds at time of signing?&lt;br/&gt;&lt;br/&gt;Would a zero knowledge solution allow for a reduction in rounds?&lt;br/&gt;&lt;br/&gt;On Wed, Feb 26, 2020 at 7:13 PM Stepan Snigirev 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; This topic appeared in the list a few times so I would like to discuss it&lt;br/&gt;&amp;gt; in more detail and maybe push forward to standardization.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We have to accept that any hardware wallet or an air-gapped computer we&lt;br/&gt;&amp;gt; use to sign transactions can be compromised. It may happen via a supply&lt;br/&gt;&amp;gt; chain attack or malicious firmware update.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If the signer is isolated (faraday cage, airgap and so on), it still can&lt;br/&gt;&amp;gt; leak private keys to the outside world by choosing nonces for signatures in&lt;br/&gt;&amp;gt; a funny way such that the attacker can calculate our private keys. Back in&lt;br/&gt;&amp;gt; the days, I wrote a small post [1] and a proof-of-concept demo [2] of this&lt;br/&gt;&amp;gt; attack.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Deterministic nonce generation can be verified only if we have private&lt;br/&gt;&amp;gt; keys somewhere else. It doubles the attack surface - now we need to&lt;br/&gt;&amp;gt; maintain two independent signers from different vendors that use the same&lt;br/&gt;&amp;gt; private key and the same deterministic algorithm for a nonce generation. In&lt;br/&gt;&amp;gt; addition to that, as Pieter mentioned in the Schnorr-BIP, deterministic&lt;br/&gt;&amp;gt; nonces are vulnerable to glitch attacks [3].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A simple way to fix it is by forcing the signer to use additional entropy&lt;br/&gt;&amp;gt; from the host. This protocol takes away the privilege of picking nonce from&lt;br/&gt;&amp;gt; the signer and doesn&amp;#39;t require any secret material outside the signer.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I suggest the following implementation of the protocol for signing a&lt;br/&gt;&amp;gt; message `m`:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Host picks a random number `n` and sends its hash together with the&lt;br/&gt;&amp;gt; message `m` to the signer.&lt;br/&gt;&amp;gt; 2. Signer computes a nonce `k` it wants to use for signing. It can be&lt;br/&gt;&amp;gt; either a deterministic scheme or using RNG. Signer commits to the chosen&lt;br/&gt;&amp;gt; nonce by sending the corresponding point `R=kG` to the host.&lt;br/&gt;&amp;gt; 3. Host sends the preimage `n` to the signer&lt;br/&gt;&amp;gt; 4. Signer tweaks the nonce by this number `k&amp;#39;=k&#43;n`, signs the message and&lt;br/&gt;&amp;gt; sends back the signature (R&amp;#39;,s)&lt;br/&gt;&amp;gt; 5. Host verifies that the public point in the signature is tweaked by n:&lt;br/&gt;&amp;gt; `R&amp;#39;==R&#43;nG`&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ASCII-art:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    Host                                Untrusted signer&lt;br/&gt;&amp;gt; 1. Pick random n   --- sha256(n),m --&amp;gt;  calculate nonce k&lt;br/&gt;&amp;gt; 2.                 &amp;lt;------ R=kG ------  commit to k&lt;br/&gt;&amp;gt; 3. Send preimage   -------- n -------&amp;gt;  sign with nonce k&amp;#39;=k&#43;n&lt;br/&gt;&amp;gt; 4. Verify R&amp;#39;==R&#43;nG &amp;lt;------- sig ------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe this protocol solves the problem. A drawback of this scheme is&lt;br/&gt;&amp;gt; that the number of communication rounds doubles, so it might be pretty&lt;br/&gt;&amp;gt; inconvenient for air-gapped remotely located signers.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I also suggest the following extensions that might be helpful for certain&lt;br/&gt;&amp;gt; use-cases&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # Extensions&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Multiple hosts&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There are some use-cases where multiple hosts are involved in the setup&lt;br/&gt;&amp;gt; and all hosts don&amp;#39;t trust each other and the signer. So all of them want to&lt;br/&gt;&amp;gt; give extra entropy to the signer and verify that it was included. At the&lt;br/&gt;&amp;gt; moment I have exactly this scenario - our main MCU doesn&amp;#39;t trust the&lt;br/&gt;&amp;gt; proprietary closed-source secure element, and the computer doesn&amp;#39;t trust&lt;br/&gt;&amp;gt; the whole hardware wallet. We need a way to convince both of them that&lt;br/&gt;&amp;gt; their entropy was used in the nonce.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It can be solved by concatenating hashes and preimages:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Host1 ------- h(n1) --&amp;gt; Host 2 -- h(n1) h(n2) --&amp;gt; Signer&lt;br/&gt;&amp;gt;       &amp;lt;--- R&#43;n2 G -----        &amp;lt;------- R -------&lt;br/&gt;&amp;gt;       ------- n1 -----&amp;gt;        ------ n1 n2 ----&amp;gt; sign with k&amp;#39;&amp;#39;=k&#43;n1&#43;n2&lt;br/&gt;&amp;gt; Ver: R&amp;#39;&amp;#39;==R&amp;#39;&#43;n1 G       Ver: R&amp;#39;&amp;#39;==R&#43;n2 G &#43; n1 G&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In this case, the first host doesn&amp;#39;t even notice that the second host was&lt;br/&gt;&amp;gt; also using this protocol and mixing in the entropy. And the signer only&lt;br/&gt;&amp;gt; needs to add one extra number to the nonce.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Stateless random signer&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If the signer wants to generate a nonce non-deterministically but doesn&amp;#39;t&lt;br/&gt;&amp;gt; have an ability to store a generated nonce it may send back to the host&lt;br/&gt;&amp;gt; some meta-information that would help it to re-generate the same nonce&lt;br/&gt;&amp;gt; later. It can be for example additional random data used in a deterministic&lt;br/&gt;&amp;gt; scheme, either encrypted and authenticated or just as a plain text (I am&lt;br/&gt;&amp;gt; more a fan of encrypted though).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Generally, the host shouldn&amp;#39;t care what this data is about - he just&lt;br/&gt;&amp;gt; stores the data between rounds and sends it back to the signer with the&lt;br/&gt;&amp;gt; next round.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # Implementation for PSBT&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We can either use proprietary fields [4] or define key-value pairs and add&lt;br/&gt;&amp;gt; them to the BIP-174. Depends if anyone else is interested in using this&lt;br/&gt;&amp;gt; protocol or not.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I would suggest the following key-value per-input pairs assuming multiple&lt;br/&gt;&amp;gt; hosts want to mix in external entropy:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Key: {PSBT_IN_EXT_NONCE_HASH}|{pubkey}, Value:&lt;br/&gt;&amp;gt; {sha256(n1)}|{sha256(n2)}|...&lt;br/&gt;&amp;gt; 2. Key: {PSBT_IN_NONCE_COMMITMENT}|{pubkey}, Value: {33-byte R point}&lt;br/&gt;&amp;gt; 3. Key: {PSBT_IN_NONCE_SIGNER_METADATA}|{pubkey}, Value: {anything}&lt;br/&gt;&amp;gt; 4. Key: {PSBT_IN_EXT_NONCE_PREIMAGE}|{pubkey}, Value: {n1}|{n2}|...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then the signature from the signer is placed into existing&lt;br/&gt;&amp;gt; PSBT_IN_PARTIAL_SIG. Combiner and Finaliser should verify that nonce in the&lt;br/&gt;&amp;gt; signature includes external entropy and may remove their own entropy from&lt;br/&gt;&amp;gt; the set. They should also verify that the values of the fields did not&lt;br/&gt;&amp;gt; change between rounds.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So, list, what do you think? Am I missing something? Would it be&lt;br/&gt;&amp;gt; interesting to have this protocol standardized and deployed?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # References&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://medium.com/cryptoadvance/hardware-wallets-can-be-hacked-but-this-is-fine-a6156bbd199&#34;&gt;https://medium.com/cryptoadvance/hardware-wallets-can-be-hacked-but-this-is-fine-a6156bbd199&lt;/a&gt;&lt;br/&gt;&amp;gt; [2]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/stepansnigirev/chosen_nonce_demo/blob/master/HD_key.ipynb&#34;&gt;https://github.com/stepansnigirev/chosen_nonce_demo/blob/master/HD_key.ipynb&lt;/a&gt;&lt;br/&gt;&amp;gt; [3]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#alternative-signing&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#alternative-signing&lt;/a&gt;&lt;br/&gt;&amp;gt; [4]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#proprietary-use-type&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#proprietary-use-type&lt;/a&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/20200302/7860629d/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200302/7860629d/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:23:10&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxzatx7vcqkhpskqfm8x0lj9kd0q5yav2l0ertkfewvyeu7eg0h3qzyq6jkd2n3d6me5fcfjef3lk6v90y23qe4mqsvceferpl7wap3mnegl97m82</id>
    
      <title type="html">📅 Original date posted:2020-03-02 📝 Original message:&#43;1 ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxzatx7vcqkhpskqfm8x0lj9kd0q5yav2l0ertkfewvyeu7eg0h3qzyq6jkd2n3d6me5fcfjef3lk6v90y23qe4mqsvceferpl7wap3mnegl97m82" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs26kwk8f4haptdsn40rqreq2ekfqx7f2asq9py3gl2275a72es5wshrzpqw&#39;&gt;nevent1q…zpqw&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-03-02&lt;br/&gt;📝 Original message:&#43;1 love that progress is being made on this. Excited to implement it once&lt;br/&gt;it’s ready.&lt;br/&gt;&lt;br/&gt;Would love if things like the incrementing number were included in the&lt;br/&gt;standard as well.&lt;br/&gt;&lt;br/&gt;Cheers! 🍻&lt;br/&gt;&lt;br/&gt;On Fri, Feb 28, 2020 at 9:51 AM Marko 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; Thanks for starting this initiative; it has been a long standing goal of&lt;br/&gt;&amp;gt; mine to implement and release this protocol. Your blog post on the topic&lt;br/&gt;&amp;gt; actually inspired me to pick up this work again a few months ago.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Jonas Nick has implemented the protocol in the secp256k1 library for&lt;br/&gt;&amp;gt; Schnorr sigs here: &lt;a href=&#34;https://github.com/bitcoin-core/secp256k1/pull/590&#34;&gt;https://github.com/bitcoin-core/secp256k1/pull/590&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I have backported the same scheme to ECDSA in the secp256k1 library&lt;br/&gt;&amp;gt; here, so it can be used also for current transactions:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin-core/secp256k1/pull/669&#34;&gt;https://github.com/bitcoin-core/secp256k1/pull/669&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I also made proof of concepts for the BitBox02 hw wallet firmware and&lt;br/&gt;&amp;gt; BitBoxApp wallet to verify that the protocol also works well in practice.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The actual scheme used in those implementations is a generalized&lt;br/&gt;&amp;gt; sign-to-contract scheme, where the final nonce is computed as `k&amp;#39; = k &#43;&lt;br/&gt;&amp;gt; H(k*G, n)` instead of `k&amp;#39;=k&#43;n`, but otherwise it works mostly the same&lt;br/&gt;&amp;gt; for the anti nonce covert channel protocol. I suggest to use this scheme&lt;br/&gt;&amp;gt; in PSBT as well.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; We can either use proprietary fields [4] or define key-value pairs and&lt;br/&gt;&amp;gt; add&lt;br/&gt;&amp;gt; &amp;gt; them to the BIP-174. Depends if anyone else is interested in using this&lt;br/&gt;&amp;gt; &amp;gt; protocol or not.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;d definitely be interested in seeing widespread support for this, and&lt;br/&gt;&amp;gt; standardizing it would help with that.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With PSBT used with an air-gapped signer, there is increased danger in&lt;br/&gt;&amp;gt; implementing the protocol wrongly by relying on the contents of the PSBT&lt;br/&gt;&amp;gt; alone in the final verification step of a signature. The PSBT must be&lt;br/&gt;&amp;gt; verified carefully against state stored by the host for the PSBT.&lt;br/&gt;&amp;gt; Otherwise the signer can for example change or pre-fill the relevant&lt;br/&gt;&amp;gt; NONCE fields and leak the private keys anyway. Is there a current best&lt;br/&gt;&amp;gt; practice for how a PSBT can be identified by the host to store/retrieve&lt;br/&gt;&amp;gt; the state?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Are there other examples in PSBT where the host can&amp;#39;t trust the contents&lt;br/&gt;&amp;gt; of the PSBT the signer returns (except of course for the parts the user&lt;br/&gt;&amp;gt; can verify themselves, like recipients, amounts, etc.)? In any case,&lt;br/&gt;&amp;gt; guidelines or conventions on how to avoid the pitfalls would be good.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Best, Marko&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/20200302/668d43e4/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200302/668d43e4/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:23:09&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsggud004wahfyyshnjpwh5t6v5j9d0rkmv8eddz26vekhdr480s2czyq6jkd2n3d6me5fcfjef3lk6v90y23qe4mqsvceferpl7wap3mnegyqzdfv</id>
    
      <title type="html">📅 Original date posted:2019-08-07 📝 Original message:Does ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsggud004wahfyyshnjpwh5t6v5j9d0rkmv8eddz26vekhdr480s2czyq6jkd2n3d6me5fcfjef3lk6v90y23qe4mqsvceferpl7wap3mnegyqzdfv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspv86nge4z9z9zx09pasxm8st2a944dr85qurlpmsunv0s9mdem0g6vy8rn&#39;&gt;nevent1q…y8rn&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-08-07&lt;br/&gt;📝 Original message:Does revaulting vault up with the same keys, or new ones?&lt;br/&gt;&lt;br/&gt;Are they new derivation paths on the same key?&lt;br/&gt;&lt;br/&gt;Would love some expanded explanation on how you’re proposing this would&lt;br/&gt;work.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Dustin&lt;br/&gt;&lt;br/&gt;On Wed, Aug 7, 2019 at 1:35 PM Bryan Bishop 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; Hi,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; One of the biggest problems with the vault scheme (besides all of the&lt;br/&gt;&amp;gt; setup data that has to be stored for a long time) is an attacker that&lt;br/&gt;&amp;gt; silently steals the hot wallet private key and waits for the vault&amp;#39;s&lt;br/&gt;&amp;gt; owner to make a delayed-spend transaction to initiate a withdrawal&lt;br/&gt;&amp;gt; from the vault. If the user was unaware of the theft of the key, then&lt;br/&gt;&amp;gt; the attacker could steal the funds after the delay period.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To mitigate this, it is important to choose a stipend or withdrawal&lt;br/&gt;&amp;gt; amount per withdrawal period like x% of the funds. This limits the&lt;br/&gt;&amp;gt; total stolen funds to x% because once the funds are stolen the user&lt;br/&gt;&amp;gt; would know their hot key is compromised, and the user would know to&lt;br/&gt;&amp;gt; instead use one of the other clawback paths during all of the future&lt;br/&gt;&amp;gt; withdrawal delay periods instead of letting the delay timeout all the&lt;br/&gt;&amp;gt; way to the (stolen) default/hot key.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The reason why a loss limiter is the way to go is because there&amp;#39;s&lt;br/&gt;&amp;gt; currently no way (that I am aware of, without an upgrade) to force an&lt;br/&gt;&amp;gt; attacker to reveal his key on the blockchain while also forcing the&lt;br/&gt;&amp;gt; attacker to use a timelock before the key can spend the coins. I am&lt;br/&gt;&amp;gt; curious about what the smallest least invasive soft-fork would be for&lt;br/&gt;&amp;gt; enabling this kind of timelock. There are so many covenant proposals&lt;br/&gt;&amp;gt; at this point (CHECKSIGFROMSTACK, SECURETHEBAG, CHECKOUTPUTVERIFY,&lt;br/&gt;&amp;gt; ....). Or there&amp;#39;s crazy things like a fork that enables a transaction&lt;br/&gt;&amp;gt; mode where the (timelock...) script of the first output is&lt;br/&gt;&amp;gt; automatically prefixed to any of the other scripts on any of the other&lt;br/&gt;&amp;gt; outputs when an input tries to spend in the future. A thief could add&lt;br/&gt;&amp;gt; his key to a new output on the transaction and try to spend (just like&lt;br/&gt;&amp;gt; a user would with a fresh/rotated key), but the OP_CSV would be&lt;br/&gt;&amp;gt; automatically added to his script to implement the public observation&lt;br/&gt;&amp;gt; delay window.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Also, there was other previous work that I was only informed about&lt;br/&gt;&amp;gt; today after posting my proposal, so I should mention these as related&lt;br/&gt;&amp;gt; work:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-February/015793.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-February/015793.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://blog.oleganza.com/post/163955782228/how-segwit-makes-security-better&#34;&gt;https://blog.oleganza.com/post/163955782228/how-segwit-makes-security-better&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://www.youtube.com/watch?v=diNxp3ZTquo&#34;&gt;https://www.youtube.com/watch?v=diNxp3ZTquo&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://bitcointalk.org/index.php?topic=5111656&#34;&gt;https://bitcointalk.org/index.php?topic=5111656&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - Bryan&lt;br/&gt;&amp;gt; &lt;a href=&#34;http://heybryan.org/&#34;&gt;http://heybryan.org/&lt;/a&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/20190807/eb1c27d9/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190807/eb1c27d9/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:20:06&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsry4uxghc9znuqz906dzf00wzftm4yhe42j97aty8ypwqxpyrjfrgzyq6jkd2n3d6me5fcfjef3lk6v90y23qe4mqsvceferpl7wap3mneg4tyw5u</id>
    
      <title type="html">📅 Original date posted:2019-03-13 📝 Original message:I’ve ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsry4uxghc9znuqz906dzf00wzftm4yhe42j97aty8ypwqxpyrjfrgzyq6jkd2n3d6me5fcfjef3lk6v90y23qe4mqsvceferpl7wap3mneg4tyw5u" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgpjgynwachhlkpp3zra8806ppatylevfhm80795du2ngnvxssahgvhd5nx&#39;&gt;nevent1q…d5nx&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-03-13&lt;br/&gt;📝 Original message:I’ve solved the same problem in a different way.&lt;br/&gt;&lt;br/&gt;1) Submit a transaction&lt;br/&gt;2) Collect all reject messages (that have matching txid in the reject data)&lt;br/&gt;3) Wait 16 seconds after first error message received (chosen semirandomly&lt;br/&gt;from trial and error) before processing errors&lt;br/&gt;4) Wait for our txid to be submitted back to us through the mempool, if we&lt;br/&gt;get it notify success and delete all pending error events&lt;br/&gt;5) Signal failure with the given reject code if present (after the 16&lt;br/&gt;seconds have elapsed)&lt;br/&gt;6) If no error or success after 20 seconds, signal timeout failure&lt;br/&gt;&lt;br/&gt;This works fairly well in testing. Newer transaction types seem to generate&lt;br/&gt;reject codes 100% of the time (from at least one node when sending to 4&lt;br/&gt;nodes) so this culling / time delay approach is essentially required.&lt;br/&gt;&lt;br/&gt;On a related note: One issue is that RBF attempts with too small a fee and&lt;br/&gt;accidental double spends (with enough fee for 1 tx but not a RBF) both&lt;br/&gt;generate the same reject code: not enough fee.&lt;br/&gt;&lt;br/&gt;A new reject code for RBF based too small of fee would definitely make for&lt;br/&gt;a better user experience as I’ve seen this exact problem create confusion&lt;br/&gt;for users.&lt;br/&gt;&lt;br/&gt;Removing reject codes would make for a much worse user experience. “Your tx&lt;br/&gt;failed and we have no idea why” would be the only message and it would&lt;br/&gt;require waiting for a full timeout.&lt;br/&gt;&lt;br/&gt;On Wed, Mar 13, 2019 at 3:16 PM Oscar Guindzberg 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; &amp;gt; I&amp;#39;d like to better understand this, but it would be easier to just&lt;br/&gt;&amp;gt; &amp;gt; read the code than ask a bunch of questions. I tried looking for the&lt;br/&gt;&amp;gt; &amp;gt; handling of reject messages in Android  Bitcoin Wallet and BitcoinJ&lt;br/&gt;&amp;gt; &amp;gt; and didn&amp;#39;t really find and handling other than logging exceptions.&lt;br/&gt;&amp;gt; &amp;gt; Would you mind giving me a couple pointers to where in the code&lt;br/&gt;&amp;gt; &amp;gt; they&amp;#39;re handled?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java#L93-L108&#34;&gt;https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java#L93-L108&lt;/a&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/20190313/29d5abf3/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190313/29d5abf3/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:16:37&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsx8cawn7m9z4rracdnc2knsxhe23lv3kxkdej6ddw06fausuu4dxqzyq6jkd2n3d6me5fcfjef3lk6v90y23qe4mqsvceferpl7wap3mnegvefd4y</id>
    
      <title type="html">📅 Original date posted:2019-03-06 📝 Original message:The ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsx8cawn7m9z4rracdnc2knsxhe23lv3kxkdej6ddw06fausuu4dxqzyq6jkd2n3d6me5fcfjef3lk6v90y23qe4mqsvceferpl7wap3mnegvefd4y" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsful2mjuwf8f03rj0henwvwxnq2jq3lq4eh0puw3kwzj83kfwfd7spzvjex&#39;&gt;nevent1q…vjex&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-03-06&lt;br/&gt;📝 Original message:The reject message is helpful for figuring out why a tx was rejected.&lt;br/&gt;&lt;br/&gt;It’s not useful for determining success, yes. Particularly when doing&lt;br/&gt;segwit / newer types of tx’s as there’s always one or more pesky nodes who&lt;br/&gt;still don’t support it and send a reject message for perfectly good tx’s.&lt;br/&gt;&lt;br/&gt;But after a delay where you haven’t seen your tx propagated on the network,&lt;br/&gt;it’s useful to know *why* it failed.&lt;br/&gt;&lt;br/&gt;What would be nice is actually expanding this error message. Currently with&lt;br/&gt;RBF tx’s “fee too small” is sent for both original transactions as well as&lt;br/&gt;replacement transactions. So a bug accidentally sending spent txos&lt;br/&gt;(currently in mempool) says “fee too small” instead of something more&lt;br/&gt;appropriate like “fee too small to supersede existing unconfirmed&lt;br/&gt;transaction.”&lt;br/&gt;&lt;br/&gt;On Tue, Mar 5, 2019 at 7:26 PM Marco Falke 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; Bitcoin Core may send &amp;#34;reject&amp;#34; messages as response to &amp;#34;tx&amp;#34;, &amp;#34;block&amp;#34; or&lt;br/&gt;&amp;gt; &amp;#34;version&amp;#34; messages from a network peer when the message could not be&lt;br/&gt;&amp;gt; accepted.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This feature is toggled by the `-enablebip61` command line option and has&lt;br/&gt;&amp;gt; been&lt;br/&gt;&amp;gt; disabled by default since Bitcoin Core version 0.18.0 (not yet released as&lt;br/&gt;&amp;gt; of&lt;br/&gt;&amp;gt; time of writing). Nodes on the network can not generally be trusted to send&lt;br/&gt;&amp;gt; valid (&amp;#34;reject&amp;#34;) messages, so this should only ever be used when connected&lt;br/&gt;&amp;gt; to a&lt;br/&gt;&amp;gt; trusted node. At this time, I am not aware of any software that requires&lt;br/&gt;&amp;gt; this&lt;br/&gt;&amp;gt; feature, and I would like to remove if from Bitcoin Core to make the&lt;br/&gt;&amp;gt; codebase&lt;br/&gt;&amp;gt; slimmer, easier to understand and maintain. Let us know if your application&lt;br/&gt;&amp;gt; relies on this feature and you can not use any of the recommended&lt;br/&gt;&amp;gt; alternatives:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Testing or debugging of implementations of the Bitcoin P2P network&lt;br/&gt;&amp;gt; protocol&lt;br/&gt;&amp;gt;   should be done by inspecting the log messages that are produced by a&lt;br/&gt;&amp;gt; recent&lt;br/&gt;&amp;gt;   version of Bitcoin Core. Bitcoin Core logs debug messages&lt;br/&gt;&amp;gt;   (`-debug=&amp;lt;category&amp;gt;`) to a stream (`-printtoconsole`) or to a file&lt;br/&gt;&amp;gt;   (`-debuglogfile=&amp;lt;debug.log&amp;gt;`).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Testing the validity of a block can be achieved by specific RPCs:&lt;br/&gt;&amp;gt;   - `submitblock`&lt;br/&gt;&amp;gt;   - `getblocktemplate` with `&amp;#39;mode&amp;#39;` set to `&amp;#39;proposal&amp;#39;` for blocks with&lt;br/&gt;&amp;gt;     potentially invalid POW&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Testing the validity of a transaction can be achieved by specific RPCs:&lt;br/&gt;&amp;gt;   - `sendrawtransaction`&lt;br/&gt;&amp;gt;   - `testmempoolaccept`&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Wallets should not use the absence of &amp;#34;reject&amp;#34; messages to indicate a&lt;br/&gt;&amp;gt;   transaction has propagated the network, nor should wallets use &amp;#34;reject&amp;#34;&lt;br/&gt;&amp;gt;   messages to set transaction fees. Wallets should rather use fee&lt;br/&gt;&amp;gt; estimation&lt;br/&gt;&amp;gt;   to determine transaction fees and set replace-by-fee if desired. Thus,&lt;br/&gt;&amp;gt; they&lt;br/&gt;&amp;gt;   could wait until the transaction has confirmed (taking into account the&lt;br/&gt;&amp;gt; fee&lt;br/&gt;&amp;gt;   target they set (compare the RPC `estimatesmartfee`)) or listen for the&lt;br/&gt;&amp;gt;   transaction announcement by other network peers to check for propagation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I propose to remove &amp;#34;reject&amp;#34; messages from Bitcoin Core 0.19.0 unless&lt;br/&gt;&amp;gt; there are&lt;br/&gt;&amp;gt; valid concerns about its removal.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Marco&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/20190305/bf105368/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190305/bf105368/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:16:35&#43;02:00</updated>
  </entry>

</feed>