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




  <entry>
    <id>https://nostr.ae/nevent1qqs07035s5yfha67g2c090t7sd5kdyv87js0d5wm54ec369smqay67czyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwt9x3ey</id>
    
      <title type="html">📅 Original date posted:2023-05-25 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs07035s5yfha67g2c090t7sd5kdyv87js0d5wm54ec369smqay67czyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwt9x3ey" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv2aqux8kpj6cx444rv8vstfs3fxcraz478f5kz9lcktujjq9d4zshqhyq7&#39;&gt;nevent1q…hyq7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-05-25&lt;br/&gt;🗒️ Summary of this message: A proposed L2 protocol involves settling transactions on L1 after a delay of 3-6 blocks to mitigate the risk of reorgs. Users must wait for sufficient confirmation depth before receiving payments.&lt;br/&gt;📝 Original message:Regarding this:&lt;br/&gt;&lt;br/&gt;&amp;gt; Users are not so well protected during reorgs, e.g. if Bob double-spends&lt;br/&gt;&amp;gt; a transaction whose funds were later used in a payment to Carol, then&lt;br/&gt;&amp;gt; Carol loses the money. For this reason, Alice will probably want to&lt;br/&gt;&amp;gt; prove to users that no funds they receive in a payment derive from any&lt;br/&gt;&amp;gt; deposit less than safe_confirmation_depth blocks.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m of the opinion that any L2 protocol having a similar concept of block mining but for L2 transactions is a pretty good idea, but the reorgs trapdoor you mentioned could theoretically be mitigated ARK nodes considering their settling transactions on L1 as final after say, 3 blocks, or maybe even 6 blocks.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m leaning towards the standard 6 blocks, as this delay is invisible to users anyway, and only node operators will really notice it.&lt;br/&gt;&lt;br/&gt;It is kind of the same way how miners can&amp;#39;t spend coinbase transactions for 100 blocks.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s a pretty good idea from Burak though, and I can&amp;#39;t wait to see nodes in action with this.&lt;br/&gt;&lt;br/&gt;- Ali&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Burak,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Thanks for this really interesting protocol! I tend to analyze&lt;br/&gt;&amp;gt; complicated ideas like this by writing about them in my own words, so&lt;br/&gt;&amp;gt; I&amp;#39;ve pasted my summary of your idea to the end of this email in case&lt;br/&gt;&amp;gt; it&amp;#39;s useful, either to other people or to you in helping understand my&lt;br/&gt;&amp;gt; one concern.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; My concern is the same one I think Olaoluwa Osuntokun mentioned on&lt;br/&gt;&amp;gt; Twitter[1] and (less clear to me) might be related to ZmnSCPxj&amp;#39;s&lt;br/&gt;&amp;gt; concern[2]:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; It seems to me that receiving a payment on the protocol, including&lt;br/&gt;&amp;gt; conditional payments using HTLC, PTLC, or Anchor-TLC, requires waiting&lt;br/&gt;&amp;gt; for the transaction containing that payment to confirm to a sufficient&lt;br/&gt;&amp;gt; depth (e.g., I&amp;#39;d wait 6 blocks for small payments and longer for huge&lt;br/&gt;&amp;gt; payments). Am I missing something?&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; My summary of how I think that part of the protocol works is in the&lt;br/&gt;&amp;gt; sections labeled &amp;#34;Make an unconditioned payment&amp;#34; and &amp;#34;Make a conditional&lt;br/&gt;&amp;gt; payment&amp;#34; below. In short, it&amp;#39;s clear to me how the service provider and&lt;br/&gt;&amp;gt; the customer can make instant atomic swaps with each other---they can&lt;br/&gt;&amp;gt; either spend instantly cooperatively, or they have to wait for a&lt;br/&gt;&amp;gt; timeout. But how can a receiver of funds be assured that they will&lt;br/&gt;&amp;gt; actually get those funds unless there&amp;#39;s already a timelock and&lt;br/&gt;&amp;gt; cooperative spend path placed on those funds?&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; -Dave&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Rough initial summary of Ark protocol:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Alice runs an Ark service provider. Every 5 seconds, she broadcasts a&lt;br/&gt;&amp;gt; new unconfirmed onchain transaction that pays three outputs (the&lt;br/&gt;&amp;gt; three Cs):&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; 1. Change Output: money not used for the other two Cs that gets sent&lt;br/&gt;&amp;gt; back to the the transaction creator.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; 2. Connector Output: an output that will be used in a future&lt;br/&gt;&amp;gt; transaction created by Alice as protection against double spends.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; 3. Commitment Output: a CTV-style commitment to a set of outputs that&lt;br/&gt;&amp;gt; can be published later in a descendant transaction (alternatively,&lt;br/&gt;&amp;gt; the commitment output may be spent unilaterally by Alice after 4&lt;br/&gt;&amp;gt; weeks).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Bob wants to deposit 1 BTC with Alice. He sends her an unsigned PSBT&lt;br/&gt;&amp;gt; with an input of his and a change output. She updates the PSBT with a&lt;br/&gt;&amp;gt; commitment output that refunds Bob the 1 BTC and a connector output with&lt;br/&gt;&amp;gt; some minimum value. They both sign the PBST and it is broadcast. We&amp;#39;ll&lt;br/&gt;&amp;gt; ignore fees in our examples, both onchain transaction fees and fees paid&lt;br/&gt;&amp;gt; to Alice.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; From here, there are several things that Bob can do:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Unilaterally withdraw: Bob can spend from the commitment output to&lt;br/&gt;&amp;gt; put his refund onchain. The refund can only be spent after a 24-hour&lt;br/&gt;&amp;gt; time delay, allowing Bob to optionally come to an agreement with Alice&lt;br/&gt;&amp;gt; about how to spend the funds before Bob can spend them unilaterally&lt;br/&gt;&amp;gt; (as we&amp;#39;ll see in a moment). For example, the script might be[3]:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; pk(B) &amp;amp;&amp;amp; (older(1 day) || pk(A))&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Collaboratively withdraw: as seen above, Bob has the ability to come&lt;br/&gt;&amp;gt; to a trustless agreement with Alice about how to spend his funds.&lt;br/&gt;&amp;gt; They can use that ability to allow Bob to trade his (unpublished) UTXO&lt;br/&gt;&amp;gt; for a UTXO that Alice funds and broadcasts. For example:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Alice creates an unsigned PSBT that uses as one of its inputs the&lt;br/&gt;&amp;gt; connector from Bob&amp;#39;s deposit transaction. This will ensure that&lt;br/&gt;&amp;gt; any attempt by Bob to double-spend his deposit transaction will&lt;br/&gt;&amp;gt; invalidate this withdrawal transaction, preventing Bob from being&lt;br/&gt;&amp;gt; able to steal any of Alice&amp;#39;s funds.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Also included in Alice&amp;#39;s unsigned PSBT is another connector&lt;br/&gt;&amp;gt; output plus the output that pays Bob his 1 BTC.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Bob receives Alice&amp;#39;s unsigned PSBT and creates a separate PSBT&lt;br/&gt;&amp;gt; that includes his unpublished UTXO as an input, giving its value&lt;br/&gt;&amp;gt; to Alice in an output. The PSBT also includes as an input the&lt;br/&gt;&amp;gt; connector output from Alice&amp;#39;s PSBT. This will ensure that any&lt;br/&gt;&amp;gt; attempt by Alice to double spend her transaction paying him will&lt;br/&gt;&amp;gt; invalidate his transaction paying her.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Bob signs his PSBT and gives it to Alice. After verifying it,&lt;br/&gt;&amp;gt; Alice signs her PSBT and broadcasts it.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Collaboratively trade commitments: as mentioned, the commitment&lt;br/&gt;&amp;gt; output that pays Bob may be claimed instead by Alice after 4 weeks, so&lt;br/&gt;&amp;gt; Bob will need to either withdraw or obtain a new commitment within&lt;br/&gt;&amp;gt; that&lt;br/&gt;&amp;gt; time. To trade his existing commitment for a new commitment looks&lt;br/&gt;&amp;gt; similar to the collaborative withdrawal procedure but without the&lt;br/&gt;&amp;gt; creation of an immediately-spendable onchain output:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Alice creates an unsigned PSBT that uses as one of its inputs the&lt;br/&gt;&amp;gt; connector from Bob&amp;#39;s deposit transaction, again preventing double&lt;br/&gt;&amp;gt; spending by Bob. Alice also includes a new connector and a new&lt;br/&gt;&amp;gt; commitment that again allows Bob to later claim 1 BTC.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Bob receives Alice&amp;#39;s PSBT and creates a PSBT transferring his&lt;br/&gt;&amp;gt; existing commitment to her, with the new connector again being&lt;br/&gt;&amp;gt; included as an input to ensure atomicity.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Bob signs; Alice signs and broadcasts.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Make an unconditioned payment: using the mechanisms described above,&lt;br/&gt;&amp;gt; it&amp;#39;s possible to make either an onchain payment or an offchain&lt;br/&gt;&amp;gt; payment---just have Carol receive the new output or commitment rather&lt;br/&gt;&amp;gt; than Bob. That payment would have no conditions (except its&lt;br/&gt;&amp;gt; atomicity).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Make a conditional payment: imagine that Carol knows a secret (e.g.&lt;br/&gt;&amp;gt; a preimage) that Bob is willing to pay for.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Alice creates an unsigned PSBT depending on the connector from&lt;br/&gt;&amp;gt; Bob&amp;#39;s deposit transaction and creating a new connector. The PSBT&lt;br/&gt;&amp;gt; includes an output paying Carol (either onchain or via a&lt;br/&gt;&amp;gt; commitment) with an HTLC, allowing Carol to claim the funds if&lt;br/&gt;&amp;gt; she&lt;br/&gt;&amp;gt; reveals the secret or allowing Bob to claim the funds after a&lt;br/&gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Bob receives Alice&amp;#39;s PSBT and creates a PSBT transferring his&lt;br/&gt;&amp;gt; existing commitment to her with the HTLC condition attached and,&lt;br/&gt;&amp;gt; again, with connectors being used to ensure atomicity.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Bob signs; Alice signs and broadcasts.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Carol can settle her HTLC by either revealing the secret onchain&lt;br/&gt;&amp;gt; or by trading her commitment containing the HTLC clause for a&lt;br/&gt;&amp;gt; commitment from Alice that doesn&amp;#39;t contain the clause (which&lt;br/&gt;&amp;gt; Alice will only accept by learning the secret, since Alice has&lt;br/&gt;&amp;gt; to settle with Bob). Alice can then either settle onchain or&lt;br/&gt;&amp;gt; trade commitments with Bob after giving him the secret.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Do nothing for 4 weeks: if Bob does nothing for four weeks, Alice&lt;br/&gt;&amp;gt; can claim the funds from the commitment output (i.e., takes his&lt;br/&gt;&amp;gt; money).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; If Bob did actually do something, and if every other user who also&lt;br/&gt;&amp;gt; had an unpublished output in the commitment transaction did&lt;br/&gt;&amp;gt; something, then they all exchanged their portion of the funds in&lt;br/&gt;&amp;gt; this output to Alice, so Alice can now claim all of those funds&lt;br/&gt;&amp;gt; onchain in a highly efficient manner.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Regarding the connector outputs, although all of the examples above show&lt;br/&gt;&amp;gt; Alice directly spending from the connector output in Bob&amp;#39;s deposit&lt;br/&gt;&amp;gt; transaction, atomicity is also ensured if Alice spends from any output&lt;br/&gt;&amp;gt; descended from Bob&amp;#39;s connector output. Connector outputs from different&lt;br/&gt;&amp;gt; deposits can be used as inputs into the same transaction, merging their&lt;br/&gt;&amp;gt; histories. This allows all operations made by Alice to be fully atomic,&lt;br/&gt;&amp;gt; ensuring that she doesn&amp;#39;t lose any money during a reorg of any length.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Users are not so well protected during reorgs, e.g. if Bob double-spends&lt;br/&gt;&amp;gt; a transaction whose funds were later used in a payment to Carol, then&lt;br/&gt;&amp;gt; Carol loses the money. For this reason, Alice will probably want to&lt;br/&gt;&amp;gt; prove to users that no funds they receive in a payment derive from any&lt;br/&gt;&amp;gt; deposit less than safe_confirmation_depth blocks.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; [1] &lt;a href=&#34;https://twitter.com/roasbeef/status/1661266771784126464&#34;&gt;https://twitter.com/roasbeef/status/1661266771784126464&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; [2]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2023-May/021710.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2023-May/021710.html&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; [3]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://min.sc/#c=pk(B)&#34;&gt;https://min.sc/#c=pk(B)&lt;/a&gt; %26%26 (older(1 day) || pk(A))
    </content>
    <updated>2023-06-08T01:21:56&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfxycmpctxsx7nrdljcx27ns0dz467nshh9ezpgxesc4jah8t5xjszyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpw6cw8hm</id>
    
      <title type="html">📅 Original date posted:2022-09-11 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfxycmpctxsx7nrdljcx27ns0dz467nshh9ezpgxesc4jah8t5xjszyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpw6cw8hm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqwyhnt3hwg4q60k4n6fnqkc9g5qu7c9u5kx0sh9gmdp49646kascsxm3dc&#39;&gt;nevent1q…m3dc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-09-11&lt;br/&gt;📝 Original message:Hi Michael.&lt;br/&gt;&lt;br/&gt;I read the transcript of the Socratic and I have to say that it is quite detailed and touches a lot of problems including the well-known theft/offline problems which also has forms elsewhere such as for passwords.&lt;br/&gt;&lt;br/&gt;My question is, do you or anyone else in the Socratic know of any research to this that&amp;#39;s don&amp;#39;t involve a trade-off of theft or online connectivity?&lt;br/&gt;&lt;br/&gt;ROAST and Liquid is perhaps the farthest I know of that addresses this problem, but it&amp;#39;s using centralized nodes right now. I was thinking, maybe these federated nodes can be decentralized into a few of these &amp;#34;lite nodes&amp;#34; managed by each service wanting a payment, that make a threshold signature out of many subscribers paying at the same time.&lt;br/&gt;&lt;br/&gt;- Ali&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/20220911/5966df87/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220911/5966df87/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:13:19&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstazfz8dz062xfml3yjglahuqjhntskql4rjrlzdvu9f33lp47g8czyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpw7qya6m</id>
    
      <title type="html">📅 Original date posted:2022-08-16 📝 Original message:(Note: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstazfz8dz062xfml3yjglahuqjhntskql4rjrlzdvu9f33lp47g8czyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpw7qya6m" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyy5xppp3n24qpcej3nhwyzl2m5knmcprqhsd5l08r9462upye5sgmwjv43&#39;&gt;nevent1q…jv43&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-08-16&lt;br/&gt;📝 Original message:(Note: I&amp;#39;m going to stick with this thread for all proposals for BIP322 polishing, not just delegation - unless the subject matter changes radically as other people discuss it.)&lt;br/&gt;&lt;br/&gt;Instead of the admittingly complicated scheme using transactions, I&amp;#39;ve created one that utilizes multisig to make the possible delegatees known at signing time. I had a discussion with vjudeu, garlonicon, and aliashraf about this over the past week or so, and while we did not reach a consensus about the solution to use, I feel that this scheme requires the least amount of modifications to BIP322 draft.&lt;br/&gt;&lt;br/&gt;The problem being solved is how to delegate signatures to other scriptPubKeys* [sic] for privacy purposes.&lt;br/&gt;&lt;br/&gt;*Here, I use P2WPKH addresses, under the assumption that the delegatees are people. If the delegatees are just some automated scripts or processes [as was mentioned in the BIP], then this scheme is equally valid with P2WSH multisignatures with appropriately constructed scriptPubKeys.&lt;br/&gt;&lt;br/&gt;What&amp;#39;s about to follow was copied almost word-for-word from my forum post with extraneous paragraphs removed:&lt;br/&gt;&lt;br/&gt;---&lt;br/&gt;&lt;br/&gt;It is extremely simple and doesn&amp;#39;t require any additional transactions:&lt;br/&gt;&lt;br/&gt;- Replace the message challenge of &amp;#34;to_spend&amp;#34; with a 1-of-N standard P2WPKH multisig. N is the number of people you want to be able to create the signature, and their respective pubkeys are included in the script.&lt;br/&gt;-- In this way the possible delegatees are fixed at signature creation time and cannot be extended by creating more transactions.&lt;br/&gt;- Replace the challenge solution in &amp;#34;to_sign&amp;#34; (it&amp;#39;s the input that spends the output we made in &amp;#34;to_spend&amp;#34;) with a witness stack containing: n &amp;lt;pub1&amp;gt; &amp;lt;pub2&amp;gt; ... &amp;lt;pubn&amp;gt; 1 &amp;lt;a-signature&amp;gt; 0&lt;br/&gt;-- The signature is generated as if it were for a real P2WPKH-multisig transaction. [the zero at the end is due to a bug in OP_CHECKMULTISIG that pops an extra element].&lt;br/&gt;&lt;br/&gt;appendix - don&amp;#39;t mix up this delegation and Full with UTXOs together - it increases the numebr of permutations that implementations have to verify.&lt;br/&gt;&lt;br/&gt;Pros:&lt;br/&gt;&lt;br/&gt;- No recursive transactions.&lt;br/&gt;- If Alice and Bob are the two delegates of a signature (and one of them sign it), Carol does not know any of the private keys or challenge solutions and thus cannot claim the script was signed by her [besides the public keys of Alice and Bob are already in the signature]. Required, to avoid signature fraud.&lt;br/&gt;- The Address field is not used when delegating, so the engine can actually print which (compressed) public key it is signed against - i.e. the address verification is provable, as opposed to reactive Legacy signatures.&lt;br/&gt;-- Additionally, they will all be Segwit Bech32 addresses so it can just derive and print the corresponding bc1 address instead.&lt;br/&gt;- There is no opcode or new algorithm introduced, so no soft-fork is required.&lt;br/&gt;&lt;br/&gt;Cons:&lt;br/&gt;&lt;br/&gt;- Everyone knows the public keys of the delegators, so there is no privacy [then again, in light of the signature fraud problem, this is possibly a non-issue].&lt;br/&gt;&lt;br/&gt;---&lt;br/&gt;&lt;br/&gt;I&amp;#39;d like to hear everyone&amp;#39;s opinions about this.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t know who suggested the idea of delegation in the first place, but CCing luke-jr because he participated in that Github discussion, so his opinion about this scheme will clarify a lot of things about this problem.&lt;br/&gt;&lt;br/&gt;- Ali
    </content>
    <updated>2023-06-08T01:12:41&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgjk9q9z0kdv0rmt2ev0hjk0p0axmaxvp085qsak282xgxzuuppaqzyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwu0pfan</id>
    
      <title type="html">📅 Original date posted:2022-08-19 📝 Original message:Since ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgjk9q9z0kdv0rmt2ev0hjk0p0axmaxvp085qsak282xgxzuuppaqzyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwu0pfan" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstazfz8dz062xfml3yjglahuqjhntskql4rjrlzdvu9f33lp47g8cl8f006&#39;&gt;nevent1q…f006&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-08-19&lt;br/&gt;📝 Original message:Since I mailed the original scheme, some people have suggested to me that this delegation scheme can be written in TapScript, to avoid revealing the unspent public keys. I think that is a good idea.&lt;br/&gt;&lt;br/&gt;Here is a very helpful slideshow about implementing Multisig scripts in Taproot by Jimmy Song[1] - specifically, I have looked into &amp;#34;Single leaf k-of-n multisig&amp;#34; and &amp;#34;Multi-leaf k-of-k multisig&amp;#34;. I have not considered the approach with MuSig, considering there is not even a BIP for that.&lt;br/&gt;&lt;br/&gt;To my understanding, Single leaf k-of-n multisig is functionally identical to &amp;#34;Using a single OP_CHECKSIGADD-based script&amp;#34; described in BIP 0342, footnote 5, which itself has nearly all of the properties of the original CHECKMULTISIG opcode[2]. In other words, it won&amp;#39;t hide the non-signing public keys (the TapScript is literally &amp;#34;&amp;lt;PubKey 1&amp;gt; OP_CHECKSIG ... &amp;lt;PubKey N&amp;gt; OP_CHECKSIGADD OP_&amp;lt;N&amp;gt; OP_NUMEQUAL&amp;#34;, so it doesn&amp;#39;t solve the privacy problem.&lt;br/&gt;&lt;br/&gt;That leaves Multi-leaf k-of-k multisig. Now to my understanding, in every TapLeaf/Branch, there is going to be a K-of-K TapScript similar to the one constructed above. In each leaf there will be a combination of K public keys, so the number of leaves is going to be equal to nCr(n,k).&lt;br/&gt;&lt;br/&gt;No wonder why BIP 342 says that it&amp;#39;s only cost-effective for small values of k, because the number of leaves and thus the transaction size swells as k increases.&lt;br/&gt;&lt;br/&gt;Fortuantely, for the purposes of delegation, K will always be 1, because we only utilize 1-n multisig signatures as per my previous message. Thus the fee rate will be economical for all values of N i.e. number of delegatees. This enables this scheme to have a wider use case than just BIP322 (even here though, decreasing the raw transaction size of &amp;#39;to_sign&amp;#39; is a net positive for space reasons).&lt;br/&gt;&lt;br/&gt;In other words, every TapScript is just &amp;lt;PubKey&amp;gt; OP_CHECKSIG OP_1 OP_NUMEQUAL, which can be simplified to just &amp;lt;PubKey&amp;gt; OP_CHECKSIG since OP_CHECKSIG failure in a TapScript returns the empty vector (false) on failure, and 1 (true) on success. I wrote the longer script merely because it&amp;#39;s consistent with the script format in [2], but since it&amp;#39;s by no means a standardness requirement, we can save 2*N bytes in the entire transaction.&lt;br/&gt;&lt;br/&gt;So, for small numbers of delegates, these savings are not very eye-watering, but if fees become larger then every byte will matter. After all, I envision uses for delegation beyond BIP 322 anyway.&lt;br/&gt;&lt;br/&gt;At this point, the witness stack of &amp;#39;to_sign&amp;#39; will have one of these TapScripts, and an appropriately constructed BIP 341 control block. Obviously &amp;#39;to_spend&amp;#39;&amp;#39;s output scriptPubKey will push the SHA256 hash of the witness program.&lt;br/&gt;&lt;br/&gt;Use cases:&lt;br/&gt;- BIP 322 (obviously)&lt;br/&gt;- Any L2 protocol where participants&amp;#39; funds must be delegated to a comittee e.g. LN channels - which, in fact, are still using OP_CHECKMULTISIG.&lt;br/&gt;-- Where such a protocol requires the joint consensus of all participants, such as an LN channel closing gracefully, K can be modified appropriately, but this is beyond the scope of this scheme. Make a BOLT or the appropriate standard proposal if this affects your L2 network.&lt;br/&gt;&lt;br/&gt;Advantages where they are relevant for BIP 322 :&lt;br/&gt;&lt;br/&gt;- Signature fraud is still impossible to carry out (the entire to_sign transaction still has to be verified, but now Address can be empty since the public key is in the control block which is in the &amp;#39;to_sign&amp;#39; witness, and the spent TapScript is also in the &amp;#39;to_sign&amp;#39; witness).&lt;br/&gt;- Delegated signers still use standard address type (Bech32m Taproot addresses).&lt;br/&gt;- No new opcodes are introduced, and no existing ones are redefined so no soft-forks are necessary.&lt;br/&gt;&lt;br/&gt;Advantages for all applications of this BIP :&lt;br/&gt;&lt;br/&gt;- Only the delegatee who actually signs the message has a revealed public key, the others&amp;#39; are hidden - a major privacy advantage.&lt;br/&gt;- Signers must be determined beforehand. Jimmy Song actually lists this as a disadvantage, but I disagree. For L2 delegation, it is necessary to know the other parties to avoid a MITM attack where one of the signers is replaced by a rogue signer - through non-cryptographic methods of course (e.g. a computer hack).&lt;br/&gt;&lt;br/&gt;Disadvantages :&lt;br/&gt;&lt;br/&gt;- Taproot is not widely deployed in applications yet?&lt;br/&gt;- I can&amp;#39;t think of any others, unless you consider the signer&amp;#39;s public key being revealed a disadvantage [I wouldn&amp;#39;t, because if it were hidden, it would defeat the whole purpose of signing by making it vulnerable to the aforementioned &amp;#34;signature fraud&amp;#34;].&lt;br/&gt;&lt;br/&gt;My grasp on Taproot constructs is not 100%. So feel free to point out any errors in my reasoning for this scheme if you spot any.&lt;br/&gt;&lt;br/&gt;- Ali&lt;br/&gt;&lt;br/&gt;[1] - &lt;a href=&#34;https://jimmysong.github.io/taproot-multisig&#34;&gt;https://jimmysong.github.io/taproot-multisig&lt;/a&gt;&lt;br/&gt;[2] - &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0342.mediawiki#cite_ref-5-0&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0342.mediawiki#cite_ref-5-0&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;On Tue Aug 16 04:38:47 UTC 2022, ali at notatether.com wrote:&lt;br/&gt;&amp;gt;(Note: I&amp;#39;m going to stick with this thread for all proposals for BIP322 polishing, not just delegation - unless the subject matter changes radically as other people discuss it.)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;Instead of the admittingly complicated scheme using transactions, I&amp;#39;ve created one that utilizes multisig to make the possible delegatees known at signing time. I had a discussion with vjudeu, garlonicon, and aliashraf about this over the past week or so, and while we did not reach a consensus about the solution to use, I feel that this scheme requires the least amount of modifications to BIP322 draft.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;The problem being solved is how to delegate signatures to other scriptPubKeys* [sic] for privacy purposes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;*Here, I use P2WPKH addresses, under the assumption that the delegatees are people. If the delegatees are just some automated scripts or processes [as was mentioned in the BIP], then this scheme is equally valid with P2WSH multisignatures with appropriately constructed scriptPubKeys.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;What&amp;#39;s about to follow was copied almost word-for-word from my forum post with extraneous paragraphs removed:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;---&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;It is extremely simple and doesn&amp;#39;t require any additional transactions:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;- Replace the message challenge of &amp;#34;to_spend&amp;#34; with a 1-of-N standard P2WPKH multisig. N is the number of people you want to be able to create the signature, and their respective pubkeys are included in the script.&lt;br/&gt;&amp;gt;-- In this way the possible delegatees are fixed at signature creation time and cannot be extended by creating more transactions.&lt;br/&gt;&amp;gt;- Replace the challenge solution in &amp;#34;to_sign&amp;#34; (it&amp;#39;s the input that spends the output we made in &amp;#34;to_spend&amp;#34;) with a witness stack containing: n &amp;lt;pub1&amp;gt; &amp;lt;pub2&amp;gt; ... &amp;lt;pubn&amp;gt; 1 &amp;lt;a-signature&amp;gt; 0&lt;br/&gt;&amp;gt;-- The signature is generated as if it were for a real P2WPKH-multisig transaction. [the zero at the end is due to a bug in OP_CHECKMULTISIG that pops an extra element].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;appendix - don&amp;#39;t mix up this delegation and Full with UTXOs together - it increases the numebr of permutations that implementations have to verify.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;Pros:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;- No recursive transactions.&lt;br/&gt;&amp;gt;- If Alice and Bob are the two delegates of a signature (and one of them sign it), Carol does not know any of the private keys or challenge solutions and thus cannot claim the script was signed by her [besides the public keys of Alice and Bob are already in the signature]. Required, to avoid signature fraud.&lt;br/&gt;&amp;gt;- The Address field is not used when delegating, so the engine can actually print which (compressed) public key it is signed against - i.e. the address verification is provable, as opposed to reactive Legacy signatures.&lt;br/&gt;&amp;gt;-- Additionally, they will all be Segwit Bech32 addresses so it can just derive and print the corresponding bc1 address instead.&lt;br/&gt;&amp;gt;- There is no opcode or new algorithm introduced, so no soft-fork is required.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;Cons:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;- Everyone knows the public keys of the delegators, so there is no privacy [then again, in light of the signature fraud problem, this is possibly a non-issue].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;---&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;I&amp;#39;d like to hear everyone&amp;#39;s opinions about this.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;I don&amp;#39;t know who suggested the idea of delegation in the first place, but CCing luke-jr because he participated in that Github discussion, so his opinion about this scheme will clarify a lot of things about this problem.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;- Ali
    </content>
    <updated>2023-06-08T01:12:41&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsyy5xppp3n24qpcej3nhwyzl2m5knmcprqhsd5l08r9462upye5sgzyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwt46cxt</id>
    
      <title type="html">📅 Original date posted:2022-08-14 📝 Original message:[A ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsyy5xppp3n24qpcej3nhwyzl2m5knmcprqhsd5l08r9462upye5sgzyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwt46cxt" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfflu6rvmfuwv38rgsk487jyx38mj0nyqnf569cwpy8ljj6m56vesrktlm8&#39;&gt;nevent1q…tlm8&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-08-14&lt;br/&gt;📝 Original message:[A similar message was posted in the Bitcointalk BIP322 thread.]&lt;br/&gt;&lt;br/&gt;OK, I just figured out how to solve the delegation problem. It builds on Jeremy Rubin&amp;#39;s transaction delegation post which I linked to a few days ago.&lt;br/&gt;&lt;br/&gt;In BIP322, there is a [planned] provision for some person to delegate signing to another person. That means the second person can do all the signing stuff that the first person could do, and the signature is as if the first person signed it.&lt;br/&gt;&lt;br/&gt;What this could be useful for?&lt;br/&gt;&lt;br/&gt;- L2/Lightning Network, a channel is just 2-of-2 multisig, so a prospective channel co-creator &amp;#34;delegate&amp;#34; signing to the channel itself, by signing a UTXO inside the multisig - signing along with the other party, creating a dummy output (see below), which can be signed to prove liquidity on behalf of the channel, while keeping the channel itself anonymous.&lt;br/&gt;- CoinJoin, To prove that some CoinJoin coordinator is liquid without violating its anonymity by revealing public keys, the person managing the CoinJoins delegates signing from all UTXOs to be used in the CJ, at once, delegating signing to another dummy output.&lt;br/&gt;- By the same token, Mixers can prove their liquidity without revealing their UTXO set.&lt;br/&gt;- Silent Payments, where the public key is not even known in the first place, the address of a silent payment can delegate signing to another dummy output which only the sender and receiver know about.&lt;br/&gt;&lt;br/&gt;So how does this delegation work? It&amp;#39;s very simple:&lt;br/&gt;&lt;br/&gt;1. All UTXOs that want to delegate signing to a different party must sign a preliminary transaction of this format:&lt;br/&gt;- All input/output amounts are zero.&lt;br/&gt;- input 1 is an invalid input of the kind in BIP322&lt;br/&gt;- the rest of the inputs are the UTXOs wanting to delegate signing to a different party, with valid signatures/witness stacks.&lt;br/&gt;- there is only one output, and it is a P2WSH output with the following script:&lt;br/&gt;OP_PUSH &amp;lt;hash-of-address-hash&amp;gt; OP_SWAP OP_HASH160 OP_EQUALVERIFY&lt;br/&gt;- And the witness stack that will &amp;#34;spend&amp;#34; the transaction in the &amp;#34;to_spend&amp;#34; tx is simply:&lt;br/&gt;&amp;lt;address-hash&amp;gt;&lt;br/&gt;- Likewise, the &amp;#34;to_spend&amp;#34; tx has only one input, refering to the txid of the delegating transaction with output point 0 i.e. the UTXO &amp;lt;delegation-txid&amp;gt;:0. Outputs of &amp;#34;to_spend&amp;#34; remain the same.&lt;br/&gt;-- Contrary to the use of Hash160, we are NOT hashing a public key or script. We are hashing an address hash, implying that we are using addresses.&lt;br/&gt;&lt;br/&gt;Do you know why I said &amp;#34;delegating to a different party&amp;#34;? Because it could be a functionally different entity, just like how CEO is diffferent from LLC company even if it has only 1 employee. The &amp;#34;address&amp;#34; here represents a kind of company &amp;lt;but is not a smart contract&amp;gt; - it can represent a channel, it can represent a coinjoin, it can represent a silent payment. The channel/CJ/etc. only has to hash the decoded RIPEMD160 of an address, with another SHA256-RIPEMD160, to make an &amp;#34;address&amp;#34; that can be used to sign messages from.&lt;br/&gt;&lt;br/&gt;This &amp;#34;address&amp;#34; aka. LLC company can even be encoded with Bech32 to make it look like a real address - obviously don&amp;#39;t send any funds directly to that address because they will be lost - and in fact, it *should* be Bech32-encoded when transmitting the Signed Message.&lt;br/&gt;&lt;br/&gt;A signed message has these three parts:&lt;br/&gt;&lt;br/&gt;Message&lt;br/&gt;Address&lt;br/&gt;Signature&lt;br/&gt;&lt;br/&gt;BIP322 specifies the signature is just the raw transaction format of &amp;#34;to_sign&amp;#34;. Normally, the address would simply be the address you are signing from, but in the case of delegation, it is desireable for the original addresses to remain anonymous. So since an address must be filled in somewhere, the Bech32 &amp;#34;hash-of-address-hash&amp;#34; created above can be used as a P2WSH address.&lt;br/&gt;&lt;br/&gt;Advantages of this scheme:&lt;br/&gt;&lt;br/&gt;- The real addresses/UTXOs signing the transaction are only known to each other and whoever is managing the &amp;#34;to_delegate&amp;#34; transaction.&lt;br/&gt;- Only the real signers and the person who is in charge of the P2WSH output can sign the &amp;#34;to_delegate&amp;#34; output and thus sign a message from it (note that they could be the same person).&lt;br/&gt;- There can be an arbitrary number of delegations before the transaction is actually signed (the new person who is in charge of signing, i.e. has the P2WSH output of the &amp;#34;to_delegate&amp;#34; transaction can simply generate another address hash, and delegate to that &amp;#34;address&amp;#34; in another transaction, giving some other person that &amp;#34;address&amp;#34; if they want to)&lt;br/&gt;- Delegated signatures can wrap Full and Full with UTXOs signing formats, so Light clients do not have to directly support those two formats, either for complexity reasons, or because they have no UTXO set.&lt;br/&gt;- And crucially: **There is no on-chain transaction, so the delegation is private and cannot be traced back by the public**.&lt;br/&gt;&lt;br/&gt;And there are virtually no disadvantages to this.&lt;br/&gt;&lt;br/&gt;I should emphasize that you don&amp;#39;t delegate signing to another person, you delegate signing to another party that may just be comprised by one person. I say this because the delegation does not make any new on-chain UTXOs that someone could posess, but it simply creates a hash160 of some address hash that was generated by the delegators, and the hash-of-address-hash does not necessarily have to represent a person, it can also represent a service.&lt;br/&gt;&lt;br/&gt;FAQ:&lt;br/&gt;&lt;br/&gt;Q: Does this utilize the Full format?&lt;br/&gt;A: Yes.&lt;br/&gt;&lt;br/&gt;Q: How to represent the delegation in a signed transaction?&lt;br/&gt;A: Just encode the hash-of-address-hash in Bech32 version 0 and put it in the Address field.&lt;br/&gt;&lt;br/&gt;Q: If the delegation is private, then how can the address-hash be known and the transaction signed?&lt;br/&gt;A: The UTXO signers take a random address associated with them &amp;lt;could be one of their own address, could be the address of a multisig that is being used elsewhere etc.&amp;gt; and then make the hash160 of that address. Whoever they give this to, can sign a BIP322 transaction.&lt;br/&gt;&lt;br/&gt;Q: How can the public verify a delegated BIP322 transaction if the address-hash is private?&lt;br/&gt;A: The hash-of-address-hash is revealed in the Address, not in the Signature. BIP322 states that the signature only contains the &amp;#34;to_sign&amp;#34; transaction, which does not contain the witness stack of &amp;#34;to_spend&amp;#34; that has the hash-of-address-hash (because THAT was already spent in &amp;#34;to_spend&amp;#34;) therefore the address hash is Bech32 (version 0) encoded and can be decoded to re-construct &amp;#34;to_spend&amp;#34; transaction and from there &amp;#34;to_sign&amp;#34;.&lt;br/&gt;&lt;br/&gt;Q: How to differentiate between non-delegated and delegated signatures?&lt;br/&gt;A: You can&amp;#39;t. But then again, BIP322 doesn&amp;#39;t differentiate between &amp;#34;message signatures from an address&amp;#34; and a signature from a set of UTXOs so it wouldn&amp;#39;t be able to identify a delegated transaction anyway.&lt;br/&gt;Rather, a full-blown verification software should present a list-box or a set of radio buttons, that toggles between &amp;#34;Legacy&amp;#34;, &amp;#34;Simple&amp;#34;, &amp;#34;Full&amp;#34;, &amp;#34;Full with UTXOs&amp;#34; and &amp;#34;Full with Delegation&amp;#34; - Each of these controls the content in the Address field - this would already be required to support validating Legacy signatures anyway, which are otherwise incompatible with the transaction-based signing (and this is the workaround BIP322 specifies to support that).&lt;br/&gt;&lt;br/&gt;Q: What if the verifier does not have a UTXO set (light clients)?&lt;br/&gt;A: Then present three toggles or radio buttons: &amp;#34;Legacy&amp;#34;, &amp;#34;Simple&amp;#34;, and &amp;#34;Delegated&amp;#34; - each of these options only require a single encoded address to be specified in the field, and Full, and Full With UTXOs signatures can be wrapped with a delegation to support a single address. Consequentially, these control how the signed transaction is [re]constructed for sign/verify.&lt;br/&gt;&lt;br/&gt;CC&amp;#39;ing Kalle as he might be interested in this.&lt;br/&gt;&lt;br/&gt;- Ali
    </content>
    <updated>2023-06-08T01:12:40&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgkt4zddrj2pc8e0rrqnsxvzajn46yul7w52723rz7ldv9q3ur0hczyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwg2jju0</id>
    
      <title type="html">📅 Original date posted:2022-08-10 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgkt4zddrj2pc8e0rrqnsxvzajn46yul7w52723rz7ldv9q3ur0hczyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwg2jju0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswqlnxnyuwggsxwqg67wptpgceaja9y6u9yms3y5ck69ydcusk50qt6ckat&#39;&gt;nevent1q…ckat&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-08-10&lt;br/&gt;📝 Original message:&amp;gt; Backward compatibility. If we don&amp;#39;t have OP_CHECKDATASIG, then it has to be somehow introduced to make it compatible with &amp;#34;Bitcoin Message&amp;#34;.&lt;br/&gt;&lt;br/&gt;I suppose in the case of legacy P2PKH signing, a hypothetical OP_CHECKDATASIG can take &amp;lt;signature&amp;gt; &amp;lt;pubkeyhash&amp;gt; off the stack and perform an ECDSA public key recovery, followed by SHA256/RIPEMD160, kind of like a hybrid between OP_DUP/OP_HASH160/OP_EQUALVERIFY and OP_CHECKSIG.&lt;br/&gt;&lt;br/&gt;But the implementations would have to decode the Base58 address into &amp;#34;0x00&amp;#34; plus the address hash. As the only supported invoice type for the Legacy signing methods, this should be straight forward to do.&lt;br/&gt;&lt;br/&gt;&amp;gt; And we have opcodes like OP_RESERVED, that can be wrapped in OP_IF, then it is &amp;#34;conditionally valid transaction&amp;#34;.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not sure how an OP_RESERVED in an unexcuted OP_IF is going to help implement an ECDSA pubkey recovery &#43; DUP/HASH160/EQUALVERIFY hybrid instruction.&lt;br/&gt;&lt;br/&gt;- Ali&lt;br/&gt;&lt;br/&gt;On Wed, 10 Aug 2022 04:59:46 &#43;0200, vjudeu at gazeta.pl wrote:&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;m not sure what is to be gained from adding an opcode&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Backward compatibility. If we don&amp;#39;t have OP_CHECKDATASIG, then it has to be somehow introduced to make it compatible with &amp;#34;Bitcoin Message&amp;#34;. And we have opcodes like OP_RESERVED, that can be wrapped in OP_IF, then it is &amp;#34;conditionally valid transaction&amp;#34;. It is also possible to assign some unused opcode, but then it will be more complex, because in Script, those opcodes make transaction invalid, but inside TapScript, those opcodes are defined as OP_SUCCESS, and make things automatically valid.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On 2022-08-09 22:53:34 user Ali Sherief via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; Although there is a Github issue/PR at &lt;a href=&#34;https://github.com/bitcoin/bips/pull/1347&#34;&gt;https://github.com/bitcoin/bips/pull/1347&lt;/a&gt; for addressing all the TODO items of BIP322, I decided to throw it in the mailing list again to see if anyone else has suggestions for dealing with them.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So in an older copy of the draft at &lt;a href=&#34;https://github.com/bitcoin/bips/blob/b6b0126e2d04793ba52a40f05d24538fa3f2c9ad/bip-0322.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/b6b0126e2d04793ba52a40f05d24538fa3f2c9ad/bip-0322.mediawiki&lt;/a&gt; , I found the some TODO items, and I will copy-paste the ones in the Specification section (for full proofs) here:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; TODO: How does this interact with as-of-yet-unspecified &amp;#34;Silent Transactions&amp;#34;?&lt;br/&gt;&amp;gt; &amp;gt; TODO: Some invalid opcode to allow only in various proof types?&lt;br/&gt;&amp;gt; &amp;gt; TODO: A way for the initial signer to delegate to another scriptPubKey; needed for better privacy and CoinJoin/Lightning compatibility&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So to start with, I believe it will be very helpful to limit what opcodes scriptPubKeys to be elligible to sign from them. The specification already does so to a point, but in order for these to be recognizable, it&amp;#39;s my opinion that one of the NOPs should be placed at the beginning of the script to activate proof parsing mode.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, an opcode is not necessary at all, if the program is able to infer from context where the proof is coming from. After all, since they cannot be broadcasted, they can&amp;#39;t be mined in blocks, so will never be encountered in a full node&amp;#39;s usual verifier. I&amp;#39;m not sure what is to be gained from adding an opcode - the only source for real transactions is from P2P-obtained blocks, so when a human inputs a signature to be verified, it can check that a real transaction is not being inserted by looking for the invalid input.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For Silent Transactions, I have already given my suggestion in the PR, that some subsection can be made saying that it can operate with them by using its scriptPubKey (and other stuff that may be necessary - I am not excatly sure what goes inside the Witness stack of message_signature).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the case of the last TODO, related to delegation to another scriptPubKey, I am not quite sure at the moment what to do about it - perhaps you guys can place a MAST (two Merkle branches, to be specific) - the first branch has the original signer&amp;#39;s scriptPubKey, the second branch contains the delegated signer&amp;#39;s scriptPubKey.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - Ali
    </content>
    <updated>2023-06-08T01:12:37&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszc7n83vsl2e0050a8fr7paa3ha3klhe9u0tycf847jhhht4uj9egzyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwt3wnyp</id>
    
      <title type="html">📅 Original date posted:2022-08-05 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszc7n83vsl2e0050a8fr7paa3ha3klhe9u0tycf847jhhht4uj9egzyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwt3wnyp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2ffstnuwyrwx23fg9djpldps735ym2levtgknzg7gx3ttj0caahskghums&#39;&gt;nevent1q…hums&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-08-05&lt;br/&gt;📝 Original message:&amp;gt; IMO, there is no benefit to an additional message signing standard, especially&lt;br/&gt;&amp;gt; one that doesn&amp;#39;t address the problems with the current standard or (at&lt;br/&gt;&amp;gt; present) BIP322.&lt;br/&gt;&lt;br/&gt;In that case, I propose the following:&lt;br/&gt;&lt;br/&gt;- I scrap the Taproot/Schorr and the two extensions inside the BIP, which will leave it with only parts and formats which have already been standardized (effectively, the legacy and segwit addresses).&lt;br/&gt;&lt;br/&gt;Because here&amp;#39;s the thing: The reason why wallets are not implementing sign/verify correctly is because there is no reference manual for doing so. This informational BIP is supposed to solve that problem by providing only a list of instructions for computing ECSDA sign/verify correctly.&lt;br/&gt;&lt;br/&gt;Also, it is not visible right now, but there will also be a reference implementation so that wallet developers can actually code them correctly, as you&amp;#39;ve stated.&lt;br/&gt;&lt;br/&gt;- Ali&lt;br/&gt;&lt;br/&gt;On Fri, Aug 5, 2022 at 9:51 AM, Luke Dashjr &amp;lt;luke at dashjr.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Friday 05 August 2022 04:05:56 Ali Sherief wrote:&lt;br/&gt;&amp;gt;&amp;gt; Yeah, I have a specific reason to advance this first (emphasis on the word&lt;br/&gt;&amp;gt;&amp;gt; first).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I briefly mentioned in the BIP that BIP322 has superior message&lt;br/&gt;&amp;gt;&amp;gt; verification capabilities. This is true, but it suffers from the drawback&lt;br/&gt;&amp;gt;&amp;gt; that wallets are not using it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Likely because it is a draft and incomplete.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Message signatures are highly relied upon in some places (just to name a&lt;br/&gt;&amp;gt;&amp;gt; few, at many mining pools e.g. Slushpool, and the Bitcointalk forum),&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not aware of any using the current message signatures _correctly_.&lt;br/&gt;&amp;gt; Note they are not useful for proving that you sent a transaction, nor have the&lt;br/&gt;&amp;gt; ability to send a transaction or access to bitcoins.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This BIP is kind of like a &amp;#34;bumper car&amp;#34;, in that it forces compliance with&lt;br/&gt;&amp;gt;&amp;gt; previous BIPs that extend the message signing format, in particular BIP137.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; BIPs can&amp;#39;t force anything, they&amp;#39;re just documentation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; IMO, there is no benefit to an additional message signing standard, especially&lt;br/&gt;&amp;gt; one that doesn&amp;#39;t address the problems with the current standard or (at&lt;br/&gt;&amp;gt; present) BIP322.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Luke&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/20220805/bc680629/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220805/bc680629/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:12:30&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs22f5xt05cyt5fxvyk54996h2l9dcspruvzm8tankard2a7vewugszyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwue26ar</id>
    
      <title type="html">📅 Original date posted:2022-08-04 📝 Original message:Hi, I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs22f5xt05cyt5fxvyk54996h2l9dcspruvzm8tankard2a7vewugszyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwue26ar" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0krz3c3lmphruxenganpasm7nnyeq60rwztv8psmvzp23kchztnqlewvtq&#39;&gt;nevent1q…wvtq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-08-04&lt;br/&gt;📝 Original message:Hi,&lt;br/&gt;&lt;br/&gt;I have created a new BIP, called notatether-signedmessage. It can be viewed at &lt;a href=&#34;https://github.com/ZenulAbidin/bips/blob/master/bip-notatether-signedmessage.mediawiki&#34;&gt;https://github.com/ZenulAbidin/bips/blob/master/bip-notatether-signedmessage.mediawiki&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;For those who want a quick summary, it defines a step-by-step process for signing and verifying messages from legacy, native/nested segwit, and taproot addresses. It does not define a new signature format itself, except in the case of Taproot. For those addresses, I have defined a signature format that has 1 byte header/recID, 64 bytes signature, and 32 bytes x coordinate of a public key. This is required to run the BIP340 Schnorr verify algorithm using only the signature - and the header byte is added for backwards compatibility. Otherwise, it completely integrates BIP137 signatures.&lt;br/&gt;&lt;br/&gt;I am planning to move that format to its own BIP as soon as possible, in lieu that it is unacceptable to define formats in an Informational BIP.&lt;br/&gt;&lt;br/&gt;Please leave your comments in this mailing list. CC&amp;#39;ing BIP editors.&lt;br/&gt;&lt;br/&gt;- Ali
    </content>
    <updated>2023-06-08T01:12:29&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgqrzkmcyxwmzh3efxx2f5zxvqk4gdl9y73x9ffpwca83ffvluw3gzyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwpsa94e</id>
    
      <title type="html">📅 Original date posted:2022-08-05 📝 Original message:Yeah, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgqrzkmcyxwmzh3efxx2f5zxvqk4gdl9y73x9ffpwca83ffvluw3gzyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwpsa94e" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsg0yv93xwetfxh2hgdrwykhucyfpqwl94lzsmcwktdegcjssprx5c93dw2d&#39;&gt;nevent1q…dw2d&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-08-05&lt;br/&gt;📝 Original message:Yeah, I have a specific reason to advance this first (emphasis on the word first).&lt;br/&gt;&lt;br/&gt;I briefly mentioned in the BIP that BIP322 has superior message verification capabilities. This is true, but it suffers from the drawback that wallets are not using it. What they are using right now is a chaotic mixture of legacy address sign/verify and nonstandard segwit sign/verify. Attempting to enforce BIP322 on them in this stage will just create an N&#43;1 problem, so an effort has to be made first to transfer these N signing implementations to a common ground, with as little as possible developer effort - it takes much less time to code the point-by-point steps than designing a class for BIP322 signatures, since the teams behind these wallets have to *agree* on how to code such a change. This ultimately decides whether or not the wallets implement such features as BIP322 or this BIP. [this paragraph is the meat of the reasoning.]&lt;br/&gt;&lt;br/&gt;That is to say, BIP322 is more complex than this BIP (which in no way replaces BIP322), hence it requires a larger design effort on the part of wallet developers to implement. Considering that the vast majority of them already sign messages using the current format, it makes complete sense to make them all conform to this BIP first, then we finish BIP322, and then make wallets use that.&lt;br/&gt;&lt;br/&gt;Message signatures are highly relied upon in some places (just to name a few, at many mining pools e.g. Slushpool, and the Bitcointalk forum), and it is unreasonable to expect users to cling on to an old address format, or use a specific wallet (Electrum) that provides nonstandard signature verification (it does *not* follow BIP137 despite supporting segwit messages, so their signatures are non-portable).&lt;br/&gt;&lt;br/&gt;That is why it is necessary at the present moment to ensure as many wallets are possible are not only using the specification in my BIP to perform message signing and verification, but also implement, at a bare minimum, the legacy and segwit address parts. And the reason I did not mandate this requirement is the BIP is that wallets do not provide legacy addresses, then it makes no sense for them to add the sign/verify code for legacy addresses as well.&lt;br/&gt;&lt;br/&gt;This BIP is kind of like a &amp;#34;bumper car&amp;#34;, in that it forces compliance with previous BIPs that extend the message signing format, in particular BIP137. I admit that the Taproot signature format should not be located inside this BIP - I want to keep it strictly Informational, but rather, it should be contained in a newer Standards Track BIP that supersedes BIP137 - it&amp;#39;s only task is to define everything BIP137 already defines, and  also add the Taproot signing format.&lt;br/&gt;&lt;br/&gt;Like I said in the BIP, just making a proposal will not solve all these problems. It will only solve half of them, and the other half has to be solved by getting the other wallet implementations (Armory, Wasabi, BitcoinJ, Samourai, Mycelium, Electrum, and Trezor/Ledger among others) to implement this standard. It is not a difficult task but it&amp;#39;s a non-trivial one, and we ought to be at least half-way to the finish line by assigning a number to this.&lt;br/&gt;&lt;br/&gt;- Ali&lt;br/&gt;&lt;br/&gt;------- Original Message -------&lt;br/&gt;On Thursday, August 4th, 2022 at 10:26 PM, Luke Dashjr &amp;lt;luke at dashjr.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Any reason not to just help Kalle out with BIP 322?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bips/pull/1347&#34;&gt;https://github.com/bitcoin/bips/pull/1347&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Thursday 04 August 2022 12:18:56 Ali Sherief via bitcoin-dev wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Hi,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I have created a new BIP, called notatether-signedmessage. It can be viewed&lt;br/&gt;&amp;gt; &amp;gt; at&lt;br/&gt;&amp;gt; &amp;gt; &lt;a href=&#34;https://github.com/ZenulAbidin/bips/blob/master/bip-notatether-signedmessag&#34;&gt;https://github.com/ZenulAbidin/bips/blob/master/bip-notatether-signedmessag&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; e.mediawiki.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; For those who want a quick summary, it defines a step-by-step process for&lt;br/&gt;&amp;gt; &amp;gt; signing and verifying messages from legacy, native/nested segwit, and&lt;br/&gt;&amp;gt; &amp;gt; taproot addresses. It does not define a new signature format itself, except&lt;br/&gt;&amp;gt; &amp;gt; in the case of Taproot. For those addresses, I have defined a signature&lt;br/&gt;&amp;gt; &amp;gt; format that has 1 byte header/recID, 64 bytes signature, and 32 bytes x&lt;br/&gt;&amp;gt; &amp;gt; coordinate of a public key. This is required to run the BIP340 Schnorr&lt;br/&gt;&amp;gt; &amp;gt; verify algorithm using only the signature - and the header byte is added&lt;br/&gt;&amp;gt; &amp;gt; for backwards compatibility. Otherwise, it completely integrates BIP137&lt;br/&gt;&amp;gt; &amp;gt; signatures.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I am planning to move that format to its own BIP as soon as possible, in&lt;br/&gt;&amp;gt; &amp;gt; lieu that it is unacceptable to define formats in an Informational BIP.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Please leave your comments in this mailing list. CC&amp;#39;ing BIP editors.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; - Ali&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; &amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; &amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;
    </content>
    <updated>2023-06-08T01:12:29&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsyshvy0u4tf5qrxtv38frhrr2hhtz08pzucm5aqthmvgxaymgu2xqzyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpw04duf4</id>
    
      <title type="html">📅 Original date posted:2022-07-28 📝 Original message:Here ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsyshvy0u4tf5qrxtv38frhrr2hhtz08pzucm5aqthmvgxaymgu2xqzyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpw04duf4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsra7ylcddus6hhkaf75w8dkg5d0k40cdt9np2fw4xsh9wytt5mv2slc6kzp&#39;&gt;nevent1q…6kzp&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-07-28&lt;br/&gt;📝 Original message:Here is an except of the BIP-notatether-messageverify thread, where I contemplate how to implement address/message signing support for Taproot i.e. Schnorr signatures, in my post at:&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://bitcointalk.org/index.php?topic=5407517.msg60642144#msg60642144&#34;&gt;https://bitcointalk.org/index.php?topic=5407517.msg60642144#msg60642144&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;(stripped of bbcode formatting)&lt;br/&gt;&lt;br/&gt;======&lt;br/&gt;&lt;br/&gt;So I have mostly figured out what should be done regarding the signing and verification from Taproot addresses. The good news is that BIP340 has already made this a standard saving me the headache of having to re-implement this all over again (not that I want to in the first place).&lt;br/&gt;&lt;br/&gt;Despite being a draft, I see it as a net positive to include this signing format for Taproot addresses ahead of time i.e. before wallets even support Taproot addresses yet.&lt;br/&gt;&lt;br/&gt;A few notes before I begin the quote of relevant parts:&lt;br/&gt;&lt;br/&gt;- Eventually they chose &amp;#34;BIP340/challenge&amp;#34; as the key prefix aka. the tag. So I guess a different tag &amp;#34;BIP-notatether&amp;#34; would be incompatible with that so I drop my signing tag.&lt;br/&gt;&lt;br/&gt;- They selected encoding only the x coord of R and P (not that this is relevant to use since I chose (e,s) encoding format), and they chose Y must be the even for P and R. It might not be relevant here since I can also use (e,s) as a signature format, but I am having great difficulty deciding between that or (R,s). I believe that only one of these formats should be used for maximum consistency. [But I do not see wallets placing multiple fields for public keys just to support batch verification.]&lt;br/&gt;&lt;br/&gt;- The public key is required for all Schnorr verification schemes. This complicates the message signing/verification UI as &amp;#34;address&amp;#34; is supposed to contain an address, however the verification scheme cannot recover the public key (as achow101 mentioned). These differences might call for making a separate draft just for Schnorr signatures. Personally, I want to refrain from making any decision until I review the BIP137 signatures.&lt;br/&gt;&lt;br/&gt;--------&lt;br/&gt;&lt;br/&gt;==== Default Signing ====&lt;br/&gt;&lt;br/&gt;Input:&lt;br/&gt;* The secret key &amp;#39;&amp;#39;sk&amp;#39;&amp;#39;: a 32-byte array&lt;br/&gt;* The message &amp;#39;&amp;#39;m&amp;#39;&amp;#39;: a 32-byte array&lt;br/&gt;* Auxiliary random data &amp;#39;&amp;#39;a&amp;#39;&amp;#39;: a 32-byte array&lt;br/&gt;&lt;br/&gt;The algorithm &amp;#39;&amp;#39;Sign(sk, m)&amp;#39;&amp;#39; is defined as:&lt;br/&gt;* Let &amp;#39;&amp;#39;d&amp;#39; = int(sk)&amp;#39;&amp;#39;&lt;br/&gt;* Fail if &amp;#39;&amp;#39;d&amp;#39; = 0&amp;#39;&amp;#39; or &amp;#39;&amp;#39;d&amp;#39; ≥ n&amp;#39;&amp;#39;&lt;br/&gt;* Let &amp;#39;&amp;#39;P = d&amp;#39; · G&amp;#39;&amp;#39;&lt;br/&gt;* Let &amp;#39;&amp;#39;d = d&amp;#39; &amp;#39;&amp;#39; if &amp;#39;&amp;#39;has_even_y(P)&amp;#39;&amp;#39;, otherwise let &amp;#39;&amp;#39;d = n - d&amp;#39; &amp;#39;&amp;#39;.&lt;br/&gt;* Let &amp;#39;&amp;#39;t&amp;#39;&amp;#39; be the byte-wise xor of &amp;#39;&amp;#39;bytes(d)&amp;#39;&amp;#39; and &amp;#39;&amp;#39;hash&amp;lt;sub&amp;gt;BIP0340/aux&amp;lt;/sub&amp;gt;(a)&amp;#39;&amp;#39;&amp;lt;ref&amp;gt;The auxiliary random data is hashed (with a unique tag) as a precaution against situations where the randomness may be correlated with the private key itself. It is xored with the private key (rather than combined with it in a hash) to reduce the number of operations exposed to the actual secret key.&amp;lt;/ref&amp;gt;.&lt;br/&gt;* Let &amp;#39;&amp;#39;rand = hash&amp;lt;sub&amp;gt;BIP0340/nonce&amp;lt;/sub&amp;gt;(t || bytes(P) || m)&amp;#39;&amp;#39;&amp;lt;ref&amp;gt;Including the [&lt;a href=&#34;https://moderncrypto.org/mail-archive/curves/2020/001012.html&#34;&gt;https://moderncrypto.org/mail-archive/curves/2020/001012.html&lt;/a&gt; public key as input to the nonce hash] helps ensure the robustness of the signing algorithm by preventing leakage of the secret key if the calculation of the public key &amp;#39;&amp;#39;P&amp;#39;&amp;#39; is performed incorrectly or maliciously, for example if it is left to the caller for performance reasons.&amp;lt;/ref&amp;gt;.&lt;br/&gt;* Let &amp;#39;&amp;#39;k&amp;#39; = int(rand) mod n&amp;#39;&amp;#39;&amp;lt;ref&amp;gt;Note that in general, taking a uniformly random 256-bit integer modulo the curve order will produce an unacceptably biased result. However, for the secp256k1 curve, the order is sufficiently close to &amp;#39;&amp;#39;2&amp;lt;sup&amp;gt;256&amp;lt;/sup&amp;gt;&amp;#39;&amp;#39; that this bias is not observable (&amp;#39;&amp;#39;1 - n / 2&amp;lt;sup&amp;gt;256&amp;lt;/sup&amp;gt;&amp;#39;&amp;#39; is around &amp;#39;&amp;#39;1.27 * 2&amp;lt;sup&amp;gt;-128&amp;lt;/sup&amp;gt;&amp;#39;&amp;#39;).&amp;lt;/ref&amp;gt;.&lt;br/&gt;* Fail if &amp;#39;&amp;#39;k&amp;#39; = 0&amp;#39;&amp;#39;.&lt;br/&gt;* Let &amp;#39;&amp;#39;R = k&amp;#39; · G&amp;#39;&amp;#39;.&lt;br/&gt;* Let &amp;#39;&amp;#39;k = k&amp;#39; &amp;#39;&amp;#39; if &amp;#39;&amp;#39;has_even_y(R)&amp;#39;&amp;#39;, otherwise let &amp;#39;&amp;#39;k = n - k&amp;#39; &amp;#39;&amp;#39;.&lt;br/&gt;* Let &amp;#39;&amp;#39;e = int(hash&amp;lt;sub&amp;gt;BIP0340/challenge&amp;lt;/sub&amp;gt;(bytes(R) || bytes(P) || m)) mod n&amp;#39;&amp;#39;.&lt;br/&gt;* Let &amp;#39;&amp;#39;sig = bytes(R) || bytes((k &#43; ed) mod n)&amp;#39;&amp;#39;.&lt;br/&gt;* If &amp;#39;&amp;#39;Verify(bytes(P), m, sig)&amp;#39;&amp;#39; (see below) returns failure, abort&amp;lt;ref&amp;gt;Verifying the signature before leaving the signer prevents random or attacker provoked computation errors. This prevents publishing invalid signatures which may leak information about the secret key. It is recommended, but can be omitted if the computation cost is prohibitive.&amp;lt;/ref&amp;gt;.&lt;br/&gt;* Return the signature &amp;#39;&amp;#39;sig&amp;#39;&amp;#39;.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;==== Verification ====&lt;br/&gt;&lt;br/&gt;Input:&lt;br/&gt;* The public key &amp;#39;&amp;#39;pk&amp;#39;&amp;#39;: a 32-byte array&lt;br/&gt;* The message &amp;#39;&amp;#39;m&amp;#39;&amp;#39;: a 32-byte array&lt;br/&gt;* A signature &amp;#39;&amp;#39;sig&amp;#39;&amp;#39;: a 64-byte array&lt;br/&gt;&lt;br/&gt;The algorithm &amp;#39;&amp;#39;Verify(pk, m, sig)&amp;#39;&amp;#39; is defined as:&lt;br/&gt;* Let &amp;#39;&amp;#39;P = lift_x(int(pk))&amp;#39;&amp;#39;; fail if that fails.&lt;br/&gt;* Let &amp;#39;&amp;#39;r = int(sig[0:32])&amp;#39;&amp;#39;; fail if &amp;#39;&amp;#39;r ≥ p&amp;#39;&amp;#39;.&lt;br/&gt;* Let &amp;#39;&amp;#39;s = int(sig[32:64])&amp;#39;&amp;#39;; fail if &amp;#39;&amp;#39;s ≥ n&amp;#39;&amp;#39;.&lt;br/&gt;* Let &amp;#39;&amp;#39;e = int(hash&amp;lt;sub&amp;gt;BIP0340/challenge&amp;lt;/sub&amp;gt;(bytes(r) || bytes(P) || m)) mod n&amp;#39;&amp;#39;.&lt;br/&gt;* Let &amp;#39;&amp;#39;R = s · G - e · P&amp;#39;&amp;#39;.&lt;br/&gt;* Fail if &amp;#39;&amp;#39;is_infinite(R)&amp;#39;&amp;#39;.&lt;br/&gt;* Fail if &amp;#39;&amp;#39;not has_even_y(R)&amp;#39;&amp;#39;.&lt;br/&gt;* Fail if &amp;#39;&amp;#39;x(R) ≠ r&amp;#39;&amp;#39;.&lt;br/&gt;* Return success iff no failure occurred before reaching this point.&lt;br/&gt;&lt;br/&gt;For every valid secret key &amp;#39;&amp;#39;sk&amp;#39;&amp;#39; and message &amp;#39;&amp;#39;m&amp;#39;&amp;#39;, &amp;#39;&amp;#39;Verify(PubKey(sk),m,Sign(sk,m))&amp;#39;&amp;#39; will succeed.&lt;br/&gt;&lt;br/&gt;-------&lt;br/&gt;&lt;br/&gt;It&amp;#39;s too early for my draft to cut off some dead wood from this draft, but I will end this post with a note:&lt;br/&gt;&lt;br/&gt;- The purpose of address message signing/verification is to cryptographically prove that a message has come from a specific address. Granted, this is malleable, since the signing isn&amp;#39;t technically done with address, but with public keys in the case of both ECDSA and Schnorr, so a legacy address which validates a message implies that its corresponding segwit addresses can also validate it, since they all share the same public key. In the case of Taproot, if somebody wanted to verify that a message indeed came from a taproot address, &amp;#39;Signature&amp;#39; can be overloaded by concatenating the Schnorr signature and public key together like this:&lt;br/&gt;&lt;br/&gt;(e,s) or (R,s) || public key&lt;br/&gt;&lt;br/&gt;And the public key sent to the verification algorithm. The signature will still be a fixed-size payload. It is true that it destructs the &amp;#34;zero-knowledge&amp;#34; benefit with Schnorr signatures, but this will allow maximum compatibility with ECDSA address verification. After all, hasn&amp;#39;t BIP340 itself made tradeoffs of its own to preserve compatibility with ECDSA message generation, such as choosing the parity of Y coordinates?&lt;br/&gt;&lt;br/&gt;The truth is, is that you can&amp;#39;t verify an address message without general knowledge of the public key. And zero-knowledge signatures such as Schnorr completely disallow for that. Given that it is highly likely that future address types will also make use of Schnorr signatures, and the growing disproportion between legacy addresses and the rest of the addresses requires that the community make a choice regarding message signatures now - Do they really want them, or not?&lt;br/&gt;&lt;br/&gt;========&lt;br/&gt;&lt;br/&gt;Essentially, zero-knowledge proofs such as Schnorr are not compatible with address message signing - the public key cannot be retrieved from the address or the signature, so the address does not actually prove the authenticity of a Schnorr signature. That&amp;#39;s why the public key is required as an input in the first place.&lt;br/&gt;&lt;br/&gt;In order to make it compatible with the address signing mechanism, the zero-knowledge part would have to be sacrificed in my BIP, or else a completely separate message signing format just for Taproot would be required (which, in my view, is redundant - there is already the draft BIP322 which can verify anything and everything, but nobody is implementing that, just like BIP340).
    </content>
    <updated>2023-06-08T01:12:18&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqdj25sqy4fjtevzysufqee3075723n9pmnahk8xft8mc2h06l8hqzyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwk4qc2n</id>
    
      <title type="html">📅 Original date posted:2022-07-20 📝 Original message:[my ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqdj25sqy4fjtevzysufqee3075723n9pmnahk8xft8mc2h06l8hqzyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwk4qc2n" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8j7ncku3cly2lmvlxeecyd2au7ayxru4az9557cv0ngcls4pfqmcr6nl5x&#39;&gt;nevent1q…nl5x&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-07-20&lt;br/&gt;📝 Original message:[my third attempt at getting this message through. Surprisingly, I managed to send this at the second try with the correct SMTP, From, To and all, but maybe it was caught in GreyListing (protonmail).]&lt;br/&gt;&lt;br/&gt;I was thinking about creating a BIP to address the lack of standardization for Segwit message signatures, but I want some advice before proceeding.&lt;br/&gt;&lt;br/&gt;The current state of affairs is that the wallets that do support signing and verifying a bitcoin message can only sign legacy addresses. It is technically possible to sign and verify segwit addresses, since ECDSA only depends on the public key (hence why you need a private key to sign messages).&lt;br/&gt;&lt;br/&gt;However, because there is no generally-accepted standard for signing segwit messages, the wallets that do support this feature simply insert the segwit address into the address field. Verification also only works using the procedure on that specific wallet software, if only because the conventional tools for verifying messages attempt to reconstruct a legacy address only.&lt;br/&gt;&lt;br/&gt;This BIP is not going to enforce anything, it&amp;#39;s just going to set guidelines for writing a message signing and verification procedure.&lt;br/&gt;&lt;br/&gt;This BIP does not replace, supersede, or obsolete BIPs 173 or 322. My proposal is simply going to standardize the practice of placing the segwit address into the address field, and does not require alterations to the message signing format like those BIPs.&lt;br/&gt;&lt;br/&gt;In summary, in the verification part, the following address hashing algorithms will be tried in sequence in an attempt to reconstruct the address in the signed message:&lt;br/&gt;- P2PKH (legacy address)&lt;br/&gt;- P2WPKH-P2SH (nested segwit)&lt;br/&gt;- P2WPKH with version from 0 to MAX_WITNESS_VERSION (covers native segwit with version 0 as well as future native segwit address types such as Taproot) - where MAX_WITNESS_VERSION is the maximum supported witness version by the bech32 encoding.&lt;br/&gt;&lt;br/&gt;The verification procedure stops if any of these hashes yield the correct address, and fails if all of the above methods fail to reproduce the address in the signed message.&lt;br/&gt;&lt;br/&gt;In the signing procedure, the only modification is the insertion of the segwit address in place of the legacy address in the signed message.&lt;br/&gt;&lt;br/&gt;If this BIP is approved, it does not require any changes to existing signed messages, and the original sign/verify algorithms will continue to interoperate with this improved sign/verify algorithm, without any action necessary from the developers.&lt;br/&gt;&lt;br/&gt;So as you can see, this is the entire framework of the BIP I plan to draft. There is no need for any auxilliary feature additions into this BIP. I just want to hear the mailing list&amp;#39;s advice about how I should draft such a BIP.&lt;br/&gt;&lt;br/&gt;- Ali&lt;br/&gt;&lt;br/&gt;PS. I am pretty sure that there is a BIP for the original signing method - what is its number?
    </content>
    <updated>2023-06-08T01:11:57&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrey83udf0g5nmtz4aqgdm68dhgy8fh5etrlgllg7s2slgfn26j8czyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwxev9a0</id>
    
      <title type="html">📅 Original date posted:2021-07-12 📝 Original message:This ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrey83udf0g5nmtz4aqgdm68dhgy8fh5etrlgllg7s2slgfn26j8czyqcqh22veygd5z5fq09fuszgw2p4g4npcunvs874jshprgrg8ttpwxev9a0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp086fd3gfkl6djsa2n9rrekl93vj7xalr8rgk6mjeaht4hpxd6jq4k56xv&#39;&gt;nevent1q…56xv&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-07-12&lt;br/&gt;📝 Original message:This is an interesting read: &lt;a href=&#34;https://bitcointalk.org/index.php?topic=5348856.0&#34;&gt;https://bitcointalk.org/index.php?topic=5348856.0&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;So according to this, somebody is spamming the bitcoin network with addr message pointing to invalid addresses and ports, which bloats the peers.dat and corresponding structure in memory.&lt;br/&gt;&lt;br/&gt;Since peers.dat uses a custom record type which I don&amp;#39;t know how to parse, I wasn&amp;#39;t able to check specifics of IP addresses listed in there, but I believe I have a workaround to prevent this kind of thing from happening. Exactly how easy or difficult it will be to implement this change I don&amp;#39;t know.&lt;br/&gt;&lt;br/&gt;- Change the AddrDb updating functionality so that it does not add nodes that are unreachable. Not unreachable by timeout, but &amp;#34;connection refused&amp;#34; kind of errors.&lt;br/&gt;&lt;br/&gt;Such addresses can either be stored in a new, separate database-like file such as &amp;#34;ignore.dat&amp;#34;, or they can be augmented in the peers.dat file under a new entry type (I&amp;#39;m not sure if this is even possible). In both cases the invalid nodes can be immediately flushed from memory to avoid processing them.&lt;br/&gt;&lt;br/&gt;-- This is only done the first time the node is seen in the wild. To avoid blocking nodes which happened to go offline, the check won&amp;#39;t be made if it&amp;#39;s already in the buckets. So it won&amp;#39;t clean up an attack like this (meaning peers.dat files have to be recreated to fix this) but it will prevent another in the future.&lt;br/&gt;&lt;br/&gt;- In order to facilitate other nodes discovering blocked nodes, a new ZMQ message can be made that sends the node&amp;#39;s list of ignored addresses. Since I haven&amp;#39;t used ZMQ much I don&amp;#39;t know the specifics of how to do this.&lt;br/&gt;&lt;br/&gt;- Introduce a new file or command-line/config option called &amp;#34;ignorelist&amp;#34; or something with a list of subnets that will *not* be read into the AddrDB buckets in any case.&lt;br/&gt;&lt;br/&gt;It will work differently from the banlist, whose primary job is to block peers that send invalid messages, not peers that are not, and cannot, be unreachable in the first place.&lt;br/&gt;&lt;br/&gt;- Ali Sherief&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/20210712/0c857f86/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210712/0c857f86/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T00:57:04&#43;02:00</updated>
  </entry>

</feed>