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




  <entry>
    <id>https://nostr.ae/nevent1qqs8xev8t88vf9u0am57llhhuzd0r29masl96h8d23hfdpvsdrhgegqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596lux9wk</id>
    
      <title type="html">📅 Original date posted:2023-02-16 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8xev8t88vf9u0am57llhhuzd0r29masl96h8d23hfdpvsdrhgegqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596lux9wk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs28gl5hday7a4ym48lhxadwd7yeu4wlvzfd7jtxykk6kl3lkxdugsg49urd&#39;&gt;nevent1q…9urd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-02-16&lt;br/&gt;🗒️ Summary of this message: Ancient scrolls discovered in Pennsylvania reveal the existence of a secret society devoted to computation in 200 BC, using a system of cryptographic computations.&lt;br/&gt;📝 Original message:I&amp;#39;ve been asked by Dr. Curr and Professor Snead to forward this message to&lt;br/&gt;this mailing list, as it may be of general interest to Bitcoin users.&lt;br/&gt;&lt;br/&gt;Dear Colleague:&lt;br/&gt;&lt;br/&gt;In 1967, during excavation for the construction of a new shopping center in&lt;br/&gt;Monroeville, Pennsylvania, workers uncovered a vault containing a cache of&lt;br/&gt;ancient scrolls[1].  Most were severely damaged, but those that could be&lt;br/&gt;recovered confirmed the existence of a secret society long suspected to&lt;br/&gt;have&lt;br/&gt;been active in the region around the year 200 BC.&lt;br/&gt;&lt;br/&gt;Based on a translation of these documents, we now know that the society,&lt;br/&gt;the&lt;br/&gt;Cult of the Bound Variable, was devoted to the careful study of&lt;br/&gt;computation,&lt;br/&gt;over two millennia before the invention of the digital computer.&lt;br/&gt;&lt;br/&gt;While the Monroeville scrolls make reference to computing machines made of&lt;br/&gt;sandstone, most researchers believed this to be a poetic metaphor and that&lt;br/&gt;the&lt;br/&gt;&amp;#34;computers&amp;#34; were in fact the initiates themselves, carrying out the&lt;br/&gt;unimaginably tedious steps of their computations with reed pens on&lt;br/&gt;parchment.&lt;br/&gt;&lt;br/&gt;Within the vault, a collection of sandstone wheels marked in a language&lt;br/&gt;consisting of 32 glyphs was found. After 15 years of study, we have&lt;br/&gt;successfully&lt;br/&gt;completed the translation of what is known as &amp;#34;Codex32,&amp;#34; a document that&lt;br/&gt;describes the functions of the wheels. It was discovered that the wheels&lt;br/&gt;operate&lt;br/&gt;a system of cryptographic computations that was used by cult members to&lt;br/&gt;safeguard their most valuable secrets.&lt;br/&gt;&lt;br/&gt;The Codex32 system allows secrets to be carved into multiple tablets and&lt;br/&gt;scattered to the far corners of the earth. When a sufficient number of&lt;br/&gt;tablets are&lt;br/&gt;brought together the stone wheels are manipulated in a manner to recover the&lt;br/&gt;secrets. This finding may be of particular interest to the Bitcoin&lt;br/&gt;community.&lt;br/&gt;&lt;br/&gt;Below we provide a summary of the cult&amp;#39;s secret sharing system, which is&lt;br/&gt;graciously hosted at&lt;br/&gt;&amp;lt;&lt;br/&gt;&lt;a href=&#34;https://github.com/apoelstra/bips/blob/2023-02--volvelles/bip-0000.mediawiki&#34;&gt;https://github.com/apoelstra/bips/blob/2023-02--volvelles/bip-0000.mediawiki&lt;/a&gt;&lt;br/&gt;&amp;gt;.&lt;br/&gt;We are requesting a record assignment in the Bibliography of Immemorial&lt;br/&gt;Philosophy (BIP) repository.&lt;br/&gt;&lt;br/&gt;Thank you for your consideration.&lt;br/&gt;&lt;br/&gt;Dr. Leon O. Curr and Professor Pearlwort Snead&lt;br/&gt;Department of Archaeocryptography&lt;br/&gt;Harry Q. Bovik Institute for the Advancement&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;http://www.boundvariable.org/task.shtml&#34;&gt;http://www.boundvariable.org/task.shtml&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;-----BEGIN BIP-----&lt;br/&gt;&lt;br/&gt;&amp;lt;pre&amp;gt;&lt;br/&gt;  BIP: ????&lt;br/&gt;  Layer: Applications&lt;br/&gt;  Title: codex32&lt;br/&gt;  Author: Leon Olsson Curr and Pearlwort Sneed &amp;lt;pearlwort at wpsoftware.net&amp;gt;&lt;br/&gt;  Comments-URI: &lt;a href=&#34;https://github.com/bitcoin/bips/wiki/Comments:BIP-&#34;&gt;https://github.com/bitcoin/bips/wiki/Comments:BIP-&lt;/a&gt;????&lt;br/&gt;  Status: Draft&lt;br/&gt;  Type: ????&lt;br/&gt;  Created: 2023-02-13&lt;br/&gt;  License: BSD-3-Clause&lt;br/&gt;  Post-History: FIXME&lt;br/&gt;&amp;lt;/pre&amp;gt;&lt;br/&gt;&lt;br/&gt;==Introduction==&lt;br/&gt;&lt;br/&gt;===Abstract===&lt;br/&gt;&lt;br/&gt;This document describes a standard for backing up and restoring the master&lt;br/&gt;seed of a&lt;br/&gt;[&lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki&lt;/a&gt; BIP-0032]&lt;br/&gt;hierarchical deterministic wallet, using Shamir&amp;#39;s secret sharing.&lt;br/&gt;It includes an encoding format, a BCH error-correcting checksum, and&lt;br/&gt;algorithms for share generation and secret recovery.&lt;br/&gt;Secret data can be split into up to 31 shares.&lt;br/&gt;A minimum threshold of shares, which can be between 1 and 9, is needed to&lt;br/&gt;recover the secret, whereas without sufficient shares, no information about&lt;br/&gt;the secret is recoverable.&lt;br/&gt;&lt;br/&gt;===Copyright===&lt;br/&gt;&lt;br/&gt;This document is licensed under the 3-clause BSD license.&lt;br/&gt;&lt;br/&gt;===Motivation===&lt;br/&gt;&lt;br/&gt;BIP-0032 master seed data is the source entropy used to derive all private&lt;br/&gt;keys in an HD wallet.&lt;br/&gt;Safely storing this secret data is the hardest and most important part of&lt;br/&gt;self-custody.&lt;br/&gt;However, there is a tension between security, which demands limiting the&lt;br/&gt;number of backups, and resilience, which demands widely replicated backups.&lt;br/&gt;Encrypting the seed does not change this fundamental tradeoff, since it&lt;br/&gt;leaves essentially the same problem of how to back up the encryption key(s).&lt;br/&gt;&lt;br/&gt;To allow users freedom to make this tradeoff, we use Shamir&amp;#39;s secret&lt;br/&gt;sharing, which guarantees that any number of shares less than the threshold&lt;br/&gt;leaks no information about the secret.&lt;br/&gt;This approach allows increasing safety by widely distributing the generated&lt;br/&gt;shares, while also providing security against the compromise of one or more&lt;br/&gt;shares (as long as fewer than the threshold have been compromised).&lt;br/&gt;&lt;br/&gt;[&lt;a href=&#34;https://github.com/satoshilabs/slips/blob/master/slip-0039.md&#34;&gt;https://github.com/satoshilabs/slips/blob/master/slip-0039.md&lt;/a&gt; SLIP-0039]&lt;br/&gt;has essentially the same motivations as this standard.&lt;br/&gt;However, unlike SLIP-0039, this standard also aims to be simple enough for&lt;br/&gt;hand computation.&lt;br/&gt;Users who demand a higher level of security for particular secrets, or have&lt;br/&gt;a general distrust in digital electronic devices, have the option of using&lt;br/&gt;hand computation to backup and restore secret data in an interoperable&lt;br/&gt;manner.&lt;br/&gt;Note that hand computation is optional, the particular details of hand&lt;br/&gt;computation are outside the scope of this standard, and implementers do not&lt;br/&gt;need to be concerned with this possibility.&lt;br/&gt;&lt;br/&gt;[&lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki&lt;/a&gt; BIP-0039]&lt;br/&gt;serves the same purpose as this standard: encoding master seeds for storage&lt;br/&gt;by users.&lt;br/&gt;However, BIP-0039 has no error-correcting ability, cannot sensibly be&lt;br/&gt;extended to support secret sharing, has no support for versioning or other&lt;br/&gt;metadata, and has many technical design decisions that make implementation&lt;br/&gt;and interoperability difficult (for example, the use of SHA-512 to derive&lt;br/&gt;seeds, or the use of 11-bit words).&lt;br/&gt;&lt;br/&gt;==Specification==&lt;br/&gt;&lt;br/&gt;===codex32===&lt;br/&gt;&lt;br/&gt;A codex32 string is similar to a Bech32 string defined in [&lt;br/&gt;&lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki&lt;/a&gt; BIP-0173].&lt;br/&gt;It reuses the base32 character set from BIP-0173, and consists of:&lt;br/&gt;&lt;br/&gt;* A human-readable part, which is the string &amp;#34;ms&amp;#34; (or &amp;#34;MS&amp;#34;).&lt;br/&gt;* A separator, which is always &amp;#34;1&amp;#34;.&lt;br/&gt;* A data part which is in turn subdivided into:&lt;br/&gt;** A threshold parameter, which MUST be a single digit between &amp;#34;2&amp;#34; and &amp;#34;9&amp;#34;,&lt;br/&gt;or the digit &amp;#34;0&amp;#34;.&lt;br/&gt;*** If the threshold parameter is &amp;#34;0&amp;#34; then the share index, defined below,&lt;br/&gt;MUST have a value of &amp;#34;s&amp;#34; (or &amp;#34;S&amp;#34;).&lt;br/&gt;** An identifier consisting of 4 Bech32 characters.&lt;br/&gt;** A share index, which is any Bech32 character. Note that a share index&lt;br/&gt;value of &amp;#34;s&amp;#34; (or &amp;#34;S&amp;#34;) is special and denotes the unshared secret (see&lt;br/&gt;section &amp;#34;Unshared Secret&amp;#34;).&lt;br/&gt;** A payload which is a sequence of up to 74 Bech32 characters. (However,&lt;br/&gt;see &amp;#39;&amp;#39;&amp;#39;Long codex32 Strings&amp;#39;&amp;#39;&amp;#39; below for an exception to this limit.)&lt;br/&gt;** A checksum which consists of 13 Bech32 characters as described below.&lt;br/&gt;&lt;br/&gt;As with Bech32 strings, a codex32 string MUST be entirely uppercase or&lt;br/&gt;entirely lowercase.&lt;br/&gt;The lowercase form is used when determining a character&amp;#39;s value for&lt;br/&gt;checksum purposes.&lt;br/&gt;For presentation, lowercase is usually preferable, but uppercase SHOULD be&lt;br/&gt;used for handwritten codex32 strings.&lt;br/&gt;&lt;br/&gt;===Checksum===&lt;br/&gt;&lt;br/&gt;The last thirteen characters of the data part form a checksum and contain&lt;br/&gt;no information.&lt;br/&gt;Valid strings MUST pass the criteria for validity specified by the Python3&lt;br/&gt;code snippet below.&lt;br/&gt;The function &amp;lt;code&amp;gt;ms32_verify_checksum&amp;lt;/code&amp;gt; must return true when its&lt;br/&gt;argument is the data part as a list of integers representing the characters&lt;br/&gt;converted using the bech32 character table from BIP-0173.&lt;br/&gt;&lt;br/&gt;To construct a valid checksum given the data-part characters (excluding the&lt;br/&gt;checksum), the &amp;lt;code&amp;gt;ms32_create_checksum&amp;lt;/code&amp;gt; function can be used.&lt;br/&gt;&lt;br/&gt;&amp;lt;source lang=&amp;#34;python&amp;#34;&amp;gt;&lt;br/&gt;MS32_CONST = 0x10ce0795c2fd1e62a&lt;br/&gt;&lt;br/&gt;def ms32_polymod(values):&lt;br/&gt;    GEN = [&lt;br/&gt;        0x19dc500ce73fde210,&lt;br/&gt;        0x1bfae00def77fe529,&lt;br/&gt;        0x1fbd920fffe7bee52,&lt;br/&gt;        0x1739640bdeee3fdad,&lt;br/&gt;        0x07729a039cfc75f5a,&lt;br/&gt;    ]&lt;br/&gt;    residue = 0x23181b3&lt;br/&gt;    for v in values:&lt;br/&gt;        b = (residue &amp;gt;&amp;gt; 60)&lt;br/&gt;        residue = (residue &amp;amp; 0x0fffffffffffffff) &amp;lt;&amp;lt; 5 ^ v&lt;br/&gt;        for i in range(5):&lt;br/&gt;            residue ^= GEN[i] if ((b &amp;gt;&amp;gt; i) &amp;amp; 1) else 0&lt;br/&gt;    return residue&lt;br/&gt;&lt;br/&gt;def ms32_verify_checksum(data):&lt;br/&gt;    if len(data) &amp;gt;= 96:                      # See Long codex32 Strings&lt;br/&gt;        return ms32_verify_long_checksum(data)&lt;br/&gt;    if len(data) &amp;lt;= 93:&lt;br/&gt;        return ms32_polymod(data) == MS32_CONST&lt;br/&gt;    return False&lt;br/&gt;&lt;br/&gt;def ms32_create_checksum(data):&lt;br/&gt;    if len(data) &amp;gt; 80:                       # See Long codex32 Strings&lt;br/&gt;        return ms32_create_long_checksum(data)&lt;br/&gt;    values = data&lt;br/&gt;    polymod = ms32_polymod(values &#43; [0] * 13) ^ MS32_CONST&lt;br/&gt;    return [(polymod &amp;gt;&amp;gt; 5 * (12 - i)) &amp;amp; 31 for i in range(13)]&lt;br/&gt;&amp;lt;/source&amp;gt;&lt;br/&gt;&lt;br/&gt;===Error Correction===&lt;br/&gt;&lt;br/&gt;A codex32 string without a valid checksum MUST NOT be used.&lt;br/&gt;The checksum is designed to be an error correcting code that can correct up&lt;br/&gt;to 4 character substitutions, up to 8 unreadable characters (called&lt;br/&gt;erasures), or up to 13 consecutive erasures.&lt;br/&gt;Implementations SHOULD provide the user with a corrected valid codex32&lt;br/&gt;string if possible.&lt;br/&gt;However, implementations SHOULD NOT automatically proceed with a corrected&lt;br/&gt;codex32 string without user confirmation of the corrected string, either by&lt;br/&gt;prompting the user, or returning a corrected string in an error message and&lt;br/&gt;allowing the user to repeat their action.&lt;br/&gt;We do not specify how an implementation should implement error correction.&lt;br/&gt;However, we recommend that:&lt;br/&gt;&lt;br/&gt;* Implementations make suggestions to substitute non-bech32 characters with&lt;br/&gt;bech32 characters in some situations, such as replacing &amp;#34;B&amp;#34; with &amp;#34;8&amp;#34;, &amp;#34;O&amp;#34;&lt;br/&gt;with &amp;#34;0&amp;#34;, &amp;#34;I&amp;#34; with &amp;#34;l&amp;#34;, etc.&lt;br/&gt;* Implementations interpret &amp;#34;?&amp;#34; as an erasure.&lt;br/&gt;* Implementations optionally interpret other non-bech32 characters, or&lt;br/&gt;characters with incorrect case, as erasures.&lt;br/&gt;* If a string with 8 or fewer erasures can have those erasures filled in to&lt;br/&gt;make a valid codex32 string, then the implementation suggests such a string&lt;br/&gt;as a correction.&lt;br/&gt;* If a string consisting of valid Bech32 characters in the proper case can&lt;br/&gt;be made valid by substituting 4 or fewer characters, then the&lt;br/&gt;implementation suggests such a string as a correction.&lt;br/&gt;&lt;br/&gt;===Unshared Secret===&lt;br/&gt;&lt;br/&gt;When the share index of a valid codex32 string (converted to lowercase) is&lt;br/&gt;the letter &amp;#34;s&amp;#34;, we call the string a codex32 secret.&lt;br/&gt;The subsequent data characters in a codex32 secret, excluding the final&lt;br/&gt;checksum of 13 characters, is a direct encoding of a BIP-0032 HD master&lt;br/&gt;seed.&lt;br/&gt;&lt;br/&gt;The master seed is decoded by converting the data to bytes:&lt;br/&gt;&lt;br/&gt;* Translate the characters to 5 bits values using the bech32 character&lt;br/&gt;table from BIP-0173, most significant bit first.&lt;br/&gt;* Re-arrange those bits into groups of 8 bits. Any incomplete group at the&lt;br/&gt;end MUST be 4 bits or less, and is discarded.&lt;br/&gt;&lt;br/&gt;Note that unlike the decoding process in BIP-0173, we do NOT require that&lt;br/&gt;the incomplete group be all zeros.&lt;br/&gt;&lt;br/&gt;For an unshared secret, the threshold parameter (the first character of the&lt;br/&gt;data part) is ignored (beyond the fact it must be a digit for the codex32&lt;br/&gt;string to be valid).&lt;br/&gt;We recommend using the digit &amp;#34;0&amp;#34; for the threshold parameter in this case.&lt;br/&gt;The 4 character identifier also has no effect beyond aiding users in&lt;br/&gt;distinguishing between multiple different master seeds in cases where they&lt;br/&gt;have more than one.&lt;br/&gt;&lt;br/&gt;===Recovering Master Seed===&lt;br/&gt;&lt;br/&gt;When the share index of a valid codex32 string (converted to lowercase) is&lt;br/&gt;not the letter &amp;#34;s&amp;#34;, we call the string an codex32 share.&lt;br/&gt;The first character of the data part indicates the threshold of the share,&lt;br/&gt;and it is required to be a non-&amp;#34;0&amp;#34; digit.&lt;br/&gt;&lt;br/&gt;In order to recover a master seed, one needs a set of valid codex32 shares&lt;br/&gt;such that:&lt;br/&gt;&lt;br/&gt;* All shares have the same threshold value, the same identifier, and the&lt;br/&gt;same length.&lt;br/&gt;* All of the share index values are distinct.&lt;br/&gt;* The number of codex32 shares is exactly equal to the (common) threshold&lt;br/&gt;value.&lt;br/&gt;&lt;br/&gt;If all the above conditions are satisfied, the &amp;lt;code&amp;gt;ms32_recover&amp;lt;/code&amp;gt;&lt;br/&gt;function will return a codex32 secret when its argument is the list of&lt;br/&gt;codex32 shares with each share represented as a list of integers&lt;br/&gt;representing the characters converted using the bech32 character table from&lt;br/&gt;BIP-0173.&lt;br/&gt;&lt;br/&gt;&amp;lt;source lang=&amp;#34;python&amp;#34;&amp;gt;&lt;br/&gt;bech32_inv = [&lt;br/&gt;    0, 1, 20, 24, 10, 8, 12, 29, 5, 11, 4, 9, 6, 28, 26, 31,&lt;br/&gt;    22, 18, 17, 23, 2, 25, 16, 19, 3, 21, 14, 30, 13, 7, 27, 15,&lt;br/&gt;]&lt;br/&gt;&lt;br/&gt;def bech32_mul(a, b):&lt;br/&gt;    res = 0&lt;br/&gt;    for i in range(5):&lt;br/&gt;        res ^= a if ((b &amp;gt;&amp;gt; i) &amp;amp; 1) else 0&lt;br/&gt;        a *= 2&lt;br/&gt;        a ^= 41 if (32 &amp;lt;= a) else 0&lt;br/&gt;    return res&lt;br/&gt;&lt;br/&gt;def bech32_lagrange(l, x):&lt;br/&gt;    n = 1&lt;br/&gt;    c = []&lt;br/&gt;    for i in l:&lt;br/&gt;        n = bech32_mul(n, i ^ x)&lt;br/&gt;        m = 1&lt;br/&gt;        for j in l:&lt;br/&gt;            m = bech32_mul(m, (x if i == j else i) ^ j)&lt;br/&gt;        c.append(m)&lt;br/&gt;    return [bech32_mul(n, bech32_inv[i]) for i in c]&lt;br/&gt;&lt;br/&gt;def ms32_interpolate(l, x):&lt;br/&gt;    w = bech32_lagrange([s[5] for s in l], x)&lt;br/&gt;    res = []&lt;br/&gt;    for i in range(len(l[0])):&lt;br/&gt;        n = 0&lt;br/&gt;        for j in range(len(l)):&lt;br/&gt;            n ^= bech32_mul(w[j], l[j][i])&lt;br/&gt;        res.append(n)&lt;br/&gt;    return res&lt;br/&gt;&lt;br/&gt;def ms32_recover(l):&lt;br/&gt;    return ms32_interpolate(l, 16)&lt;br/&gt;&amp;lt;/source&amp;gt;&lt;br/&gt;&lt;br/&gt;===Generating Shares===&lt;br/&gt;&lt;br/&gt;If we already have &amp;#39;&amp;#39;t&amp;#39;&amp;#39; valid codex32 strings such that:&lt;br/&gt;&lt;br/&gt;* All strings have the same threshold value &amp;#39;&amp;#39;t&amp;#39;&amp;#39;, the same identifier, and&lt;br/&gt;the same length&lt;br/&gt;* All of the share index values are distinct&lt;br/&gt;&lt;br/&gt;Then we can derive additional shares with the &amp;lt;code&amp;gt;ms32_interpolate&amp;lt;/code&amp;gt;&lt;br/&gt;function by passing it a list of exactly &amp;#39;&amp;#39;t&amp;#39;&amp;#39; of these codex32 strings,&lt;br/&gt;together with a fresh share index distinct from all of the existing share&lt;br/&gt;indexes.&lt;br/&gt;The newly derived share will have the provided share index.&lt;br/&gt;&lt;br/&gt;Once a user has generated &amp;#39;&amp;#39;n&amp;#39;&amp;#39; codex32 shares, they may discard the&lt;br/&gt;codex32 secret (if it exists).&lt;br/&gt;The &amp;#39;&amp;#39;n&amp;#39;&amp;#39; shares form a &amp;#39;&amp;#39;t&amp;#39;&amp;#39; of &amp;#39;&amp;#39;n&amp;#39;&amp;#39; Shamir&amp;#39;s secret sharing scheme of a&lt;br/&gt;codex32 secret.&lt;br/&gt;&lt;br/&gt;There are two ways to create an initial set of &amp;#39;&amp;#39;t&amp;#39;&amp;#39; valid codex32 strings,&lt;br/&gt;depending on whether the user already has an existing master seed to split.&lt;br/&gt;&lt;br/&gt;====For an existing master seed====&lt;br/&gt;&lt;br/&gt;Before generating shares for an existing master seed, it first must be&lt;br/&gt;converted into a codex32 secret, as described above.&lt;br/&gt;The conversion process consists of:&lt;br/&gt;&lt;br/&gt;* Choosing a threshold value &amp;#39;&amp;#39;t&amp;#39;&amp;#39; between 2 and 9, inclusive&lt;br/&gt;* Choosing a 4 bech32 character identifier&lt;br/&gt;** We do not define how to choose the identifier, beyond noting that it&lt;br/&gt;SHOULD be distinct for every master seed the user may need to disambiguate.&lt;br/&gt;* Setting the share index to &amp;#34;s&amp;#34;&lt;br/&gt;* Setting the payload to a Bech32 encoding of the master seed, padded with&lt;br/&gt;arbitrary bits&lt;br/&gt;* Generating a valid checksum in accordance with the Checksum section&lt;br/&gt;&lt;br/&gt;Along with the codex32 secret, the user must generate &amp;#39;&amp;#39;t&amp;#39;&amp;#39;-1 other codex32&lt;br/&gt;shares, each with the same threshold value, the same identifier, and a&lt;br/&gt;distinct share index.&lt;br/&gt;The set of share indexes may be chosen arbitrarily.&lt;br/&gt;The payload of each of these codex32 shares is chosen uniformly at random&lt;br/&gt;such that it has the same length as the payload of the codex32 secret.&lt;br/&gt;For each share, a valid checksum must be generated in accordance with the&lt;br/&gt;Checksum section.&lt;br/&gt;&lt;br/&gt;The codex32 secret and the &amp;#39;&amp;#39;t&amp;#39;&amp;#39;-1 codex32 shares form a set of &amp;#39;&amp;#39;t&amp;#39;&amp;#39; valid&lt;br/&gt;codex32 strings from which additional shares can be derived as described&lt;br/&gt;above.&lt;br/&gt;&lt;br/&gt;====For a fresh master seed====&lt;br/&gt;&lt;br/&gt;In the case that the user wishes to generate a fresh master seed, the user&lt;br/&gt;chooses a threshold value &amp;#39;&amp;#39;t&amp;#39;&amp;#39; and an identifier, then generates &amp;#39;&amp;#39;t&amp;#39;&amp;#39;&lt;br/&gt;random codex32 shares, using the generation procedure from the previous&lt;br/&gt;section.&lt;br/&gt;As before, each share must have the same threshold value &amp;#39;&amp;#39;t&amp;#39;&amp;#39;, the same&lt;br/&gt;identifier, and a distinct share index.&lt;br/&gt;&lt;br/&gt;With this set of &amp;#39;&amp;#39;t&amp;#39;&amp;#39; codex32 shares, new shares can be derived as&lt;br/&gt;discussed above. This process generates a fresh master seed, whose value&lt;br/&gt;can be retrieved by running the recovery process on any &amp;#39;&amp;#39;t&amp;#39;&amp;#39; of these&lt;br/&gt;shares.&lt;br/&gt;&lt;br/&gt;===Long codex32 Strings===&lt;br/&gt;&lt;br/&gt;The 13 character checksum design only supports up to 80 data characters.&lt;br/&gt;Excluding the threshold, identifier and index characters, this limits the&lt;br/&gt;payload to 74 characters or 46 bytes.&lt;br/&gt;While this is enough to support the 32-byte advised size of BIP-0032 master&lt;br/&gt;seeds, BIP-0032 allows seeds to be up to 64 bytes in size.&lt;br/&gt;We define a long codex32 string format to support these longer seeds by&lt;br/&gt;defining an alternative checksum.&lt;br/&gt;&lt;br/&gt;&amp;lt;source lang=&amp;#34;python&amp;#34;&amp;gt;&lt;br/&gt;MS32_LONG_CONST = 0x43381e570bf4798ab26&lt;br/&gt;&lt;br/&gt;def ms32_long_polymod(values):&lt;br/&gt;    GEN = [&lt;br/&gt;        0x3d59d273535ea62d897,&lt;br/&gt;        0x7a9becb6361c6c51507,&lt;br/&gt;        0x543f9b7e6c38d8a2a0e,&lt;br/&gt;        0x0c577eaeccf1990d13c,&lt;br/&gt;        0x1887f74f8dc71b10651,&lt;br/&gt;    ]&lt;br/&gt;    residue = 0x23181b3&lt;br/&gt;    for v in values:&lt;br/&gt;        b = (residue &amp;gt;&amp;gt; 70)&lt;br/&gt;        residue = (residue &amp;amp; 0x3fffffffffffffffff) &amp;lt;&amp;lt; 5 ^ v&lt;br/&gt;        for i in range(5):&lt;br/&gt;            residue ^= GEN[i] if ((b &amp;gt;&amp;gt; i) &amp;amp; 1) else 0&lt;br/&gt;    return residue&lt;br/&gt;&lt;br/&gt;def ms32_verify_long_checksum(data):&lt;br/&gt;    return ms32_long_polymod(data) == MS32_LONG_CONST&lt;br/&gt;&lt;br/&gt;def ms32_create_long_checksum(data):&lt;br/&gt;    values = data&lt;br/&gt;    polymod = ms32_long_polymod(values &#43; [0] * 15) ^ MS32_LONG_CONST&lt;br/&gt;    return [(polymod &amp;gt;&amp;gt; 5 * (14 - i)) &amp;amp; 31 for i in range(15)]&lt;br/&gt;&amp;lt;/source&amp;gt;&lt;br/&gt;&lt;br/&gt;A long codex32 string follows the same specification as a regular codex32&lt;br/&gt;string with the following changes.&lt;br/&gt;&lt;br/&gt;* The payload is a sequence of between 75 and 103 Bech32 characters.&lt;br/&gt;* The checksum consists of 15 Bech32 characters as defined above.&lt;br/&gt;&lt;br/&gt;A codex32 string with a data part of 94 or 95 characters is never legal as&lt;br/&gt;a regular codex32 string is limited to 93 data characters and a long&lt;br/&gt;codex32 string is at least 96 characters.&lt;br/&gt;&lt;br/&gt;Generation of long shares and recovery of the master seed from long shares&lt;br/&gt;proceeds in exactly the same way as for regular shares with the&lt;br/&gt;&amp;lt;code&amp;gt;ms32_interpolate&amp;lt;/code&amp;gt; function.&lt;br/&gt;&lt;br/&gt;The long checksum is designed to be an error correcting code that can&lt;br/&gt;correct up to 4 character substitutions, up to 8 unreadable characters&lt;br/&gt;(called erasures), or up to 15 consecutive erasures.&lt;br/&gt;As with regular checksums we do not specify how an implementation should&lt;br/&gt;implement error correction, and all our recommendations for error&lt;br/&gt;correction of regular codex32 strings also apply to long codex32 strings.&lt;br/&gt;&lt;br/&gt;==Rationale==&lt;br/&gt;&lt;br/&gt;This scheme is based on the observation that the Lagrange interpolation of&lt;br/&gt;valid codewords in a BCH code will always be a valid codeword.&lt;br/&gt;This means that derived shares will always have valid checksum, and a&lt;br/&gt;sufficient threshold of shares with valid checksums will derive a secret&lt;br/&gt;with a valid checksum.&lt;br/&gt;&lt;br/&gt;The header system is also compatible with Lagrange interpolation, meaning&lt;br/&gt;all derived shares will have the same identifier and will have the&lt;br/&gt;appropriate share index.&lt;br/&gt;This fact allows the header data to be covered by the checksum.&lt;br/&gt;&lt;br/&gt;The checksum size and identifier size have been chosen so that the encoding&lt;br/&gt;of 128-bit seeds and shares fit within 48 characters.&lt;br/&gt;This is a standard size for many common seed storage formats, which has&lt;br/&gt;been popularized by the 12 four-letter word format of the BIP-0039 mnemonic.&lt;br/&gt;&lt;br/&gt;The 13 character checksum is adequate to correct 4 errors in up to 93&lt;br/&gt;characters (80 characters of data and 13 characters of the checksum). This&lt;br/&gt;is somewhat better quality than the checksum used in SLIP-0039.&lt;br/&gt;&lt;br/&gt;For 256-bit seeds and shares our strings are 74 characters, which fits into&lt;br/&gt;the 96 character format of the 24 four-letter word format of the BIP-0039&lt;br/&gt;mnemonic, with plenty of room to spare.&lt;br/&gt;&lt;br/&gt;A longer checksum is needed to support up to 512-bit seeds, the longest&lt;br/&gt;seed length specified in BIP-0032, as the 13 character checksum isn&amp;#39;t&lt;br/&gt;adequate for more than 80 data characters.&lt;br/&gt;While we could use the 15 character checksum for both cases, we prefer to&lt;br/&gt;keep the strings as short as possible for the more common cases of 128-bit&lt;br/&gt;and 256-bit master seeds.&lt;br/&gt;We only guarantee to correct 4 characters no matter how long the string is.&lt;br/&gt;Longer strings mean more chances for transcription errors, so shorter&lt;br/&gt;strings are better.&lt;br/&gt;&lt;br/&gt;The longest data part using the regular 13 character checksum is 93&lt;br/&gt;characters and corresponds to a 400-bit secret.&lt;br/&gt;At this length, the prefix &amp;lt;code&amp;gt;MS1&amp;lt;/code&amp;gt; is not covered by the checksum.&lt;br/&gt;This is acceptable because the checksum scheme itself requires you to know&lt;br/&gt;that the &amp;lt;code&amp;gt;MS1&amp;lt;/code&amp;gt; prefix is being used in the first place.&lt;br/&gt;If the prefix is damaged and a user is guessing that the data might be&lt;br/&gt;using this scheme, then the user can enter the available data explicitly&lt;br/&gt;using the suspected &amp;lt;code&amp;gt;MS1&amp;lt;/code&amp;gt; prefix.&lt;br/&gt;&lt;br/&gt;==Backwards Compatibility==&lt;br/&gt;&lt;br/&gt;codex32 is an alternative to BIP-0039 and SLIP-0039.&lt;br/&gt;It is technically possible to derive the BIP32 master seed from seed words&lt;br/&gt;encoded in one of these schemes, and then to encode this seed in codex32.&lt;br/&gt;For BIP-0039 this process is irreversible, since it involves hashing the&lt;br/&gt;original words.&lt;br/&gt;Furthermore, the resulting seed will be 512 bits long, which may be too&lt;br/&gt;large to be safely and conveniently handled.&lt;br/&gt;&lt;br/&gt;SLIP-0039 seed words can be reversibly converted to master seeds, so it is&lt;br/&gt;possible to interconvert between SLIP-0039 and codex32.&lt;br/&gt;However, SLIP-0039 &amp;#39;&amp;#39;&amp;#39;shares&amp;#39;&amp;#39;&amp;#39; cannot be converted to codex32 shares&lt;br/&gt;because the two schemes use a different underlying field.&lt;br/&gt;&lt;br/&gt;The authors of this BIP do not recommend interconversion.&lt;br/&gt;Instead, users who wish to switch to codex32 should generate a fresh seed&lt;br/&gt;and sweep their coins.&lt;br/&gt;&lt;br/&gt;==Reference Implementation==&lt;br/&gt;&lt;br/&gt;* [&lt;a href=&#34;https://secretcodex32.com/docs/2023-02-14--bw.ps&#34;&gt;https://secretcodex32.com/docs/2023-02-14--bw.ps&lt;/a&gt; Reference PostScript&lt;br/&gt;Implementation]&lt;br/&gt;* FIXME add Python implementation&lt;br/&gt;* FIXME add Rust implementation&lt;br/&gt;&lt;br/&gt;==Test Vectors==&lt;br/&gt;&lt;br/&gt;===Test vector 1===&lt;br/&gt;&lt;br/&gt;This example shows the codex32 format, when used without splitting the&lt;br/&gt;secret into any shares.&lt;br/&gt;The data part contains 26 Bech32 characters, which corresponds to 130 bits.&lt;br/&gt;We truncate the last two bits in order to obtain a 128-bit master seed.&lt;br/&gt;&lt;br/&gt;codex32 secret (Bech32):&lt;br/&gt;&amp;lt;code&amp;gt;ms10testsxxxxxxxxxxxxxxxxxxxxxxxxxx4nzvca9cmczlw&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;Master secret (hex): &amp;lt;code&amp;gt;318c6318c6318c6318c6318c6318c631&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;* human-readable part: &amp;lt;code&amp;gt;ms&amp;lt;/code&amp;gt;&lt;br/&gt;* separator: &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&lt;br/&gt;* k value: &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; (no secret splitting)&lt;br/&gt;* identifier: &amp;lt;code&amp;gt;test&amp;lt;/code&amp;gt;&lt;br/&gt;* share index: &amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt; (the secret)&lt;br/&gt;* data: &amp;lt;code&amp;gt;xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;lt;/code&amp;gt;&lt;br/&gt;* checksum: &amp;lt;code&amp;gt;4nzvca9cmczlw&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;===Test vector 2===&lt;br/&gt;&lt;br/&gt;This example shows generating a new master seed using &amp;#34;random&amp;#34; codex32&lt;br/&gt;shares, as well as deriving an additional codex32 share, using &amp;#39;&amp;#39;k&amp;#39;&amp;#39;=2 and&lt;br/&gt;an identifier of &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt;.&lt;br/&gt;Although codex32 strings are canonically all lowercase, it&amp;#39;s also valid to&lt;br/&gt;use all uppercase.&lt;br/&gt;&lt;br/&gt;Share with index &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;:&lt;br/&gt;&amp;lt;code&amp;gt;MS12NAMEA320ZYXWVUTSRQPNMLKJHGFEDCAXRPP870HKKQRM&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;Share with index &amp;lt;code&amp;gt;C&amp;lt;/code&amp;gt;:&lt;br/&gt;&amp;lt;code&amp;gt;MS12NAMECACDEFGHJKLMNPQRSTUVWXYZ023FTR2GDZMPY6PN&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;* Derived share with index &amp;lt;code&amp;gt;D&amp;lt;/code&amp;gt;:&lt;br/&gt;&amp;lt;code&amp;gt;MS12NAMEDLL4F8JLH4E5VDVULDLFXU2JHDNLSM97XVENRXEG&amp;lt;/code&amp;gt;&lt;br/&gt;* Secret share with index &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;:&lt;br/&gt;&amp;lt;code&amp;gt;MS12NAMES6XQGUZTTXKEQNJSJZV4JV3NZ5K3KWGSPHUH6EVW&amp;lt;/code&amp;gt;&lt;br/&gt;* Master secret (hex): &amp;lt;code&amp;gt;d1808e096b35b209ca12132b264662a5&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;Note that per BIP-0173, the lowercase form is used when determining a&lt;br/&gt;character&amp;#39;s value for checksum purposes.&lt;br/&gt;In particular, given an all uppercase codex32 string, we still use&lt;br/&gt;lowercase &amp;lt;code&amp;gt;ms&amp;lt;/code&amp;gt; as the human-readable part during checksum&lt;br/&gt;construction.&lt;br/&gt;&lt;br/&gt;===Test vector 3===&lt;br/&gt;&lt;br/&gt;This example shows splitting an existing 128-bit master seed into &amp;#34;random&amp;#34;&lt;br/&gt;codex32 shares, using &amp;#39;&amp;#39;k&amp;#39;&amp;#39;=3 and an identifier of &amp;lt;code&amp;gt;cash&amp;lt;/code&amp;gt;.&lt;br/&gt;We appended two zero bits in order to obtain 26 Bech32 characters (130 bits&lt;br/&gt;of data) from the 128-bit master seed.&lt;br/&gt;&lt;br/&gt;Master secret (hex): &amp;lt;code&amp;gt;ffeeddccbbaa99887766554433221100&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;Secret share with index &amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt;:&lt;br/&gt;&amp;lt;code&amp;gt;ms13cashsllhdmn9m42vcsamx24zrxgs3qqjzqud4m0d6nln&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;Share with index &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt;:&lt;br/&gt;&amp;lt;code&amp;gt;ms13casha320zyxwvutsrqpnmlkjhgfedca2a8d0zehn8a0t&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;Share with index &amp;lt;code&amp;gt;c&amp;lt;/code&amp;gt;:&lt;br/&gt;&amp;lt;code&amp;gt;ms13cashcacdefghjklmnpqrstuvwxyz023949xq35my48dr&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;* Derived share with index &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;:&lt;br/&gt;&amp;lt;code&amp;gt;ms13cashd0wsedstcdcts64cd7wvy4m90lm28w4ffupqs7rm&amp;lt;/code&amp;gt;&lt;br/&gt;* Derived share with index &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt;:&lt;br/&gt;&amp;lt;code&amp;gt;ms13casheekgpemxzshcrmqhaydlp6yhms3ws7320xyxsar9&amp;lt;/code&amp;gt;&lt;br/&gt;* Derived share with index &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;:&lt;br/&gt;&amp;lt;code&amp;gt;ms13cashf8jh6sdrkpyrsp5ut94pj8ktehhw2hfvyrj48704&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;Any three of the five shares among &amp;lt;code&amp;gt;acdef&amp;lt;/code&amp;gt; can be used to&lt;br/&gt;recover the secret.&lt;br/&gt;&lt;br/&gt;Note that the choice to append two zero bits was arbitrary, and any of the&lt;br/&gt;following four secret shares would have been valid choices.&lt;br/&gt;However, each choice would have resulted in a different set of derived&lt;br/&gt;shares.&lt;br/&gt;&lt;br/&gt;* &amp;lt;code&amp;gt;ms13cashsllhdmn9m42vcsamx24zrxgs3qqjzqud4m0d6nln&amp;lt;/code&amp;gt;&lt;br/&gt;* &amp;lt;code&amp;gt;ms13cashsllhdmn9m42vcsamx24zrxgs3qpte35dvzkjpt0r&amp;lt;/code&amp;gt;&lt;br/&gt;* &amp;lt;code&amp;gt;ms13cashsllhdmn9m42vcsamx24zrxgs3qzfatvdwq5692k6&amp;lt;/code&amp;gt;&lt;br/&gt;* &amp;lt;code&amp;gt;ms13cashsllhdmn9m42vcsamx24zrxgs3qrsx6ydhed97jx2&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;===Test vector 4===&lt;br/&gt;&lt;br/&gt;This example shows converting a 256-bit secret into a codex32 secret,&lt;br/&gt;without splitting the secret into any shares.&lt;br/&gt;We appended four zero bits in order to obtain 52 Bech32 characters (260&lt;br/&gt;bits of data) from the 256-bit secret.&lt;br/&gt;&lt;br/&gt;256-bit secret (hex):&lt;br/&gt;&amp;lt;code&amp;gt;ffeeddccbbaa99887766554433221100ffeeddccbbaa99887766554433221100&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;* codex32 secret:&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqqtum9pgv99ycma&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;Note that the choice to append four zero bits was arbitrary, and any of the&lt;br/&gt;following sixteen codex32 secrets would have been valid:&lt;br/&gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqqtum9pgv99ycma&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqpj82dp34u6lqtd&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqzsrs4pnh7jmpj5&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqrfcpap2w8dqezy&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqy5tdvphn6znrf0&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyq9dsuypw2ragmel&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqx05xupvgp4v6qx&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyq8k0h5p43c2hzsk&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqgum7hplmjtr8ks&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqf9q0lpxzt5clxq&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyq28y48pyqfuu7le&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqt7ly0paesr8x0f&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqvrvg7pqydv5uyz&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqd6hekpea5n0y5j&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqwcnrwpmlkmt9dt&amp;lt;/code&amp;gt;&lt;br/&gt;*&lt;br/&gt;&amp;lt;code&amp;gt;ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyq0pgjxpzx0ysaam&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;===Test vector 5===&lt;br/&gt;&lt;br/&gt;This example shows generating a new 512-bit master seed using &amp;#34;random&amp;#34;&lt;br/&gt;codex32 characters and appending a checksum.&lt;br/&gt;The payload contains 103 Bech32 characters, which corresponds to 515 bits.&lt;br/&gt;The last three bits are discarded when converting to a 512-bit master seed.&lt;br/&gt;&lt;br/&gt;This is an example of a &amp;#39;&amp;#39;&amp;#39;Long codex32 String&amp;#39;&amp;#39;&amp;#39;.&lt;br/&gt;&lt;br/&gt;* Secret share with index &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;:&lt;br/&gt;&amp;lt;code&amp;gt;MS100C8VSM32ZXFGUHPCHTLUPZRY9X8GF2TVDW0S3JN54KHCE6MUA7LQPZYGSFJD6AN074RXVCEMLH8WU3TK925ACDEFGHJKLMNPQRSTUVWXY06FHPV80UNDVARHRAK&amp;lt;/code&amp;gt;&lt;br/&gt;* Master secret (hex):&lt;br/&gt;&amp;lt;code&amp;gt;dc5423251cb87175ff8110c8531d0952d8d73e1194e95b5f19d6f9df7c01111104c9baecdfea8cccc677fb9ddc8aec5553b86e528bcadfdcc201c17c638c47e9&amp;lt;/code&amp;gt;&lt;br/&gt;&lt;br/&gt;==Appendix==&lt;br/&gt;&lt;br/&gt;===Mathematical Companion===&lt;br/&gt;&lt;br/&gt;Below we use the Bech32 character set to denote values in GF[32].&lt;br/&gt;In Bech32, the letter &amp;lt;code&amp;gt;Q&amp;lt;/code&amp;gt; denotes zero and the letter&lt;br/&gt;&amp;lt;code&amp;gt;P&amp;lt;/code&amp;gt; denotes one.&lt;br/&gt;The digits &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;9&amp;lt;/code&amp;gt; do&lt;br/&gt;&amp;#39;&amp;#39;not&amp;#39;&amp;#39; denote their numeric values.&lt;br/&gt;They are simply elements of GF[32].&lt;br/&gt;&lt;br/&gt;The generating polynomial for our BCH code is as follows.&lt;br/&gt;&lt;br/&gt;We extend GF[32] to GF[1024] by adjoining a primitive cube root of unity,&lt;br/&gt;&amp;lt;code&amp;gt;ζ&amp;lt;/code&amp;gt;, satisfying &amp;lt;code&amp;gt;ζ^2 = ζ &#43; P&amp;lt;/code&amp;gt;.&lt;br/&gt;&lt;br/&gt;We select &amp;lt;code&amp;gt;β := G ζ&amp;lt;/code&amp;gt; which has order 93, and construct the&lt;br/&gt;product &amp;lt;code&amp;gt;(x - β^i)&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;{17, 20, 46, 49,&lt;br/&gt;52, 77, 78, 79, 80, 81, 82, 83, 84}&amp;lt;/code&amp;gt;.&lt;br/&gt;The resulting polynomial is our generating polynomial for our 13 character&lt;br/&gt;checksum:&lt;br/&gt;&lt;br/&gt;    x^13 &#43; E x^12 &#43; M x^11 &#43; 3 x^10 &#43; G x^9 &#43; Q x^8 &#43; E x^7 &#43; E x^6 &#43; E x^5&lt;br/&gt;&#43; L x^4 &#43; M x^3 &#43; C x^2 &#43; S x &#43; S&lt;br/&gt;&lt;br/&gt;For our long checksum, we select &amp;lt;code&amp;gt;γ := E &#43; X ζ&amp;lt;/code&amp;gt;, which has order&lt;br/&gt;1023, and construct the product &amp;lt;code&amp;gt;(x - γ^i)&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;&lt;br/&gt;in &amp;lt;code&amp;gt;{32, 64, 96, 895, 927, 959, 991, 1019, 1020, 1021, 1022, 1023,&lt;br/&gt;1024, 1025, 1026}&amp;lt;/code&amp;gt;.&lt;br/&gt;The resulting polynomial is our generating polynomial for our 15 character&lt;br/&gt;checksum for long strings:&lt;br/&gt;&lt;br/&gt;    x^15 &#43; 0 x^14 &#43; 2 x^13 &#43; E x^12 &#43; 6 x^11 &#43; F x^10 &#43; E x^9 &#43; 4 x^8 &#43; X&lt;br/&gt;x^7 &#43; H x^6 &#43; 4 x^5 &#43; X x^4 &#43; 9 x^3 &#43; K x^2 &#43; Y x^1 &#43; H&lt;br/&gt;&lt;br/&gt;(Reminder: the character &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; does &amp;#39;&amp;#39;not&amp;#39;&amp;#39; denote the zero of the&lt;br/&gt;field.)&lt;br/&gt;&lt;br/&gt;-----END BIP-----&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/20230215/4ef5f4ec/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230215/4ef5f4ec/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:19:39&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2kkqsdqy6nkl6380nzug80g7tq6t0s59x4vpfapgdn4hv8twx79czyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596duwvmv</id>
    
      <title type="html">📅 Original date posted:2023-02-07 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2kkqsdqy6nkl6380nzug80g7tq6t0s59x4vpfapgdn4hv8twx79czyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596duwvmv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9jgkay96cs67y59dpfzlsj77dn89pvzs55uszqk69cfwpgga98wqwvp5ju&#39;&gt;nevent1q…p5ju&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-02-07&lt;br/&gt;🗒️ Summary of this message: A bug in Taproot allows the same Tapleaf to be repeated multiple times, incurring different Tapfee rates. Always know the entire Taptree when interacting with someone&amp;#39;s Tapspend.&lt;br/&gt;📝 Original message:There is a bug in Taproot that allows the same Tapleaf to be repeated&lt;br/&gt;multiple times in the same Taproot, potentially at different Taplevels&lt;br/&gt;incurring different Tapfee rates.&lt;br/&gt;&lt;br/&gt;The countermeasure is that you should always know the entire Taptree when&lt;br/&gt;interacting with someone&amp;#39;s Tapspend.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Tue, Feb 7, 2023 at 1:10 PM Andrew Poelstra via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Some people highlighted some minor problems with my last email:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Tue, Feb 07, 2023 at 01:46:22PM &#43;0000, Andrew Poelstra via bitcoin-dev&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;lt;snip&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [1] &lt;a href=&#34;https://bitcoin.sipa.be/miniscript/&#34;&gt;https://bitcoin.sipa.be/miniscript/&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; [2] In Taproot, if you want to prevent signatures migrating to another&lt;br/&gt;&amp;gt; &amp;gt;     branch or within a branch, you can use the CODESEPARATOR opcode&lt;br/&gt;&amp;gt; &amp;gt;     which was redisegned in Taproot for exactly this purpose... we&lt;br/&gt;&amp;gt; &amp;gt;     really did about witness malleation in its design!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In Taproot the tapleaf hash is always covered by the signature (though&lt;br/&gt;&amp;gt; not in some ANYONECANPAY proposals) so you can never migrate signatures&lt;br/&gt;&amp;gt; between tapbranches.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I had thought this was the case, but then I re-confused myself by&lt;br/&gt;&amp;gt; reading BIP 341 .... which has much of the sighash specified, but not&lt;br/&gt;&amp;gt; all of it! The tapleaf hash is added in BIP 342.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     If you want to prevent signatures from moving around *within* a&lt;br/&gt;&amp;gt; &amp;gt;     branch,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; And this sentence I just meant to delete :)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Andrew Poelstra&lt;br/&gt;&amp;gt; Director of Research, Blockstream&lt;br/&gt;&amp;gt; Email: apoelstra at wpsoftware.net&lt;br/&gt;&amp;gt; Web:   &lt;a href=&#34;https://www.wpsoftware.net/andrew&#34;&gt;https://www.wpsoftware.net/andrew&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The sun is always shining in space&lt;br/&gt;&amp;gt;     -Justin Lewis-Webster&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/20230207/57930553/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230207/57930553/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:19:27&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqst4wnv8hg4xknde350w2v9d4yc0n3ghwyg2elvx7mz4ewunddjt3gzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596rd4gpy</id>
    
      <title type="html">📅 Original date posted:2022-07-11 📝 Original message:Oops, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqst4wnv8hg4xknde350w2v9d4yc0n3ghwyg2elvx7mz4ewunddjt3gzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596rd4gpy" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxegyqe8053m7c35ae9wzzgsct8tn9w7mc32psuk3pnz9yay7s5rcz7khvt&#39;&gt;nevent1q…khvt&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-07-11&lt;br/&gt;📝 Original message:Oops, you are right.  We need the bribe to be the output of the coinbase,&lt;br/&gt;but due to the maturity rule, it isn&amp;#39;t really a bribe.&lt;br/&gt;&lt;br/&gt;Too bad coinbases cannot take other coinbase outputs as inputs to bypass&lt;br/&gt;the maturity rule.&lt;br/&gt;&lt;br/&gt;I guess that means the bribe has to be by leaving transactions in the&lt;br/&gt;mempool.&lt;br/&gt;&lt;br/&gt;Also your point about centralization pressure is well taken.&lt;br/&gt;&lt;br/&gt;On Mon, Jul 11, 2022 at 5:56 PM Peter Todd &amp;lt;pete at petertodd.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Mon, Jul 11, 2022 at 05:36:52PM -0400, Peter Todd via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; On Mon, Jul 11, 2022 at 04:35:02PM -0400, Russell O&amp;#39;Connor via&lt;br/&gt;&amp;gt; bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; What happens after that I&amp;#39;m not sure.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Miners will learn to create anyone-can-spend outputs to bribe other&lt;br/&gt;&amp;gt; miners&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; to build on their block rather than reorg it.  (Due to the coinbase&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; maturity, this will require some amount of floating capital.)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ...and that&amp;#39;s a disaster for mining centralization, because the smaller&lt;br/&gt;&amp;gt; miners&lt;br/&gt;&amp;gt; &amp;gt; need to pay larger bribes than larger miners. Not to mention having to&lt;br/&gt;&amp;gt; keep&lt;br/&gt;&amp;gt; &amp;gt; capital around to do it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Also, note how from a practical point of view, we&amp;#39;ll need to add a new&lt;br/&gt;&amp;gt; type of&lt;br/&gt;&amp;gt; tx that&amp;#39;s only valid in a specific block, or other miners will just reorg&lt;br/&gt;&amp;gt; those&lt;br/&gt;&amp;gt; anyone-can-spend outputs to steal them. It&amp;#39;s not all that trivial to&lt;br/&gt;&amp;gt; actually&lt;br/&gt;&amp;gt; do that... you&amp;#39;d have to have a signature that commits to the non-segwit&lt;br/&gt;&amp;gt; part&lt;br/&gt;&amp;gt; of the coinbase outputs. Ugh.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://petertodd.org&#34;&gt;https://petertodd.org&lt;/a&gt; &amp;#39;peter&amp;#39;[:-1]@petertodd.org&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/20220711/2b9c824a/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220711/2b9c824a/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:11:42&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsd0dcst9z9xusy2kt2tlhv3zmmcunyyrf0xap5tf8cdeqh97cammczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596qaltjq</id>
    
      <title type="html">📅 Original date posted:2022-07-11 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsd0dcst9z9xusy2kt2tlhv3zmmcunyyrf0xap5tf8cdeqh97cammczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596qaltjq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst265y5uc4fs2k2lshxz5f409cw7xqe4f8yrvyq9js3w4k0jmnwwcpmdcga&#39;&gt;nevent1q…dcga&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-07-11&lt;br/&gt;📝 Original message:On Mon, Jul 11, 2022 at 2:19 PM Bram Cohen 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; If transaction fees came in at an even rate over time all at the exact&lt;br/&gt;&amp;gt; same level then they work fine for security, acting similarly to fixed&lt;br/&gt;&amp;gt; block rewards. Unfortunately that isn&amp;#39;t how it works in the real world.&lt;br/&gt;&amp;gt; There&amp;#39;s a very well established day/night cycle with fees going to zero&lt;br/&gt;&amp;gt; overnight and even longer gaps on weekends and holidays. If in the future&lt;br/&gt;&amp;gt; Bitcoin is entirely dependent on fees for security (scheduled very&lt;br/&gt;&amp;gt; strongly) and this pattern keeps up (overwhelmingly likely) then this is&lt;br/&gt;&amp;gt; going to become a serious problem.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What&amp;#39;s likely to happen is that at first there will simply be no or very&lt;br/&gt;&amp;gt; few blocks mined overnight. There are likely to be some, as miners at first&lt;br/&gt;&amp;gt; turn off their mining rigs completely overnight then adopt the more&lt;br/&gt;&amp;gt; sophisticated strategy of waiting until there are enough fees in the&lt;br/&gt;&amp;gt; mempool to warrant attempting to make a block and only then doing it.&lt;br/&gt;&amp;gt; Unfortunately the gaming doesn&amp;#39;t end there. Eventually the miners with&lt;br/&gt;&amp;gt; lower costs of operation will figure out that they can collectively reorg&lt;br/&gt;&amp;gt; the last hour (or some time period) of the day overnight and this will be&lt;br/&gt;&amp;gt; profitable. That&amp;#39;s likely to cause the miners with more expensive&lt;br/&gt;&amp;gt; operations to stop attempting mining the last hour of the day preemptively.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What happens after that I&amp;#39;m not sure.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Miners will learn to create anyone-can-spend outputs to bribe other miners&lt;br/&gt;to build on their block rather than reorg it.  (Due to the coinbase&lt;br/&gt;maturity, this will require some amount of floating capital.)&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/20220711/6e8e216d/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220711/6e8e216d/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:11:41&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0fjld0h5mh78cjh45ecmhvctljxasl8c9jrkzp9jufapplgwjw0gzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596dqy4xm</id>
    
      <title type="html">📅 Original date posted:2022-05-11 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0fjld0h5mh78cjh45ecmhvctljxasl8c9jrkzp9jufapplgwjw0gzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596dqy4xm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstw966l92ye7r63phjz4mdnun4m99gzyyyvceeajv4nwdu0j2w3zqu8mlz0&#39;&gt;nevent1q…mlz0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-05-11&lt;br/&gt;📝 Original message:Hi alicexbt,&lt;br/&gt;&lt;br/&gt;As far as I understand things, I believe the whole notion of a MUST_SIGNAL&lt;br/&gt;state is misguided today. Please correct me if I&amp;#39;m misunderstanding&lt;br/&gt;something here.&lt;br/&gt;&lt;br/&gt;Back when BIP8 was first proposed by Shaolin Fry, we were in a situation&lt;br/&gt;where many existing clients waiting for segwit signalling had already been&lt;br/&gt;deployed.  The purpose of mandatory signaling at that point in time was to&lt;br/&gt;ensure all these existing clients would be activated together with any BIP8&lt;br/&gt;clients.&lt;br/&gt;&lt;br/&gt;However, if such other clients do not exist, the MUST_SIGNAL state no&lt;br/&gt;longer accomplishes its purpose.  Going forward, I think there is little&lt;br/&gt;reason to expect such other clients to exist alongside a BIP8 deployment.&lt;br/&gt;If everyone uses a BIP8 deployment, then there are no other clients to&lt;br/&gt;activate.  Alternatively, Speedy Trial was specifically designed to avoid&lt;br/&gt;this parallel deployment for the reason that several people object to&lt;br/&gt;allowing their client&amp;#39;s non-BIP8 activation logic to be hijacked in this&lt;br/&gt;manner.&lt;br/&gt;&lt;br/&gt;Now I understand that some people would like *some* signal on the chain&lt;br/&gt;that indicates a soft-fork activation in order to allow people who object&lt;br/&gt;to the fork to make an &amp;#34;anti-fork&amp;#34; that rejects blocks containing the&lt;br/&gt;soft-fork signal.  And while some sort of mandatory version bit signaling&lt;br/&gt;*could* be used for this purpose, we do not *have* to use version bits.  We&lt;br/&gt;also don&amp;#39;t need such a signal span over multiple blocks.  Indeed, using&lt;br/&gt;version bits and signaling over multiple blocks is quite bad because it&lt;br/&gt;risks losing mining power if miners don&amp;#39;t conform, or are unable to&lt;br/&gt;conform, to the version bits signal.  (Recall at the time taproot&amp;#39;s&lt;br/&gt;signaling period started, the firmware needed for many miners to signal&lt;br/&gt;version bits did not even exist yet!).&lt;br/&gt;&lt;br/&gt;A soft-fork signal to enable an &amp;#34;anti-fork&amp;#34; only needs to be on a single&lt;br/&gt;block and it can be almost anything.  For example we could have a signal&lt;br/&gt;that at the block at lockin or perhaps the block at activation requires&lt;br/&gt;that the coinbase must *not* contain the suffix &amp;#34;taproot sucks!&amp;#34;.  This&lt;br/&gt;suffices to prepare an &amp;#34;anti-fork&amp;#34; which would simply require that the&lt;br/&gt;specified block must contain the suffix &amp;#34;taproot sucks!&amp;#34;.&lt;br/&gt;&lt;br/&gt;Anyway, I&amp;#39;m sure there are lots of design choices available better than a&lt;br/&gt;MUST_SIGNAL state that does not risk potentially taking a large fraction of&lt;br/&gt;mining hardware offline for a protracted period of time.&lt;br/&gt;&lt;br/&gt;On Tue, May 10, 2022 at 10:02 AM alicexbt 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 Bitcoin Developers,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There were some disagreements with speedy trial activation method recently&lt;br/&gt;&amp;gt; and BIP 8 became controversial because of LOT earlier. I have tried to&lt;br/&gt;&amp;gt; solve these two problems after reading some arguments for/against different&lt;br/&gt;&amp;gt; activation methods by removing LOT from BIP 8 and calculating MUST_SIGNAL&lt;br/&gt;&amp;gt; state based on threshold reached.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; BIP draft with no code and some changes in BIP 8:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://gist.github.com/1440000bytes/5e58cad7ba9d9c1a7000d304920fe6f1&#34;&gt;https://gist.github.com/1440000bytes/5e58cad7ba9d9c1a7000d304920fe6f1&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; State transitions diagram:  &lt;img src=&#34;https://i.imgur.com/dj4bFVK.png&#34;&gt; &lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This proposal removes lockinontimeout flag, activation never fails&lt;br/&gt;&amp;gt; although MUST_SIGNAL can be longer if miners signaling does not reach the&lt;br/&gt;&amp;gt; threshold. Longer period for MUST_SIGNAL state is useful for coordination&lt;br/&gt;&amp;gt; if LOCKED_IN was not reached.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; MUST_SIGNAL = ((100-t)/10)*2016 blocks, where t is threshold reached and&lt;br/&gt;&amp;gt; blocks that fail to signal in MUST_SIGNAL phase are invalid.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Example:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - This activation method is used for a soft fork&lt;br/&gt;&amp;gt; - Only 60% miners signaled readiness and timeout height was reached&lt;br/&gt;&amp;gt; - MUST_SIGNAL phase starts and will last for 4*2016 blocks&lt;br/&gt;&amp;gt; - LOCKED_IN and ACTIVE states remain same as BIP 8&lt;br/&gt;&amp;gt; - Soft fork is activated with a delay of 2 months&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; /dev/fd0&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sent with ProtonMail &amp;lt;&lt;a href=&#34;https://protonmail.com/&amp;gt&#34;&gt;https://protonmail.com/&amp;gt&lt;/a&gt;; secure email.&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/20220511/2cdd2915/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220511/2cdd2915/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:09:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0lnz5pt744l2430ltp8v78kw4z5z3xzehz70crdnl0vc46mxqpegzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5964cv23e</id>
    
      <title type="html">📅 Original date posted:2022-04-23 📝 Original message:Okay, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0lnz5pt744l2430ltp8v78kw4z5z3xzehz70crdnl0vc46mxqpegzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5964cv23e" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs968u37kadnlrutufranwfyud4xauqc0z590gy4dzyd8zehg8wclc46gjsf&#39;&gt;nevent1q…gjsf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-23&lt;br/&gt;📝 Original message:Okay, Matt explained to me the intended application of CTV vaults off list,&lt;br/&gt;so I have a better understanding now.&lt;br/&gt;&lt;br/&gt;The CTV vault scheme is designed as an improvement over the traditional&lt;br/&gt;management of hot-wallets and cold-wallets.  The CTV vault is logically on&lt;br/&gt;the &amp;#34;cold-side&amp;#34; and lets funds be sent from the &amp;#34;cold&amp;#34; side to *one&amp;#39;s own*&lt;br/&gt;the hot wallet after the unvaulting delay.  In this case, the hot wallet&lt;br/&gt;funds are always at risk, so it isn&amp;#39;t unexpected that those funds could be&lt;br/&gt;stolen.  After all, that is how hot wallets are today.  The advantage is&lt;br/&gt;that funds can be moved from the &amp;#34;cold&amp;#34; side without needing to dig out the&lt;br/&gt;cold keys.&lt;br/&gt;&lt;br/&gt;The MES vault scheme applies to a different scenario.  In the MES case it&lt;br/&gt;is the hot funds are inside the vault, and it is the hot key that unvaults&lt;br/&gt;the funds and sends them to *customer&amp;#39;s addresses* after a delay.  If the&lt;br/&gt;hot-key is used in any unauthorised way, then funds can be sent to the&lt;br/&gt;address of the cold key (the MES vault actually does something fancy in&lt;br/&gt;case of recovery, but it could be adapted to simply send funds to a cold&lt;br/&gt;wallet).&lt;br/&gt;&lt;br/&gt;The MES vault lie somewhere between &amp;#34;better&amp;#34; and &amp;#34;different&amp;#34; when compared&lt;br/&gt;to the CTV vault.  If one is unwilling to use the MES vault on the hot side&lt;br/&gt;and have every withdrawl vetted, then, while you could use the MES design&lt;br/&gt;on the cold side like the CTV vault, it wouldn&amp;#39;t really offer you any&lt;br/&gt;advantages over a CTV vault.  However, if you are interested in managing&lt;br/&gt;all your payments through a vault (as I&amp;#39;ve been imagining) then the CTV&lt;br/&gt;vault comes across as ineffective when compared to an MES style vault.&lt;br/&gt;&lt;br/&gt;On Sat, Apr 23, 2022 at 2:24 PM Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Still trying to make sure I understand this concern, let me know if I get&lt;br/&gt;&amp;gt; this all wrong.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On 4/22/22 10:25 AM, Russell O&amp;#39;Connor via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; It&amp;#39;s not the attackers *only choice to succeed*.  If an attacker steals&lt;br/&gt;&amp;gt; the hot key, then they have&lt;br/&gt;&amp;gt; &amp;gt; the option to simply wait for the user to unvault their funds of their&lt;br/&gt;&amp;gt; own accord and then race /&lt;br/&gt;&amp;gt; &amp;gt; outspend the users transaction with their own.  Indeed, this is what we&lt;br/&gt;&amp;gt; expect would happen in the&lt;br/&gt;&amp;gt; &amp;gt; dark forest.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Right, a key security assumption of the CTV-based vaults would be that you&lt;br/&gt;&amp;gt; MUST NOT EVER withdraw&lt;br/&gt;&amp;gt; more in one go than your hot wallet risk tolerance, but given that your&lt;br/&gt;&amp;gt; attack isn&amp;#39;t any worse than&lt;br/&gt;&amp;gt; simply stealing the hot wallet key immediately after a withdraw.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It does have the drawback that if you ever get a hot wallet key stole you&lt;br/&gt;&amp;gt; have to rotate all of your&lt;br/&gt;&amp;gt; CTV outputs and your CTV outputs must never be any larger than your hot&lt;br/&gt;&amp;gt; wallet risk tolerance&lt;br/&gt;&amp;gt; amount, both of which are somewhat frustrating limitations, but not&lt;br/&gt;&amp;gt; security limitations, only&lt;br/&gt;&amp;gt; practical ones.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; And that&amp;#39;s not even mentioning the issues already noted by the document&lt;br/&gt;&amp;gt; regarding fee management,&lt;br/&gt;&amp;gt; &amp;gt; which would likely also benefit from a less constrained design for&lt;br/&gt;&amp;gt; covenants.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course I&amp;#39;ve always been in favor of a less constrained covenants design&lt;br/&gt;&amp;gt; from day one for ten&lt;br/&gt;&amp;gt; reasons, but that&amp;#39;s a whole other rabbit hole :)&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/20220423/8077c9f2/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220423/8077c9f2/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:07:44&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrq536ed4yg6c4630a5pl3u43uzf7q68aphm0mvp5xlly06qznkzczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596e7h043</id>
    
      <title type="html">📅 Original date posted:2022-04-23 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrq536ed4yg6c4630a5pl3u43uzf7q68aphm0mvp5xlly06qznkzczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596e7h043" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdk6kh2rs76kp5ks9s7wq7nkadncfjxymdr25uxlqlhk985dlwqqggnwe2h&#39;&gt;nevent1q…we2h&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-23&lt;br/&gt;📝 Original message:On Sat, Apr 23, 2022 at 12:56 AM Billy Tetrud &amp;lt;billy.tetrud at gmail.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; If an attacker steals the hot key, then they have the option to simply&lt;br/&gt;&amp;gt; wait for the user to unvault their funds&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is definitely true. Its kind of a problem with most vault proposals.&lt;br/&gt;&amp;gt; Its one of the primary reasons I designed an alternative proposal&lt;br/&gt;&amp;gt; &amp;lt;&lt;a href=&#34;https://github.com/fresheneesz/bip-efficient-bitcoin-vaults&amp;gt&#34;&gt;https://github.com/fresheneesz/bip-efficient-bitcoin-vaults&amp;gt&lt;/a&gt;;. The&lt;br/&gt;&amp;gt; OP_BEFOREBLOCKVERIFY opcode I proposed solves this security hole by&lt;br/&gt;&amp;gt; automatically swapping control of the UTXO over to the intended recipient&lt;br/&gt;&amp;gt; after a timeout. Alternatively, if OP_BBV weren&amp;#39;t available, OP_POS in&lt;br/&gt;&amp;gt; conjunction with OP_CD could encode things such that the transaction&lt;br/&gt;&amp;gt; with the hot key could only spend to the intended recipient.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m curious if there are any other covenant proposals that have a solution&lt;br/&gt;&amp;gt; to that problem. I&amp;#39;m not aware of any that do other than my proposal.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;As I noted, the original MES vault&lt;br/&gt;&lt;a href=&#34;https://fc16.ifca.ai/bitcoin/papers/MES16.pdf&#34;&gt;https://fc16.ifca.ai/bitcoin/papers/MES16.pdf&lt;/a&gt;, commits to the destination&lt;br/&gt;address during unvaulting.  Their proposal uses CheckOutputVerify that&lt;br/&gt;checks if a given output has a given amount and a given scriptPubKey.  (The&lt;br/&gt;MES vault then goes on to add a PATTERN parameter to OP_COV&amp;#39;s scriptPubKey&lt;br/&gt;parameter in order to make a recursive vault, but that is used to deter&lt;br/&gt;cold-key theft, not hot-key theft).&lt;br/&gt;&lt;br/&gt;Our paper &lt;a href=&#34;https://fc17.ifca.ai/bitcoin/papers/bitcoin17-final28.pdf&#34;&gt;https://fc17.ifca.ai/bitcoin/papers/bitcoin17-final28.pdf&lt;/a&gt;&lt;br/&gt;impelments the MES vault in Elements (alpha) using CAT and&lt;br/&gt;CHECKSIGFROMSTACK.  While I wouldn&amp;#39;t necessarily call it a covenant&lt;br/&gt;proposal, rather it is an observation that these opcodes happen to be&lt;br/&gt;adequate for the task.&lt;br/&gt;&lt;br/&gt;With such a big security caveat, I really don&amp;#39;t find CTV vaults a&lt;br/&gt;compelling example of using CTV.  Sure, if CTV happens to exist, by all&lt;br/&gt;means do whatever you like.  But if anything, the CTV vault scheme instead&lt;br/&gt;illustrates BlueMatt&amp;#39;s point that we aren&amp;#39;t really finished with covenant&lt;br/&gt;research design yet:&lt;br/&gt;&lt;br/&gt;Q: What ways can we build a secured vault that commits to the destination&lt;br/&gt;address?&lt;br/&gt;Q: Are there elegant ways of building secure vaults by using CTV plus&lt;br/&gt;something else.  Presumably CAT &#43; CTV would be enough, though maybe some&lt;br/&gt;people are concerned that CAT might enable recursive covenants (if people&lt;br/&gt;aren&amp;#39;t willing to have even CAT, I don&amp;#39;t see how we will ever really have&lt;br/&gt;programmable money).&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/20220423/4e7b865d/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220423/4e7b865d/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:07:44&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsye68gj5vamkhzh82v76mj8q8drl7nktnr74a4w7wwp7ue68fwc6czyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596quk76w</id>
    
      <title type="html">📅 Original date posted:2022-04-22 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsye68gj5vamkhzh82v76mj8q8drl7nktnr74a4w7wwp7ue68fwc6czyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596quk76w" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsga5w9mukccnqhmxrw8jakx9zulwwt26ufqpn7pe8srjgla9xejxcd46trn&#39;&gt;nevent1q…6trn&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-22&lt;br/&gt;📝 Original message:On Fri, Apr 22, 2022 at 12:29 PM James O&amp;#39;Beirne 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 vault design (&lt;a href=&#34;https://github.com/jamesob/simple-ctv-vault&#34;&gt;https://github.com/jamesob/simple-ctv-vault&lt;/a&gt;)&lt;br/&gt;&amp;gt; is a good benchmark for evaluating covenant proposals because it&amp;#39;s (i)&lt;br/&gt;&amp;gt; simple and (ii) has high utility for many users of Bitcoin. I would&lt;br/&gt;&amp;gt; love to see it implemented in one or all of these alternatives, but I&lt;br/&gt;&amp;gt; am almost certain no one will do it in the next few months because the&lt;br/&gt;&amp;gt; implementations, tooling, and in some cases even complete&lt;br/&gt;&amp;gt; specifications do not exist.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Quoting from the link above:&lt;br/&gt;Detecting theft&lt;br/&gt;&lt;br/&gt;This unvault step is critical because it allows us to detect unexpected&lt;br/&gt;behavior. If an attacker had stolen our hot wallet keys, their only choice&lt;br/&gt;to succeed in the theft is to trigger an unvault.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;It&amp;#39;s not the attackers *only choice to succeed*.  If an attacker steals the&lt;br/&gt;hot key, then they have the option to simply wait for the user to unvault&lt;br/&gt;their funds of their own accord and then race / outspend the users&lt;br/&gt;transaction with their own.  Indeed, this is what we expect would happen in&lt;br/&gt;the dark forest.&lt;br/&gt;&lt;br/&gt;A key feature of the MES vault design is that the destination address is&lt;br/&gt;included, and committed to, by the unvaulting step.  However, this can only&lt;br/&gt;be achieved with a less constrained design for covenants.&lt;br/&gt;&lt;br/&gt;I suppose I can see that the damage from a hot key theft could be more&lt;br/&gt;contained under some circumstances using a CTV vault, but let us not&lt;br/&gt;overstate the value of the CTV vault.&lt;br/&gt;&lt;br/&gt;And that&amp;#39;s not even mentioning the issues already noted by the document&lt;br/&gt;regarding fee management, which would likely also benefit from a less&lt;br/&gt;constrained design for covenants.&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/20220422/a55ab1e9/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220422/a55ab1e9/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:07:43&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgevazjw237tpmwrg4sxmt0jspfmus2kg7xfl8p9xtq3hky3arqlczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5966f5fqe</id>
    
      <title type="html">📅 Original date posted:2022-03-22 📝 Original message:Thanks ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgevazjw237tpmwrg4sxmt0jspfmus2kg7xfl8p9xtq3hky3arqlczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5966f5fqe" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs20xfauvsrp2wd74ej0jfhmrl8h54hrjq8386dye8cwmfc2dkc4kc67lzvw&#39;&gt;nevent1q…lzvw&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-22&lt;br/&gt;📝 Original message:Thanks for the clarification.&lt;br/&gt;&lt;br/&gt;You don&amp;#39;t think referring to the microcode via its hash, effectively using&lt;br/&gt;32-byte encoding of opcodes, is still rather long winded?&lt;br/&gt;&lt;br/&gt;On Tue, Mar 22, 2022 at 12:23 PM ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Russell,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Setting aside my thoughts that something like Simplicity would make a&lt;br/&gt;&amp;gt; better platform than Bitcoin Script (due to expression operating on a more&lt;br/&gt;&amp;gt; narrow interface than the entire stack (I&amp;#39;m looking at you OP_DEPTH)) there&lt;br/&gt;&amp;gt; is an issue with namespace management.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If I understand correctly, your implication was that once opcodes are&lt;br/&gt;&amp;gt; redefined by an OP_RETURN transaction, subsequent transactions of that&lt;br/&gt;&amp;gt; opcode refer to the new microtransaction.  But then we have a race&lt;br/&gt;&amp;gt; condition between people submitting transactions expecting the outputs to&lt;br/&gt;&amp;gt; refer to the old code and having their code redefined by the time they do&lt;br/&gt;&amp;gt; get confirmed  (or worse having them reorged).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; No, use of specific microcodes is opt-in: you have to use a specific&lt;br/&gt;&amp;gt; `0xce` Tapscript version, ***and*** refer to the microcode you want to use&lt;br/&gt;&amp;gt; via the hash of the microcode.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The only race condition is reorging out a newly-defined microcode.&lt;br/&gt;&amp;gt; This can be avoided by waiting for deep confirmation of a newly-defined&lt;br/&gt;&amp;gt; microcode before actually using it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But once the microcode introduction outpoint of a particular microcode has&lt;br/&gt;&amp;gt; been deeply confirmed, then your Tapscript can refer to the microcode, and&lt;br/&gt;&amp;gt; its meaning does not change.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Fullnodes may need to maintain multiple microcodes, which is why creating&lt;br/&gt;&amp;gt; new microcodes is expensive; they not only require JIT compilation, they&lt;br/&gt;&amp;gt; also require that fullnodes keep an index that cannot have items deleted.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The advantage of the microcode scheme is that the size of the SCRIPT can&lt;br/&gt;&amp;gt; be used as a proxy for CPU load ---- just as it is done for current Bitcoin&lt;br/&gt;&amp;gt; SCRIPT.&lt;br/&gt;&amp;gt; As long as the number of `UOP_` micro-opcodes that an `OP_` code can&lt;br/&gt;&amp;gt; expand to is bounded, and we avoid looping constructs, then the CPU load is&lt;br/&gt;&amp;gt; also bounded and the size of the SCRIPT approximates the amount of&lt;br/&gt;&amp;gt; processing needed, thus microcode does not require a softfork to modify&lt;br/&gt;&amp;gt; weight calculations in the future.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- 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/20220322/4fd9e0be/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220322/4fd9e0be/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:06:34&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqst07z9ugfutcqydzuj9t4n4jf92vqd4akp7z23uyv5vts200nx9jgzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596muqnfz</id>
    
      <title type="html">📅 Original date posted:2022-03-22 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqst07z9ugfutcqydzuj9t4n4jf92vqd4akp7z23uyv5vts200nx9jgzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596muqnfz" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvtfega2sy7k4tklnr9s9k3r9akvgk9w3269umn4avyynalmu30xqzjvaua&#39;&gt;nevent1q…vaua&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-22&lt;br/&gt;📝 Original message:Setting aside my thoughts that something like Simplicity would make a&lt;br/&gt;better platform than Bitcoin Script (due to expression operating on a more&lt;br/&gt;narrow interface than the entire stack (I&amp;#39;m looking at you OP_DEPTH)) there&lt;br/&gt;is an issue with namespace management.&lt;br/&gt;&lt;br/&gt;If I understand correctly, your implication was that once opcodes are&lt;br/&gt;redefined by an OP_RETURN transaction, subsequent transactions of that&lt;br/&gt;opcode refer to the new microtransaction.  But then we have a race&lt;br/&gt;condition between people submitting transactions expecting the outputs to&lt;br/&gt;refer to the old code and having their code redefined by the time they do&lt;br/&gt;get confirmed  (or worse having them reorged).&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve partially addressed this issue in my Simplicity design where the&lt;br/&gt;commitment of a Simplicity program in a scriptpubkey covers the hash of the&lt;br/&gt;specification of the jets used, which makes commits unambiguously to the&lt;br/&gt;semantics (rightly or wrongly).  But the issue resurfaces at redemption&lt;br/&gt;time where I (currently) have a consensus critical map of codes to jets&lt;br/&gt;that is used to decode the witness data into a Simplicity program.  If one&lt;br/&gt;were to allow this map of codes to jets to be replaced (rather than just&lt;br/&gt;extended) then it would cause redemption to fail, because the hash of the&lt;br/&gt;new jets would no longer match the hash of the jets appearing the the&lt;br/&gt;input&amp;#39;s scriptpubkey commitment.  While this is still not good and I don&amp;#39;t&lt;br/&gt;recommend it, it is probably better than letting the semantics of your&lt;br/&gt;programs be changed out from under you.&lt;br/&gt;&lt;br/&gt;This comment is not meant as an endorsement of ths idea, which is a little&lt;br/&gt;bit out there, at least as far as Bitcoin is concerned. :)&lt;br/&gt;&lt;br/&gt;My long term plans are to move this consensus critical map of codes out of&lt;br/&gt;the consensus layer and into the p2p layer where peers can negotiate their&lt;br/&gt;own encodings between each other.  But that plan is also a little bit out&lt;br/&gt;there, and it still doesn&amp;#39;t solve the issue of how to weight reused jets,&lt;br/&gt;where weight is still consensus critical.&lt;br/&gt;&lt;br/&gt;On Tue, Mar 22, 2022 at 1:37 AM ZmnSCPxj 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; Good morning list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It is entirely possible that I have gotten into the deep end and am now&lt;br/&gt;&amp;gt; drowning in insanity, but here goes....&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Subject: Beyond Jets: Microcode: Consensus-Critical Jets Without Softforks&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Introduction&lt;br/&gt;&amp;gt; ============&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Recent (Early 2022) discussions on the bitcoin-dev mailing&lt;br/&gt;&amp;gt; list have largely focused on new constructs that enable new&lt;br/&gt;&amp;gt; functionality.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; One general idea can be summarized this way:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * We should provide a very general language.&lt;br/&gt;&amp;gt;   * Then later, once we have learned how to use this language,&lt;br/&gt;&amp;gt;     we can softfork in new opcodes that compress sections of&lt;br/&gt;&amp;gt;     programs written in this general language.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There are two arguments against this style:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1.  One of the most powerful arguments the &amp;#34;general&amp;#34; side of&lt;br/&gt;&amp;gt;     the &amp;#34;general v specific&amp;#34; debate is that softforks are&lt;br/&gt;&amp;gt;     painful because people are going to keep reiterating the&lt;br/&gt;&amp;gt;     activation parameters debate in a memoryless process, so&lt;br/&gt;&amp;gt;     we want to keep the number of softforks low.&lt;br/&gt;&amp;gt;     * So, we should just provide a very general language and&lt;br/&gt;&amp;gt;       never softfork in any other change ever again.&lt;br/&gt;&amp;gt; 2.  One of the most powerful arguments the &amp;#34;general&amp;#34; side of&lt;br/&gt;&amp;gt;     the &amp;#34;general v specific&amp;#34; debate is that softforks are&lt;br/&gt;&amp;gt;     painful because people are going to keep reiterating the&lt;br/&gt;&amp;gt;     activation parameters debate in a memoryless process, so&lt;br/&gt;&amp;gt;     we want to keep the number of softforks low.&lt;br/&gt;&amp;gt;     * So, we should just skip over the initial very general&lt;br/&gt;&amp;gt;       language and individually activate small, specific&lt;br/&gt;&amp;gt;       constructs, reducing the needed softforks by one.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; By taking a page from microprocessor design, it seems to me&lt;br/&gt;&amp;gt; that we can use the same above general idea (a general base&lt;br/&gt;&amp;gt; language where we later &amp;#34;bless&amp;#34; some sequence of operations)&lt;br/&gt;&amp;gt; while avoiding some of the arguments against it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Digression: Microcodes In CISC Microprocessors&lt;br/&gt;&amp;gt; ----------------------------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the 1980s and 1990s, two competing microprocessor design&lt;br/&gt;&amp;gt; paradigms arose:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Complex Instruction Set Computing (CISC)&lt;br/&gt;&amp;gt;   - Few registers, many addressing/indexing modes, variable&lt;br/&gt;&amp;gt;     instruction length, many obscure instructions.&lt;br/&gt;&amp;gt; * Reduced Instruction Set Computing (RISC)&lt;br/&gt;&amp;gt;   - Many registers, usually only immediate and indexed&lt;br/&gt;&amp;gt;     addressing modes, fixed instruction length, few&lt;br/&gt;&amp;gt;     instructions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In CISC, the microprocessor provides very application-specific&lt;br/&gt;&amp;gt; instructions, often with a small number of registers with&lt;br/&gt;&amp;gt; specific uses.&lt;br/&gt;&amp;gt; The instruction set was complicated, and often required&lt;br/&gt;&amp;gt; multiple specific circuits for each application-specific&lt;br/&gt;&amp;gt; instruction.&lt;br/&gt;&amp;gt; Instructions had varying sizes and varying number of cycles.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In RISC, the micrprocessor provides fewer instructions, and&lt;br/&gt;&amp;gt; programmers (or compilers) are supposed to generate the code&lt;br/&gt;&amp;gt; for all application-specific needs.&lt;br/&gt;&amp;gt; The processor provided large register banks which could be&lt;br/&gt;&amp;gt; used very generically and interchangeably.&lt;br/&gt;&amp;gt; Instructions had the same size and every instruction took a&lt;br/&gt;&amp;gt; fixed number of cycles.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In CISC you usually had shorter code which could be written&lt;br/&gt;&amp;gt; by human programmers in assembly language or machine language.&lt;br/&gt;&amp;gt; In RISC, you generally had longer code, often difficult for&lt;br/&gt;&amp;gt; human programmers to write, and you *needed* a compiler to&lt;br/&gt;&amp;gt; generate it (unless you were very careful, or insane enough&lt;br/&gt;&amp;gt; you could scroll over multiple pages of instructions without&lt;br/&gt;&amp;gt; becoming more insane), or else you might forget about stuff&lt;br/&gt;&amp;gt; like jump slots.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For the most part, RISC lost, since most modern processors&lt;br/&gt;&amp;gt; today are x86 or x86-64, an instruction set with varying&lt;br/&gt;&amp;gt; instruction sizes, varying number of cycles per instruction,&lt;br/&gt;&amp;gt; and complex instructions with application-specific uses.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Or at least, it *looks like* RISC lost.&lt;br/&gt;&amp;gt; In the 90s, Intel was struggling since their big beefy CISC&lt;br/&gt;&amp;gt; designs were becoming too complicated.&lt;br/&gt;&amp;gt; Bugs got past testing and into mass-produced silicon.&lt;br/&gt;&amp;gt; RISC processors were beating the pants off 386s in terms of&lt;br/&gt;&amp;gt; raw number of computations per second.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; RISC processors had the major advantage that they were&lt;br/&gt;&amp;gt; inherently simpler, due to having fewer specific circuits&lt;br/&gt;&amp;gt; and filling up their silicon with general-purpose registers&lt;br/&gt;&amp;gt; (which are large but very simple circuits) to compensate.&lt;br/&gt;&amp;gt; This meant that processor designers could fit more of the&lt;br/&gt;&amp;gt; design in their merely human meat brains, and were less&lt;br/&gt;&amp;gt; likely to make mistakes.&lt;br/&gt;&amp;gt; The fixed number of cycles per instruction made it trivial&lt;br/&gt;&amp;gt; to create a fixed-length pipeline for instruction processing,&lt;br/&gt;&amp;gt; and practical RISC processors could deliver one instruction&lt;br/&gt;&amp;gt; per clock cycle.&lt;br/&gt;&amp;gt; Worse, the simplicity of RISC meant that smaller and less&lt;br/&gt;&amp;gt; experienced teams could produce viable competitors to the&lt;br/&gt;&amp;gt; Intel x86s.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So what Intel did was to use a RISC processor, and add a&lt;br/&gt;&amp;gt; special Instruction Decoder unit.&lt;br/&gt;&amp;gt; The Instruction Decoder would take the CISC instruction&lt;br/&gt;&amp;gt; stream accepted by classic Intel x86 processors, and emit&lt;br/&gt;&amp;gt; RISC instructions for the internal RISC processor.&lt;br/&gt;&amp;gt; CISC instructions might be variable length and have variable&lt;br/&gt;&amp;gt; number of cycles, but the emitted RISC instructions were&lt;br/&gt;&amp;gt; individually fixed length and fixed number of cycles.&lt;br/&gt;&amp;gt; A CISC instruction might be equivalent to a single RISC&lt;br/&gt;&amp;gt; instruction, or several.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With this technique, Intel could deliver performance&lt;br/&gt;&amp;gt; approaching their RISC-only competition, while retaining&lt;br/&gt;&amp;gt; back-compatibility with existing software written for their&lt;br/&gt;&amp;gt; classic CISC processors.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; At its core, the Instruction Decoder was a table-driven&lt;br/&gt;&amp;gt; parser.&lt;br/&gt;&amp;gt; This lookup table could be stored into on-chip flash memory.&lt;br/&gt;&amp;gt; This had the advantage that the on-chip flash memory could be&lt;br/&gt;&amp;gt; updated in case of bugs in the implementation of CISC&lt;br/&gt;&amp;gt; instructions.&lt;br/&gt;&amp;gt; This on-chip flash memory was then termed &amp;#34;microcode&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Important advantages of this &amp;#34;microcode&amp;#34; technique were:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Back-compatibility with existing instruction sets.&lt;br/&gt;&amp;gt; * Easier and more scalable underlying design due to ability&lt;br/&gt;&amp;gt;   to use RISC techniques while still supporting CISC instruction&lt;br/&gt;&amp;gt;   sets.&lt;br/&gt;&amp;gt; * Possible to fix bugs in implementations of complex CISC&lt;br/&gt;&amp;gt;   instructions by uploading new microcode.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (Obviously I have elided a bunch of stuff, but the above&lt;br/&gt;&amp;gt; rough sketch should be sufficient as introduction.)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bitcoin Consensus Layer As Hardware&lt;br/&gt;&amp;gt; -----------------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; While Bitcoin fullnode implementations are software, because&lt;br/&gt;&amp;gt; of the need for consensus, this software is not actually very&lt;br/&gt;&amp;gt; &amp;#34;soft&amp;#34;.&lt;br/&gt;&amp;gt; One can consider that, just as it would take a long time for&lt;br/&gt;&amp;gt; new hardware to be designed with a changed instruction set,&lt;br/&gt;&amp;gt; it is similarly taking a long time to change Bitcoin to&lt;br/&gt;&amp;gt; support changed feature sets.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, we should really consider the Bitcoin consensus layer,&lt;br/&gt;&amp;gt; and its SCRIPT, as hardware that other Bitcoin software and&lt;br/&gt;&amp;gt; layers run on top of.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This thus opens up the thought of using techniques that were&lt;br/&gt;&amp;gt; useful in hardware design.&lt;br/&gt;&amp;gt; Such as microcode: a translation layer from &amp;#34;old&amp;#34; instruction&lt;br/&gt;&amp;gt; sets to &amp;#34;new&amp;#34; instruction sets, with the ability to modify this&lt;br/&gt;&amp;gt; mapping.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Microcode For Bitcoin SCRIPT&lt;br/&gt;&amp;gt; ============================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I propose:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Define a generic, low-level language (the &amp;#34;RISC language&amp;#34;).&lt;br/&gt;&amp;gt; * Define a mapping from a specific, high-level language to&lt;br/&gt;&amp;gt;   the above language (the microcode).&lt;br/&gt;&amp;gt; * Allow users to sacrifice Bitcoins to define a new microcode.&lt;br/&gt;&amp;gt; * Have users indicate the microcode they wish to use to&lt;br/&gt;&amp;gt;   interpret their Tapscripts.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As a concrete example, let us consider the current Bitcoin&lt;br/&gt;&amp;gt; SCRIPT as the &amp;#34;CISC&amp;#34; language.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We can then support a &amp;#34;RISC&amp;#34; language that is composed of&lt;br/&gt;&amp;gt; general instructions, such as arithmetic, SECP256K1 scalar&lt;br/&gt;&amp;gt; and point math, bytevector concatenation, sha256 midstates,&lt;br/&gt;&amp;gt; bytevector bit manipulation, transaction introspection, and&lt;br/&gt;&amp;gt; so on.&lt;br/&gt;&amp;gt; This &amp;#34;RISC&amp;#34; language would also be stack-based.&lt;br/&gt;&amp;gt; As the &amp;#34;RISC&amp;#34; language would have more possible opcodes,&lt;br/&gt;&amp;gt; we may need to use 2-byte opcodes for the &amp;#34;RISC&amp;#34; language&lt;br/&gt;&amp;gt; instead of 1-byte opcodes.&lt;br/&gt;&amp;gt; Let us call this &amp;#34;RISC&amp;#34; language the micro-opcode language.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then, the &amp;#34;microcode&amp;#34; simply maps the existing Bitcoin&lt;br/&gt;&amp;gt; SCRIPT `OP_` codes to one or more `UOP_` micro-opcodes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; An interesting fact is that stack-based languages have&lt;br/&gt;&amp;gt; automatic referential transparency; that is, if I define&lt;br/&gt;&amp;gt; some new word in a stack-based language and use that word,&lt;br/&gt;&amp;gt; I can replace verbatim the text of the new word in that&lt;br/&gt;&amp;gt; place without issue.&lt;br/&gt;&amp;gt; Compare this to a language like C, where macro authors&lt;br/&gt;&amp;gt; have to be very careful about inadvertent variable&lt;br/&gt;&amp;gt; capture, wrapping `do { ... } while(0)` to avoid problems&lt;br/&gt;&amp;gt; with `if` and multiple statements, multiple execution, and&lt;br/&gt;&amp;gt; so on.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, a sequence of `OP_` opcodes can be mapped to a&lt;br/&gt;&amp;gt; sequence of equivalent `UOP_` micro-opcodes without&lt;br/&gt;&amp;gt; changing the interpretation of the source language, an&lt;br/&gt;&amp;gt; important property when considering such a &amp;#34;compiled&amp;#34;&lt;br/&gt;&amp;gt; language.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We start with a default microcode which is equivalent&lt;br/&gt;&amp;gt; to the current Bitcoin language.&lt;br/&gt;&amp;gt; When users want to define a new microcode to implement&lt;br/&gt;&amp;gt; new `OP_` codes or change existing `OP_` codes, they&lt;br/&gt;&amp;gt; can refer to a &amp;#34;base&amp;#34; microcode, and only have to&lt;br/&gt;&amp;gt; provide the new mappings.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A microcode is fundamentally just a mapping from an&lt;br/&gt;&amp;gt; `OP_` code to a variable-length sequence of `UOP_`&lt;br/&gt;&amp;gt; micro-opcodes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ```Haskell&lt;br/&gt;&amp;gt; import Data.Map&lt;br/&gt;&amp;gt; -- type Opcode&lt;br/&gt;&amp;gt; -- type UOpcode&lt;br/&gt;&amp;gt; newtype Microcode = Microcode (Map.Map Opcode [UOpcode])&lt;br/&gt;&amp;gt; ```&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Semantically, the SCRIPT interpreter processes `UOP_`&lt;br/&gt;&amp;gt; micro-opcodes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ```Haskell&lt;br/&gt;&amp;gt; -- instance Monad Interpreter -- can `fail`.&lt;br/&gt;&amp;gt; interpreter :: Transaction -&amp;gt; TxInput -&amp;gt; [UOpcode] -&amp;gt; Interpreter ()&lt;br/&gt;&amp;gt; ```&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Example&lt;br/&gt;&amp;gt; -------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Suppose a user wants to re-enable `OP_CAT`, and nothing&lt;br/&gt;&amp;gt; else.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That user creates a microcode, referring to the current&lt;br/&gt;&amp;gt; default Bitcoin SCRIPT microcode as the &amp;#34;base&amp;#34;.&lt;br/&gt;&amp;gt; The base microcode defines `OP_CAT` as equal to the&lt;br/&gt;&amp;gt; sequence `UOP_FAIL` i.e. a micro-opcode that always fails.&lt;br/&gt;&amp;gt; However, the new microcode will instead redefine the&lt;br/&gt;&amp;gt; `OP_CAT` as the micro-opcode sequence `UOP_CAT`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Microcodes then have a standard way of being represented&lt;br/&gt;&amp;gt; as a byte sequence.&lt;br/&gt;&amp;gt; The user serializes their new microcode as a byte&lt;br/&gt;&amp;gt; sequence.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then, the user creates a new transaction where one of&lt;br/&gt;&amp;gt; the outputs contains, say, 1.0 Bitcoins (exact required&lt;br/&gt;&amp;gt; value TBD), and has the `scriptPubKey` of&lt;br/&gt;&amp;gt; `OP_TRUE OP_RETURN &amp;lt;serialized_microcode&amp;gt;`.&lt;br/&gt;&amp;gt; This output is a &amp;#34;microcode introduction output&amp;#34;, which&lt;br/&gt;&amp;gt; is provably unspendable, thus burning the Bitcoins.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (It need not be a single user, multiple users can&lt;br/&gt;&amp;gt; coordinate by signing a single transaction that commits&lt;br/&gt;&amp;gt; their funds to the microcode introduction.)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Once the above transaction has been deeply confirmed,&lt;br/&gt;&amp;gt; the user can then take the hash of the microcode&lt;br/&gt;&amp;gt; serialization.&lt;br/&gt;&amp;gt; Then the user can use a SCRIPT with `OP_CAT` enabled,&lt;br/&gt;&amp;gt; by using a Tapscript with, say, version `0xce`, and&lt;br/&gt;&amp;gt; with the SCRIPT having the microcode hash as its first&lt;br/&gt;&amp;gt; bytes, followed by the `OP_` codes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Fullnodes will then process recognized microcode&lt;br/&gt;&amp;gt; introduction outputs and store mappings from their&lt;br/&gt;&amp;gt; hashes to the microcodes in a new microcodes index.&lt;br/&gt;&amp;gt; Fullnodes can then process version-`0xce` Tapscripts&lt;br/&gt;&amp;gt; by checking if the microcodes index has the indicated&lt;br/&gt;&amp;gt; microcode hash.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Semantically, fullnodes take the SCRIPT, and for each&lt;br/&gt;&amp;gt; `OP_` code in it, expands it to a sequence of `UOP_`&lt;br/&gt;&amp;gt; micro-opcodes, then concatenates each such sequence.&lt;br/&gt;&amp;gt; Then, the SCRIPT interpreter operates over a sequence&lt;br/&gt;&amp;gt; of `UOP_` micro-opcodes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Optimizing Microcodes&lt;br/&gt;&amp;gt; ---------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Suppose there is some new microcode that users have&lt;br/&gt;&amp;gt; published onchain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We want to be able to execute the defined microcode&lt;br/&gt;&amp;gt; faster than expanding an `OP_`-code SCRIPT to a&lt;br/&gt;&amp;gt; `UOP_`-code SCRIPT and having an interpreter loop&lt;br/&gt;&amp;gt; over the `UOP_`-code SCRIPT.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We can use LLVM.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; WARNING: LLVM might not be appropriate for&lt;br/&gt;&amp;gt; network-facing security-sensitive applications.&lt;br/&gt;&amp;gt; In particular, LLVM bugs. especially nondeterminism&lt;br/&gt;&amp;gt; bugs, can lead to consensus divergence and disastrous&lt;br/&gt;&amp;gt; chainsplits!&lt;br/&gt;&amp;gt; On the other hand, LLVM bugs are compiler bugs and&lt;br/&gt;&amp;gt; the same bugs can hit the static compiler `cc`, too,&lt;br/&gt;&amp;gt; since the same LLVM code runs in both JIT and static&lt;br/&gt;&amp;gt; compilation, so this risk already exists for Bitcoin.&lt;br/&gt;&amp;gt; (i.e. we already rely on LLVM not being buggy enough&lt;br/&gt;&amp;gt; to trigger Bitcoin consensus divergence, else we would&lt;br/&gt;&amp;gt; have written Bitcoin Core SCRIPT interpreter in&lt;br/&gt;&amp;gt; assembly.)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Each `UOP_`-code has an equivalent tree of LLVM code.&lt;br/&gt;&amp;gt; For each `Opcode` in the microcode, we take its&lt;br/&gt;&amp;gt; sequence of `UOpcode`s and expand them to this tree,&lt;br/&gt;&amp;gt; concatenating the equivalent trees for each `UOpcode`&lt;br/&gt;&amp;gt; in the sequence.&lt;br/&gt;&amp;gt; Then we ask LLVM to JIT-compile this code to a new&lt;br/&gt;&amp;gt; function, running LLVM-provided optimizers.&lt;br/&gt;&amp;gt; Then we put a pointer to this compiled function to a&lt;br/&gt;&amp;gt; 256-long array of functions, where the array index is&lt;br/&gt;&amp;gt; the `OP_` code.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The SCRIPT interpreter then simply iterates over the&lt;br/&gt;&amp;gt; `OP_` code SCRIPT and calls each of the JIT-compiled&lt;br/&gt;&amp;gt; functions.&lt;br/&gt;&amp;gt; This reduces much of the overhead of the `UOP_` layer&lt;br/&gt;&amp;gt; and makes it approach the current performance of the&lt;br/&gt;&amp;gt; existing `OP_` interpreter.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For the default Bitcoin SCRIPT, the opcodes array&lt;br/&gt;&amp;gt; contains pointers to statically-compiled functions.&lt;br/&gt;&amp;gt; A microcode that is based on the default Bitcoin&lt;br/&gt;&amp;gt; SCRIPT copies this opcodes array, then overwrites&lt;br/&gt;&amp;gt; the entries.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Future versions of Bitcoin Core can &amp;#34;bless&amp;#34;&lt;br/&gt;&amp;gt; particular microcodes by providing statically-compiled&lt;br/&gt;&amp;gt; functions for those microcodes.&lt;br/&gt;&amp;gt; This leads to even better performance (there is&lt;br/&gt;&amp;gt; no need to recompile ancient onchain microcodes each&lt;br/&gt;&amp;gt; time Bitcoin Core starts) without any consensus&lt;br/&gt;&amp;gt; divergence.&lt;br/&gt;&amp;gt; It is a pure optimization and does not imply a&lt;br/&gt;&amp;gt; tightening of rules, and is thus not a softfork.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (To reduce the chance of network faults being used&lt;br/&gt;&amp;gt; to poke into `W|X` memory (since `W|X` memory is&lt;br/&gt;&amp;gt; needed in order to actually JIT compile) we can&lt;br/&gt;&amp;gt; isolate the SCRIPT interpreter into its own process&lt;br/&gt;&amp;gt; separate from the network-facing code.&lt;br/&gt;&amp;gt; This does imply additional overhead in serializing&lt;br/&gt;&amp;gt; transactions we want to ask the SCRIPT interpreter&lt;br/&gt;&amp;gt; to validate.)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Comparison To Jets&lt;br/&gt;&amp;gt; ------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This technique allows users to define &amp;#34;jets&amp;#34;, i.e.&lt;br/&gt;&amp;gt; sequences of low-level general operations that users&lt;br/&gt;&amp;gt; have determined are common enough they should just&lt;br/&gt;&amp;gt; be implemented as faster code that is executed&lt;br/&gt;&amp;gt; directly by the underlying hardware processor rather&lt;br/&gt;&amp;gt; than via a software interpreter.&lt;br/&gt;&amp;gt; Basically, each redefined `OP_` code is a jet of a&lt;br/&gt;&amp;gt; sequence of `UOP_` micro-opcodes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We implement this by dynamically JIT-compiling the&lt;br/&gt;&amp;gt; proposed jets, as described above.&lt;br/&gt;&amp;gt; SCRIPTs using jetted code remain smaller, as the&lt;br/&gt;&amp;gt; jet definition is done in a previous transaction and&lt;br/&gt;&amp;gt; does not require copy-pasta (Do Not Repeat Yourself!).&lt;br/&gt;&amp;gt; At the same time, jettification is not tied to&lt;br/&gt;&amp;gt; developers, thus removing the need to keep softforking&lt;br/&gt;&amp;gt; new features --- we only need define a sufficiently&lt;br/&gt;&amp;gt; general language and then we can implement pretty much&lt;br/&gt;&amp;gt; anything worth implementing (and a bunch of other things&lt;br/&gt;&amp;gt; that should not be implemented, but hey, users gonna&lt;br/&gt;&amp;gt; use...).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bugs in existing microcodes can be fixed by basing a&lt;br/&gt;&amp;gt; new microcode from the existing microcode, and&lt;br/&gt;&amp;gt; redefining the buggy implementation.&lt;br/&gt;&amp;gt; Existing Tapscripts need to be re-spent to point to&lt;br/&gt;&amp;gt; the new bugfixed microcode, but if you used the&lt;br/&gt;&amp;gt; point-spend branch as an N-of-N of all participants&lt;br/&gt;&amp;gt; you have an upgrade mechanism for free.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In order to ensure that the JIT-compilation of new&lt;br/&gt;&amp;gt; microcodes is not triggered trivially, we require&lt;br/&gt;&amp;gt; that users petitioning for the jettification of some&lt;br/&gt;&amp;gt; operations (i.e. introducing a new microcode) must&lt;br/&gt;&amp;gt; sacrifice Bitcoins.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Burning Bitcoins is better than increasing the weight&lt;br/&gt;&amp;gt; of microcode introduction outputs; all fullnodes are&lt;br/&gt;&amp;gt; affected by the need to JIT-compile the new microcode,&lt;br/&gt;&amp;gt; so they benefit from the reduction in supply, thus&lt;br/&gt;&amp;gt; getting compensated for the work of JIT-compiling the&lt;br/&gt;&amp;gt; new microcode.&lt;br/&gt;&amp;gt; Ohter mechanisms for making microcode introduction&lt;br/&gt;&amp;gt; outputs expensive are also possible.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Nothing really requires that we use a stack-based&lt;br/&gt;&amp;gt; language for this; any sufficiently FP language&lt;br/&gt;&amp;gt; should allow referential transparency.&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/20220322/402ad6eb/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220322/402ad6eb/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:06:32&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstug7yzngv74apcvulh7lxd5rlndf85xvv25jetgmyt7g95sgl60gzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j59658z7ma</id>
    
      <title type="html">📅 Original date posted:2022-03-05 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstug7yzngv74apcvulh7lxd5rlndf85xvv25jetgmyt7g95sgl60gzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j59658z7ma" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsve5eyuvge7xywsslc8kprl9t6ypkn9jn6g23jrs40p09kxg7d7eq8lx0yn&#39;&gt;nevent1q…x0yn&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-05&lt;br/&gt;📝 Original message:On Sat, Mar 5, 2022 at 8:41 AM Jeremy Rubin 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; It seems like a decent concept for exploration.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; AJ, I&amp;#39;d be interested to know what you&amp;#39;ve been able to build with Chia&lt;br/&gt;&amp;gt; Lisp and what your experience has been... e.g. what does the Lightning&lt;br/&gt;&amp;gt; Network look like on Chia?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; One question that I have had is that it seems like to me that neither&lt;br/&gt;&amp;gt; simplicity nor chia lisp would be particularly suited to a ZK prover...&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Not that I necessarily disagree with this statement, but I can say that I&lt;br/&gt;have experimented with compiling Simplicity to Boolean circuits.  It was a&lt;br/&gt;while ago, but I think the result of compiling my SHA256 program was within&lt;br/&gt;an order of magnitude of the hand made SHA256 circuit for bulletproofs.&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/20220305/d223d490/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220305/d223d490/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:05:14&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2g5t44592sp35enqkczrm40y8tvnq3p7crwxpn0zvq3zln9yneuszyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5968eh57x</id>
    
      <title type="html">📅 Original date posted:2022-03-06 📝 Original message:The ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2g5t44592sp35enqkczrm40y8tvnq3p7crwxpn0zvq3zln9yneuszyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5968eh57x" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs93c3nyukzhtn6pk6584976z6nkz5de6jrw9dlaa7gvas4w0srlngfvg6ea&#39;&gt;nevent1q…g6ea&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-06&lt;br/&gt;📝 Original message:The circuit generated from Simplicity was larger than the hand made one.&lt;br/&gt;&lt;br/&gt;On Sat, Mar 5, 2022 at 6:20 PM ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Russell,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; On Sat, Mar 5, 2022 at 8:41 AM Jeremy Rubin via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; It seems like a decent concept for exploration.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; AJ, I&amp;#39;d be interested to know what you&amp;#39;ve been able to build with Chia&lt;br/&gt;&amp;gt; Lisp and what your experience has been... e.g. what does the Lightning&lt;br/&gt;&amp;gt; Network look like on Chia?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; One question that I have had is that it seems like to me that neither&lt;br/&gt;&amp;gt; simplicity nor chia lisp would be particularly suited to a ZK prover...&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Not that I necessarily disagree with this statement, but I can say that&lt;br/&gt;&amp;gt; I have experimented with compiling Simplicity to Boolean circuits.  It was&lt;br/&gt;&amp;gt; a while ago, but I think the result of compiling my SHA256 program was&lt;br/&gt;&amp;gt; within an order of magnitude of the hand made SHA256 circuit for&lt;br/&gt;&amp;gt; bulletproofs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;#34;Within&amp;#34; can mean &amp;#34;larger&amp;#34; or &amp;#34;smaller&amp;#34; in this context, which was it?&lt;br/&gt;&amp;gt; From what I understand, compilers for ZK-provable circuits are still not&lt;br/&gt;&amp;gt; as effective as humans, so I would assume &amp;#34;larger&amp;#34;, but I would be much&lt;br/&gt;&amp;gt; interested if it is &amp;#34;smaller&amp;#34;!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- 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/20220305/b803a6b5/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220305/b803a6b5/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:05:14&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsz6agr6p3tl4qauv2zaqt3mzsuwx0qnkaj934e5w873u3mvqennnqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5964h9vmp</id>
    
      <title type="html">📅 Original date posted:2021-07-06 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsz6agr6p3tl4qauv2zaqt3mzsuwx0qnkaj934e5w873u3mvqennnqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5964h9vmp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszs86cadcn7eymqyxqpvkqx8ayafuevn9zd5ptgwvzlhy27u3w7vqwvuvdm&#39;&gt;nevent1q…uvdm&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-07-06&lt;br/&gt;📝 Original message:On Tue, Jul 6, 2021 at 2:26 AM Billy Tetrud &amp;lt;billy.tetrud at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;  when people are talking about enabling covenants, we are talking about&lt;br/&gt;&amp;gt; whether OP_CAT should be allowed or not&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Are they? Are you implying that anything that enables covenants is&lt;br/&gt;&amp;gt; equivalent to enabling OP_CAT? Generally when I think about enabling&lt;br/&gt;&amp;gt; covenants, I&amp;#39;m thinking more about OP_CTV (or some similarly specific&lt;br/&gt;&amp;gt; opcode&lt;br/&gt;&amp;gt; &amp;lt;&lt;a href=&#34;https://github.com/fresheneesz/bip-efficient-bitcoin-vaults/blob/main/bip-constraindestination.md&amp;gt&#34;&gt;https://github.com/fresheneesz/bip-efficient-bitcoin-vaults/blob/main/bip-constraindestination.md&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; ).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; OP_TWEAK&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I wasn&amp;#39;t able to find anything about what that is. Would you mind&lt;br/&gt;&amp;gt; clarifying what that concept is?&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;In tapscript one can generally recover the current input&amp;#39;s scriptPubkey&lt;br/&gt;through sighash introspection via the usual covenant tricks.  This allows&lt;br/&gt;you to make a recursive covenant by spending funds back to the same&lt;br/&gt;identical scriptPubkey.  However, in order for a recursive covenant to be&lt;br/&gt;actually interesting, there needs to be some sort of state update in each&lt;br/&gt;transition.  If there is no state update then sending funds back to itself&lt;br/&gt;is of very limited value.  It will reset the timer on relative locks, but&lt;br/&gt;that is about all.&lt;br/&gt;&lt;br/&gt;The &amp;#34;normal&amp;#34; way of writing useful recursive covenants is to modify the&lt;br/&gt;scriptPubkey by changing a fragment of it that contains some sort of&lt;br/&gt;state.  However in order to update a tapscript pubkey one needs to apply&lt;br/&gt;not only hashing, to create a Merkel root, but also to create a tweaked&lt;br/&gt;taproot pubkey that commits to this root.  While script currently comes&lt;br/&gt;with a SHA-256 hashing opcode, there is no opcode that will let you perform&lt;br/&gt;the necessary tweaking to create a taproot scriptPubkey.&lt;br/&gt;&lt;br/&gt;But as I mentioned afterwards, there are other places in the UTXO that you&lt;br/&gt;could put data in order to perform a state update.&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/20210706/e7b418bc/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210706/e7b418bc/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T00:56:29&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq45lthfu237c3tyqefsrs6ek3q5qtzumdfu35q7xhzn04kwsrlqszyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596znn69j</id>
    
      <title type="html">📅 Original date posted:2021-07-03 📝 Original message:There ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq45lthfu237c3tyqefsrs6ek3q5qtzumdfu35q7xhzn04kwsrlqszyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596znn69j" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsf4lxcsnurtnykh36zt6mrr0aqxff0tdzmjjeslhvpyg6nwuu6jlqn2kp8d&#39;&gt;nevent1q…kp8d&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-07-03&lt;br/&gt;📝 Original message:There is one line written at&lt;br/&gt;&lt;a href=&#34;https://github.com/ElementsProject/elements/pull/949/files#r660130155&#34;&gt;https://github.com/ElementsProject/elements/pull/949/files#r660130155&lt;/a&gt;. I&lt;br/&gt;suppose we need to decide on which variants of *VERIFY and *ADD we want to&lt;br/&gt;include (presumably all of them) and choose which opcodes they will be&lt;br/&gt;assigned to.  And I guess for CHECKSIGFROMSTACKADD will want to place the n&lt;br/&gt;value between the signature and the message on the stack.  ... So I suppose&lt;br/&gt;we will need more than one sentence.&lt;br/&gt;&lt;br/&gt;The semantics would be basically to call secp256k1_schnorrsig_verify &amp;lt;&lt;br/&gt;&lt;a href=&#34;https://github.com/bitcoin-core/secp256k1/blob/0440945fb5ce69d335fed32827b5166e84b02e05/include/secp256k1_schnorrsig.h#L158&amp;gt&#34;&gt;https://github.com/bitcoin-core/secp256k1/blob/0440945fb5ce69d335fed32827b5166e84b02e05/include/secp256k1_schnorrsig.h#L158&amp;gt&lt;/a&gt;;,&lt;br/&gt;treating pubkeys and signatures the same way the other CHECKSIG operations&lt;br/&gt;do, and in passing the (variable length) message from the stack.&lt;br/&gt;CHECKSIGFROMSTACK would also be subject to the same sigops budget that&lt;br/&gt;CHECKSIG has in tapscript.&lt;br/&gt;&lt;br/&gt;On Sat, Jul 3, 2021 at 2:30 PM Jeremy &amp;lt;jlrubin at mit.edu&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Awesome to hear that!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Actually I don&amp;#39;t think I did know (or I forgot/didn&amp;#39;t catch it) that there&lt;br/&gt;&amp;gt; was an updated spec for elements, I searched around for what I could find&lt;br/&gt;&amp;gt; and came up empty handed. Do you have any links for that? That sounds&lt;br/&gt;&amp;gt; perfect to me.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Sat, Jul 3, 2021, 10:50 AM Russell O&amp;#39;Connor &amp;lt;roconnor at blockstream.com&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi Jermy,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; As you are aware, we, and by we I mean mostly Sanket, are developing an&lt;br/&gt;&amp;gt;&amp;gt; updated OP_CHECKSIGFROMSTACK implementation for tapscript on elements.  The&lt;br/&gt;&amp;gt;&amp;gt; plan here would be to effectively support the an interface to the&lt;br/&gt;&amp;gt;&amp;gt; variable-length extension of BIP-0340 schnorr signatures.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; BIP-0340 would dispense with DER encoding (good riddance).&lt;br/&gt;&amp;gt;&amp;gt; BIP-0340 signatures are batch verifiable along with other BIP-0340&lt;br/&gt;&amp;gt;&amp;gt; transaction signatures and taproot tweak verification.&lt;br/&gt;&amp;gt;&amp;gt; Support for variable length messages in BIP-0340 has been discussed in &amp;lt;&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/sipa/bips/issues/207&amp;gt&#34;&gt;https://github.com/sipa/bips/issues/207&amp;gt&lt;/a&gt;; and an implementation has&lt;br/&gt;&amp;gt;&amp;gt; recently been merged in &amp;lt;&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin-core/secp256k1/pull/844&amp;gt&#34;&gt;https://github.com/bitcoin-core/secp256k1/pull/844&amp;gt&lt;/a&gt;;.  The BIP has not&lt;br/&gt;&amp;gt;&amp;gt; yet been updated but the difference is that the message m does not have to&lt;br/&gt;&amp;gt;&amp;gt; be 32-bytes (it is recommended that the message be a 32-bit tagged hash or&lt;br/&gt;&amp;gt;&amp;gt; a message with a 64-bit application specific prefix). The CHECKSIGFROMSTACK&lt;br/&gt;&amp;gt;&amp;gt; operation (in tapscript) would use a stack item for this m value to&lt;br/&gt;&amp;gt;&amp;gt; BIP-0340 signature verification and would not necessarily have to be 32&lt;br/&gt;&amp;gt;&amp;gt; bytes.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I think this design we are aiming for would be perfectly suited for&lt;br/&gt;&amp;gt;&amp;gt; Bitcoin as well.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Sat, Jul 3, 2021 at 12:32 PM Jeremy via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Reproduced below is the BIP text from Bitcoin Cash&amp;#39;s (MIT-Licensed)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; specification for &amp;#34;CheckDataSig&amp;#34;, more or less the same thing as&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; CHECKSIGFROMSTACK&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/op_checkdatasig.md&#34;&gt;https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/op_checkdatasig.md&lt;/a&gt;.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; In contrast to Element&amp;#39;s implementation, it does not have Element&amp;#39;s bugs&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; around verify semantics and uses the nullfail rule, and there is a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; specification document so it seemed like the easiest starting point for&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; discussion v.s. drafting something from scratch.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Does anyone have any issue with adapting this exact text and&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; implementation to a BIP for Bitcoin using 2 OP_SUCCESSX opcodes?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Note that with *just* CheckSigFromStack, while you can do some very&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; valuable use cases, but without OP_CAT it does not enable sophisticated&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; covenants (and as per&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://www.wpsoftware.net/andrew/blog/cat-and-schnorr-tricks-i.html&#34;&gt;https://www.wpsoftware.net/andrew/blog/cat-and-schnorr-tricks-i.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; just CAT alone enables such uses).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Design questions worth considering as modifications:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 1. Should CSFS require some sort of tagged hash? Very likely answer is&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; no – tags interfere with certain use cases&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 2. Should CSFS split the signature’s R &amp;amp; S value stack items for some&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; applications that otherwise may require OP_CAT? E.g. using a pinned R value&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; allows you to extract a private key if ever double signed, using 2 R values&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; allows pay-to-reveal-key contracts. Most likely answer is no, if that is&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; desired then OP_CAT can be introduced&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 3. Should CSFS support a cheap way to reference the taproot internal or&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; external key? Perhaps, can be handled with undefined upgradeable keytypes.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; One might want to use the internal key, if the signed data should be valid&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; independent of the tapscript tree. One might want to use the external key,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; if the data should only be valid for a single tapscript key &#43; tree.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 4. Should invalid public keys types be a NOP to support future extended&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; pubkey types?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Best,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Jeremy&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ---&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; layout: specification&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; title: OP_CHECKDATASIG and OP_CHECKDATASIGVERIFY Specification&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; category: spec&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; date: 2018-08-20&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; activation: 1542300000&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; version: 0.6&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ---&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_CHECKDATASIG&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ===============&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_CHECKDATASIG and OP_CHECKDATASIGVERIFY check whether a signature is valid with respect to a message and a public key.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_CHECKDATASIG permits data to be imported into a script, and have its validity checked against some signing authority such as an &amp;#34;Oracle&amp;#34;.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_CHECKDATASIG and OP_CHECKDATASIGVERIFY are designed to be implemented similarly to OP_CHECKSIG [1]. Conceptually, one could imagine OP_CHECKSIG functionality being replaced by OP_CHECKDATASIG, along with a separate Op Code to create a hash from the transaction based on the SigHash algorithm.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_CHECKDATASIG Specification&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; -----------------------------&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ### Semantics&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_CHECKDATASIG fails immediately if the stack is not well formed. To be well formed, the stack must contain at least three elements [`&amp;lt;sig&amp;gt;`, `&amp;lt;msg&amp;gt;`, `&amp;lt;pubKey&amp;gt;`] in this order where `&amp;lt;pubKey&amp;gt;` is the top element and&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   * `&amp;lt;pubKey&amp;gt;` must be a validly encoded public key&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   * `&amp;lt;msg&amp;gt;` can be any string&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   * `&amp;lt;sig&amp;gt;` must follow the strict DER encoding as described in [2] and the S-value of `&amp;lt;sig&amp;gt;` must be at most the curve order divided by 2 as described in [3]&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; If the stack is well formed, then OP_CHECKDATASIG pops the top three elements [`&amp;lt;sig&amp;gt;`, `&amp;lt;msg&amp;gt;`, `&amp;lt;pubKey&amp;gt;`] from the stack and pushes true onto the stack if `&amp;lt;sig&amp;gt;` is valid with respect to the raw single-SHA256 hash of `&amp;lt;msg&amp;gt;` and `&amp;lt;pubKey&amp;gt;` using the secp256k1 elliptic curve. Otherwise, it pops three elements and pushes false onto the stack in the case that `&amp;lt;sig&amp;gt;` is the empty string and fails in all other cases.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Nullfail is enforced the same as for OP_CHECKSIG [3]. If the signature does not match the supplied public key and message hash, and the signature is not an empty byte array, the entire script fails.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ### Opcode Number&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_CHECKDATASIG uses the previously unused opcode number 186 (0xba in hex encoding)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ### SigOps&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Signature operations accounting for OP_CHECKDATASIG shall be calculated the same as OP_CHECKSIG. This means that each OP_CHECKDATASIG shall be counted as one (1) SigOp.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ### Activation&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Use of OP_CHECKDATASIG, unless occuring in an unexecuted OP_IF branch, will make the transaction invalid if it is included in a block where the median timestamp of the prior 11 blocks is less than 1542300000.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ### Unit Tests&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` fails if 15 November 2018 protocol upgrade is not yet activated.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; OP_CHECKDATASIG` fails if there are fewer than 3 items on stack.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` fails if `&amp;lt;pubKey&amp;gt;` is not a validly encoded public key.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` fails if `&amp;lt;sig&amp;gt;` is not a validly encoded signature with strict DER encoding.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` fails if signature `&amp;lt;sig&amp;gt;` is not empty and does not pass the Low S check.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` fails if signature `&amp;lt;sig&amp;gt;` is not empty and does not pass signature validation of `&amp;lt;msg&amp;gt;` and `&amp;lt;pubKey&amp;gt;`.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` pops three elements and pushes false onto the stack if `&amp;lt;sig&amp;gt;` is an empty byte array.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` pops three elements and pushes true onto the stack if `&amp;lt;sig&amp;gt;` is a valid signature of `&amp;lt;msg&amp;gt;` with respect to `&amp;lt;pubKey&amp;gt;`.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_CHECKDATASIGVERIFY Specification&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; -----------------------------------&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ### Semantics&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_CHECKDATASIGVERIFY is equivalent to OP_CHECKDATASIG followed by OP_VERIFY. It leaves nothing on the stack, and will cause the script to fail immediately if the signature check does not pass.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ### Opcode Number&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_CHECKDATASIGVERIFY uses the previously unused opcode number 187 (0xbb in hex encoding)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ### SigOps&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Signature operations accounting for OP_CHECKDATASIGVERIFY shall be calculated the same as OP_CHECKSIGVERIFY. This means that each OP_CHECKDATASIGVERIFY shall be counted as one (1) SigOp.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ### Activation&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Use of OP_CHECKDATASIGVERIFY, unless occuring in an unexecuted OP_IF branch, will make the transaction invalid if it is included in a block where the median timestamp of the prior 11 blocks is less than 1542300000.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ### Unit Tests&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIGVERIFY` fails if 15 November 2018 protocol upgrade is not yet activated.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; OP_CHECKDATASIGVERIFY` fails if there are fewer than 3 item on stack.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIGVERIFY`fails if `&amp;lt;pubKey&amp;gt;` is not a validly encoded public key.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIGVERIFY` fails if `&amp;lt;sig&amp;gt;` is not a validly encoded signature with strict DER encoding.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIGVERIFY` fails if signature `&amp;lt;sig&amp;gt;` is not empty and does not pass the Low S check.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIGVERIFY` fails if `&amp;lt;sig&amp;gt;` is not a valid signature of `&amp;lt;msg&amp;gt;` with respect to `&amp;lt;pubKey&amp;gt;`.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIGVERIFY` pops the top three stack elements if `&amp;lt;sig&amp;gt;` is a valid signature of `&amp;lt;msg&amp;gt;` with respect to `&amp;lt;pubKey&amp;gt;`.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Sample Implementation [4, 5]&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ----------------------------&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ```c&#43;&#43;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                     case OP_CHECKDATASIG:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                     case OP_CHECKDATASIGVERIFY: {&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         // Make sure this remains an error before activation.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         if ((flags &amp;amp; SCRIPT_ENABLE_CHECKDATASIG) == 0) {&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             return set_error(serror, SCRIPT_ERR_BAD_OPCODE);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         }&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         // (sig message pubkey -- bool)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         if (stack.size() &amp;lt; 3) {&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             return set_error(&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                                 serror, SCRIPT_ERR_INVALID_STACK_OPERATION);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         }&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         valtype &amp;amp;vchSig = stacktop(-3);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         valtype &amp;amp;vchMessage = stacktop(-2);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         valtype &amp;amp;vchPubKey = stacktop(-1);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         if (!CheckDataSignatureEncoding(vchSig, flags,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                                                         serror) ||&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             !CheckPubKeyEncoding(vchPubKey, flags, serror)) {&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             // serror is set&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             return false;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         }&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         bool fSuccess = false;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         if (vchSig.size()) {&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             valtype vchHash(32);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             CSHA256()&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                                 .Write(vchMessage.data(), vchMessage.size())&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                                 .Finalize(vchHash.data());&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             uint256 message(vchHash);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             CPubKey pubkey(vchPubKey);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             fSuccess = pubkey.Verify(message, vchSig);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         }&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         if (!fSuccess &amp;amp;&amp;amp; (flags &amp;amp; SCRIPT_VERIFY_NULLFAIL) &amp;amp;&amp;amp;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             vchSig.size()) {&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             return set_error(serror, SCRIPT_ERR_SIG_NULLFAIL);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         }&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         popstack(stack);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         popstack(stack);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         popstack(stack);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         stack.push_back(fSuccess ? vchTrue : vchFalse);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         if (opcode == OP_CHECKDATASIGVERIFY) {&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             if (fSuccess) {&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                                 popstack(stack);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             } else {&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                                 return set_error(serror,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                                                  SCRIPT_ERR_CHECKDATASIGVERIFY);&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                             }&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                         }&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                     } break;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ```&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Sample Usage&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ------------&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; The following example shows a spend and redeem script for a basic use of CHECKDATASIG.  This example validates the signature of some data, provides a placeholder where you would then process that data, and finally allows one of 2 signatures to spend based on the outcome of the data processing.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ### spend script:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ```&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; push txsignature&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; push txpubkey&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; push msg&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; push sig&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ```&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ### redeem script:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ```&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;                                 (txsig, txpubkey msg, sig)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_OVER                         (txsig, txpubkey, msg, sig, msg)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; push data pubkey                (txsig, txpubkey, msg, sig, msg, pubkey)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_CHECKDATASIGVERIFY           (txsig, txpubkey, msg)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ```&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Now that msg is on the stack top, the script can write predicates on it,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; resulting in the message being consumed and a true/false condition left on the stack: (txpubkey, txsig, boolean)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ```&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_IF                           (txsig, txpubkey)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   OP_DUP                        (txsig, txpubkey, txpubkey)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   OP_HASH160                    (txsig, txpubkey, address)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   push &amp;lt;p2pkh spend address&amp;gt;    (txsig, txpubkey, address, p2pkh spend address)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   OP_EQUALVERIFY                (txsig, txpubkey)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   OP_CHECKSIG&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_ELSE&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   (same as if clause but a different &amp;lt;p2pkh spend address&amp;gt;)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_ENDIF&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ```&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; History&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; -------&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; This specification is based on Andrew Stone’s OP_DATASIGVERIFY proposal [6, 7]. It is modified from Stone&amp;#39;s original proposal based on a synthesis of all the peer-review and feedback received [8].&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; References&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ----------&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [1] [OP_CHECKSIG](&lt;a href=&#34;https://en.bitcoin.it/wiki/OP_CHECKSIG&#34;&gt;https://en.bitcoin.it/wiki/OP_CHECKSIG&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [2] [Strict DER Encoding](&lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [3] [Low-S and Nullfail Specification](&lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0146.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0146.mediawiki&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [4] [Bitcoin ABC implementation](&lt;a href=&#34;https://reviews.bitcoinabc.org/D1621&#34;&gt;https://reviews.bitcoinabc.org/D1621&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [5] [Bitcoin ABC implementation update](&lt;a href=&#34;https://reviews.bitcoinabc.org/D1646&#34;&gt;https://reviews.bitcoinabc.org/D1646&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [6] [Andrew Stone’s OP_DATASIGVERIFY](&lt;a href=&#34;https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/bucash1.3.0.0/doc/opdatasigverify.md&#34;&gt;https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/bucash1.3.0.0/doc/opdatasigverify.md&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [7] [Andrew Stone&amp;#39;s article on Scripting](&lt;a href=&#34;https://medium.com/@g.andrew.stone/bitcoin-scripting-applications-decision-based-spending-8e7b93d7bdb9&#34;&gt;https://medium.com/@g.andrew.stone/bitcoin-scripting-applications-decision-based-spending-8e7b93d7bdb9&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [8] [Peer Review of Andrew Stone&amp;#39;s Proposal](&lt;a href=&#34;https://github.com/bitcoincashorg/bitcoincash.org/pull/10&#34;&gt;https://github.com/bitcoincashorg/bitcoincash.org/pull/10&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; --&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; @JeremyRubin &amp;lt;&lt;a href=&#34;https://twitter.com/JeremyRubin&amp;gt&#34;&gt;https://twitter.com/JeremyRubin&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&#34;https://twitter.com/JeremyRubin&amp;gt&#34;&gt;https://twitter.com/JeremyRubin&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;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/20210703/e56d5b04/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210703/e56d5b04/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T00:56:15&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswxpsd26vyccdcfyqvkc6nz9f9llr00mdrr9fc4uqm0jp7d0eslaqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596hv6clq</id>
    
      <title type="html">📅 Original date posted:2021-07-03 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswxpsd26vyccdcfyqvkc6nz9f9llr00mdrr9fc4uqm0jp7d0eslaqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596hv6clq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgycdfdzvcywwvgpgeanzkgzc505vpp7lw5fzlvnsglqfqz5nnulggs3y9w&#39;&gt;nevent1q…3y9w&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-07-03&lt;br/&gt;📝 Original message:Hi Jermy,&lt;br/&gt;&lt;br/&gt;As you are aware, we, and by we I mean mostly Sanket, are developing an&lt;br/&gt;updated OP_CHECKSIGFROMSTACK implementation for tapscript on elements.  The&lt;br/&gt;plan here would be to effectively support the an interface to the&lt;br/&gt;variable-length extension of BIP-0340 schnorr signatures.&lt;br/&gt;&lt;br/&gt;BIP-0340 would dispense with DER encoding (good riddance).&lt;br/&gt;BIP-0340 signatures are batch verifiable along with other BIP-0340&lt;br/&gt;transaction signatures and taproot tweak verification.&lt;br/&gt;Support for variable length messages in BIP-0340 has been discussed in &amp;lt;&lt;br/&gt;&lt;a href=&#34;https://github.com/sipa/bips/issues/207&amp;gt&#34;&gt;https://github.com/sipa/bips/issues/207&amp;gt&lt;/a&gt;; and an implementation has recently&lt;br/&gt;been merged in &amp;lt;&lt;a href=&#34;https://github.com/bitcoin-core/secp256k1/pull/844&amp;gt&#34;&gt;https://github.com/bitcoin-core/secp256k1/pull/844&amp;gt&lt;/a&gt;;.  The&lt;br/&gt;BIP has not yet been updated but the difference is that the message m does&lt;br/&gt;not have to be 32-bytes (it is recommended that the message be a 32-bit&lt;br/&gt;tagged hash or a message with a 64-bit application specific prefix). The&lt;br/&gt;CHECKSIGFROMSTACK operation (in tapscript) would use a stack item for this&lt;br/&gt;m value to BIP-0340 signature verification and would not necessarily have&lt;br/&gt;to be 32 bytes.&lt;br/&gt;&lt;br/&gt;I think this design we are aiming for would be perfectly suited for Bitcoin&lt;br/&gt;as well.&lt;br/&gt;&lt;br/&gt;On Sat, Jul 3, 2021 at 12:32 PM Jeremy 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; Reproduced below is the BIP text from Bitcoin Cash&amp;#39;s (MIT-Licensed)&lt;br/&gt;&amp;gt; specification for &amp;#34;CheckDataSig&amp;#34;, more or less the same thing as&lt;br/&gt;&amp;gt; CHECKSIGFROMSTACK&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/op_checkdatasig.md&#34;&gt;https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/op_checkdatasig.md&lt;/a&gt;.&lt;br/&gt;&amp;gt; In contrast to Element&amp;#39;s implementation, it does not have Element&amp;#39;s bugs&lt;br/&gt;&amp;gt; around verify semantics and uses the nullfail rule, and there is a&lt;br/&gt;&amp;gt; specification document so it seemed like the easiest starting point for&lt;br/&gt;&amp;gt; discussion v.s. drafting something from scratch.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Does anyone have any issue with adapting this exact text and&lt;br/&gt;&amp;gt; implementation to a BIP for Bitcoin using 2 OP_SUCCESSX opcodes?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Note that with *just* CheckSigFromStack, while you can do some very&lt;br/&gt;&amp;gt; valuable use cases, but without OP_CAT it does not enable sophisticated&lt;br/&gt;&amp;gt; covenants (and as per&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://www.wpsoftware.net/andrew/blog/cat-and-schnorr-tricks-i.html&#34;&gt;https://www.wpsoftware.net/andrew/blog/cat-and-schnorr-tricks-i.html&lt;/a&gt; just&lt;br/&gt;&amp;gt; CAT alone enables such uses).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Design questions worth considering as modifications:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Should CSFS require some sort of tagged hash? Very likely answer is no&lt;br/&gt;&amp;gt; – tags interfere with certain use cases&lt;br/&gt;&amp;gt; 2. Should CSFS split the signature’s R &amp;amp; S value stack items for some&lt;br/&gt;&amp;gt; applications that otherwise may require OP_CAT? E.g. using a pinned R value&lt;br/&gt;&amp;gt; allows you to extract a private key if ever double signed, using 2 R values&lt;br/&gt;&amp;gt; allows pay-to-reveal-key contracts. Most likely answer is no, if that is&lt;br/&gt;&amp;gt; desired then OP_CAT can be introduced&lt;br/&gt;&amp;gt; 3. Should CSFS support a cheap way to reference the taproot internal or&lt;br/&gt;&amp;gt; external key? Perhaps, can be handled with undefined upgradeable keytypes.&lt;br/&gt;&amp;gt; One might want to use the internal key, if the signed data should be valid&lt;br/&gt;&amp;gt; independent of the tapscript tree. One might want to use the external key,&lt;br/&gt;&amp;gt; if the data should only be valid for a single tapscript key &#43; tree.&lt;br/&gt;&amp;gt; 4. Should invalid public keys types be a NOP to support future extended&lt;br/&gt;&amp;gt; pubkey types?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Best,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Jeremy&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ---&lt;br/&gt;&amp;gt; layout: specification&lt;br/&gt;&amp;gt; title: OP_CHECKDATASIG and OP_CHECKDATASIGVERIFY Specification&lt;br/&gt;&amp;gt; category: spec&lt;br/&gt;&amp;gt; date: 2018-08-20&lt;br/&gt;&amp;gt; activation: 1542300000&lt;br/&gt;&amp;gt; version: 0.6&lt;br/&gt;&amp;gt; ---&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CHECKDATASIG&lt;br/&gt;&amp;gt; ===============&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CHECKDATASIG and OP_CHECKDATASIGVERIFY check whether a signature is valid with respect to a message and a public key.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CHECKDATASIG permits data to be imported into a script, and have its validity checked against some signing authority such as an &amp;#34;Oracle&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CHECKDATASIG and OP_CHECKDATASIGVERIFY are designed to be implemented similarly to OP_CHECKSIG [1]. Conceptually, one could imagine OP_CHECKSIG functionality being replaced by OP_CHECKDATASIG, along with a separate Op Code to create a hash from the transaction based on the SigHash algorithm.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CHECKDATASIG Specification&lt;br/&gt;&amp;gt; -----------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Semantics&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CHECKDATASIG fails immediately if the stack is not well formed. To be well formed, the stack must contain at least three elements [`&amp;lt;sig&amp;gt;`, `&amp;lt;msg&amp;gt;`, `&amp;lt;pubKey&amp;gt;`] in this order where `&amp;lt;pubKey&amp;gt;` is the top element and&lt;br/&gt;&amp;gt;   * `&amp;lt;pubKey&amp;gt;` must be a validly encoded public key&lt;br/&gt;&amp;gt;   * `&amp;lt;msg&amp;gt;` can be any string&lt;br/&gt;&amp;gt;   * `&amp;lt;sig&amp;gt;` must follow the strict DER encoding as described in [2] and the S-value of `&amp;lt;sig&amp;gt;` must be at most the curve order divided by 2 as described in [3]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If the stack is well formed, then OP_CHECKDATASIG pops the top three elements [`&amp;lt;sig&amp;gt;`, `&amp;lt;msg&amp;gt;`, `&amp;lt;pubKey&amp;gt;`] from the stack and pushes true onto the stack if `&amp;lt;sig&amp;gt;` is valid with respect to the raw single-SHA256 hash of `&amp;lt;msg&amp;gt;` and `&amp;lt;pubKey&amp;gt;` using the secp256k1 elliptic curve. Otherwise, it pops three elements and pushes false onto the stack in the case that `&amp;lt;sig&amp;gt;` is the empty string and fails in all other cases.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Nullfail is enforced the same as for OP_CHECKSIG [3]. If the signature does not match the supplied public key and message hash, and the signature is not an empty byte array, the entire script fails.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Opcode Number&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CHECKDATASIG uses the previously unused opcode number 186 (0xba in hex encoding)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### SigOps&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Signature operations accounting for OP_CHECKDATASIG shall be calculated the same as OP_CHECKSIG. This means that each OP_CHECKDATASIG shall be counted as one (1) SigOp.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Activation&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Use of OP_CHECKDATASIG, unless occuring in an unexecuted OP_IF branch, will make the transaction invalid if it is included in a block where the median timestamp of the prior 11 blocks is less than 1542300000.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Unit Tests&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` fails if 15 November 2018 protocol upgrade is not yet activated.&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; OP_CHECKDATASIG` fails if there are fewer than 3 items on stack.&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` fails if `&amp;lt;pubKey&amp;gt;` is not a validly encoded public key.&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` fails if `&amp;lt;sig&amp;gt;` is not a validly encoded signature with strict DER encoding.&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` fails if signature `&amp;lt;sig&amp;gt;` is not empty and does not pass the Low S check.&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` fails if signature `&amp;lt;sig&amp;gt;` is not empty and does not pass signature validation of `&amp;lt;msg&amp;gt;` and `&amp;lt;pubKey&amp;gt;`.&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` pops three elements and pushes false onto the stack if `&amp;lt;sig&amp;gt;` is an empty byte array.&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIG` pops three elements and pushes true onto the stack if `&amp;lt;sig&amp;gt;` is a valid signature of `&amp;lt;msg&amp;gt;` with respect to `&amp;lt;pubKey&amp;gt;`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CHECKDATASIGVERIFY Specification&lt;br/&gt;&amp;gt; -----------------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Semantics&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CHECKDATASIGVERIFY is equivalent to OP_CHECKDATASIG followed by OP_VERIFY. It leaves nothing on the stack, and will cause the script to fail immediately if the signature check does not pass.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Opcode Number&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CHECKDATASIGVERIFY uses the previously unused opcode number 187 (0xbb in hex encoding)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### SigOps&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Signature operations accounting for OP_CHECKDATASIGVERIFY shall be calculated the same as OP_CHECKSIGVERIFY. This means that each OP_CHECKDATASIGVERIFY shall be counted as one (1) SigOp.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Activation&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Use of OP_CHECKDATASIGVERIFY, unless occuring in an unexecuted OP_IF branch, will make the transaction invalid if it is included in a block where the median timestamp of the prior 11 blocks is less than 1542300000.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Unit Tests&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIGVERIFY` fails if 15 November 2018 protocol upgrade is not yet activated.&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; OP_CHECKDATASIGVERIFY` fails if there are fewer than 3 item on stack.&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIGVERIFY`fails if `&amp;lt;pubKey&amp;gt;` is not a validly encoded public key.&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIGVERIFY` fails if `&amp;lt;sig&amp;gt;` is not a validly encoded signature with strict DER encoding.&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIGVERIFY` fails if signature `&amp;lt;sig&amp;gt;` is not empty and does not pass the Low S check.&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIGVERIFY` fails if `&amp;lt;sig&amp;gt;` is not a valid signature of `&amp;lt;msg&amp;gt;` with respect to `&amp;lt;pubKey&amp;gt;`.&lt;br/&gt;&amp;gt;  - `&amp;lt;sig&amp;gt; &amp;lt;msg&amp;gt; &amp;lt;pubKey&amp;gt; OP_CHECKDATASIGVERIFY` pops the top three stack elements if `&amp;lt;sig&amp;gt;` is a valid signature of `&amp;lt;msg&amp;gt;` with respect to `&amp;lt;pubKey&amp;gt;`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sample Implementation [4, 5]&lt;br/&gt;&amp;gt; ----------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ```c&#43;&#43;&lt;br/&gt;&amp;gt;                     case OP_CHECKDATASIG:&lt;br/&gt;&amp;gt;                     case OP_CHECKDATASIGVERIFY: {&lt;br/&gt;&amp;gt;                         // Make sure this remains an error before activation.&lt;br/&gt;&amp;gt;                         if ((flags &amp;amp; SCRIPT_ENABLE_CHECKDATASIG) == 0) {&lt;br/&gt;&amp;gt;                             return set_error(serror, SCRIPT_ERR_BAD_OPCODE);&lt;br/&gt;&amp;gt;                         }&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;                         // (sig message pubkey -- bool)&lt;br/&gt;&amp;gt;                         if (stack.size() &amp;lt; 3) {&lt;br/&gt;&amp;gt;                             return set_error(&lt;br/&gt;&amp;gt;                                 serror, SCRIPT_ERR_INVALID_STACK_OPERATION);&lt;br/&gt;&amp;gt;                         }&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;                         valtype &amp;amp;vchSig = stacktop(-3);&lt;br/&gt;&amp;gt;                         valtype &amp;amp;vchMessage = stacktop(-2);&lt;br/&gt;&amp;gt;                         valtype &amp;amp;vchPubKey = stacktop(-1);&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;                         if (!CheckDataSignatureEncoding(vchSig, flags,&lt;br/&gt;&amp;gt;                                                         serror) ||&lt;br/&gt;&amp;gt;                             !CheckPubKeyEncoding(vchPubKey, flags, serror)) {&lt;br/&gt;&amp;gt;                             // serror is set&lt;br/&gt;&amp;gt;                             return false;&lt;br/&gt;&amp;gt;                         }&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;                         bool fSuccess = false;&lt;br/&gt;&amp;gt;                         if (vchSig.size()) {&lt;br/&gt;&amp;gt;                             valtype vchHash(32);&lt;br/&gt;&amp;gt;                             CSHA256()&lt;br/&gt;&amp;gt;                                 .Write(vchMessage.data(), vchMessage.size())&lt;br/&gt;&amp;gt;                                 .Finalize(vchHash.data());&lt;br/&gt;&amp;gt;                             uint256 message(vchHash);&lt;br/&gt;&amp;gt;                             CPubKey pubkey(vchPubKey);&lt;br/&gt;&amp;gt;                             fSuccess = pubkey.Verify(message, vchSig);&lt;br/&gt;&amp;gt;                         }&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;                         if (!fSuccess &amp;amp;&amp;amp; (flags &amp;amp; SCRIPT_VERIFY_NULLFAIL) &amp;amp;&amp;amp;&lt;br/&gt;&amp;gt;                             vchSig.size()) {&lt;br/&gt;&amp;gt;                             return set_error(serror, SCRIPT_ERR_SIG_NULLFAIL);&lt;br/&gt;&amp;gt;                         }&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;                         popstack(stack);&lt;br/&gt;&amp;gt;                         popstack(stack);&lt;br/&gt;&amp;gt;                         popstack(stack);&lt;br/&gt;&amp;gt;                         stack.push_back(fSuccess ? vchTrue : vchFalse);&lt;br/&gt;&amp;gt;                         if (opcode == OP_CHECKDATASIGVERIFY) {&lt;br/&gt;&amp;gt;                             if (fSuccess) {&lt;br/&gt;&amp;gt;                                 popstack(stack);&lt;br/&gt;&amp;gt;                             } else {&lt;br/&gt;&amp;gt;                                 return set_error(serror,&lt;br/&gt;&amp;gt;                                                  SCRIPT_ERR_CHECKDATASIGVERIFY);&lt;br/&gt;&amp;gt;                             }&lt;br/&gt;&amp;gt;                         }&lt;br/&gt;&amp;gt;                     } break;&lt;br/&gt;&amp;gt; ```&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sample Usage&lt;br/&gt;&amp;gt; ------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The following example shows a spend and redeem script for a basic use of CHECKDATASIG.  This example validates the signature of some data, provides a placeholder where you would then process that data, and finally allows one of 2 signatures to spend based on the outcome of the data processing.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### spend script:&lt;br/&gt;&amp;gt; ```&lt;br/&gt;&amp;gt; push txsignature&lt;br/&gt;&amp;gt; push txpubkey&lt;br/&gt;&amp;gt; push msg&lt;br/&gt;&amp;gt; push sig&lt;br/&gt;&amp;gt; ```&lt;br/&gt;&amp;gt; ### redeem script:&lt;br/&gt;&amp;gt; ```&lt;br/&gt;&amp;gt;                                 (txsig, txpubkey msg, sig)&lt;br/&gt;&amp;gt; OP_OVER                         (txsig, txpubkey, msg, sig, msg)&lt;br/&gt;&amp;gt; push data pubkey                (txsig, txpubkey, msg, sig, msg, pubkey)&lt;br/&gt;&amp;gt; OP_CHECKDATASIGVERIFY           (txsig, txpubkey, msg)&lt;br/&gt;&amp;gt; ```&lt;br/&gt;&amp;gt; Now that msg is on the stack top, the script can write predicates on it,&lt;br/&gt;&amp;gt; resulting in the message being consumed and a true/false condition left on the stack: (txpubkey, txsig, boolean)&lt;br/&gt;&amp;gt; ```&lt;br/&gt;&amp;gt; OP_IF                           (txsig, txpubkey)&lt;br/&gt;&amp;gt;   OP_DUP                        (txsig, txpubkey, txpubkey)&lt;br/&gt;&amp;gt;   OP_HASH160                    (txsig, txpubkey, address)&lt;br/&gt;&amp;gt;   push &amp;lt;p2pkh spend address&amp;gt;    (txsig, txpubkey, address, p2pkh spend address)&lt;br/&gt;&amp;gt;   OP_EQUALVERIFY                (txsig, txpubkey)&lt;br/&gt;&amp;gt;   OP_CHECKSIG&lt;br/&gt;&amp;gt; OP_ELSE&lt;br/&gt;&amp;gt;   (same as if clause but a different &amp;lt;p2pkh spend address&amp;gt;)&lt;br/&gt;&amp;gt; OP_ENDIF&lt;br/&gt;&amp;gt; ```&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; History&lt;br/&gt;&amp;gt; -------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This specification is based on Andrew Stone’s OP_DATASIGVERIFY proposal [6, 7]. It is modified from Stone&amp;#39;s original proposal based on a synthesis of all the peer-review and feedback received [8].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; References&lt;br/&gt;&amp;gt; ----------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1] [OP_CHECKSIG](&lt;a href=&#34;https://en.bitcoin.it/wiki/OP_CHECKSIG&#34;&gt;https://en.bitcoin.it/wiki/OP_CHECKSIG&lt;/a&gt;)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [2] [Strict DER Encoding](&lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki&lt;/a&gt;)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [3] [Low-S and Nullfail Specification](&lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0146.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0146.mediawiki&lt;/a&gt;)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [4] [Bitcoin ABC implementation](&lt;a href=&#34;https://reviews.bitcoinabc.org/D1621&#34;&gt;https://reviews.bitcoinabc.org/D1621&lt;/a&gt;)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [5] [Bitcoin ABC implementation update](&lt;a href=&#34;https://reviews.bitcoinabc.org/D1646&#34;&gt;https://reviews.bitcoinabc.org/D1646&lt;/a&gt;)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [6] [Andrew Stone’s OP_DATASIGVERIFY](&lt;a href=&#34;https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/bucash1.3.0.0/doc/opdatasigverify.md&#34;&gt;https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/bucash1.3.0.0/doc/opdatasigverify.md&lt;/a&gt;)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [7] [Andrew Stone&amp;#39;s article on Scripting](&lt;a href=&#34;https://medium.com/@g.andrew.stone/bitcoin-scripting-applications-decision-based-spending-8e7b93d7bdb9&#34;&gt;https://medium.com/@g.andrew.stone/bitcoin-scripting-applications-decision-based-spending-8e7b93d7bdb9&lt;/a&gt;)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [8] [Peer Review of Andrew Stone&amp;#39;s Proposal](&lt;a href=&#34;https://github.com/bitcoincashorg/bitcoincash.org/pull/10&#34;&gt;https://github.com/bitcoincashorg/bitcoincash.org/pull/10&lt;/a&gt;)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; @JeremyRubin &amp;lt;&lt;a href=&#34;https://twitter.com/JeremyRubin&amp;gt&#34;&gt;https://twitter.com/JeremyRubin&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; &amp;lt;&lt;a href=&#34;https://twitter.com/JeremyRubin&amp;gt&#34;&gt;https://twitter.com/JeremyRubin&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; 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/20210703/ce1d831d/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210703/ce1d831d/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T00:56:13&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswnl4lfd24ru345wknheqfjfchvv0txt6kdrges04hl5vaw9p4mpgzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5968kz09v</id>
    
      <title type="html">📅 Original date posted:2021-04-06 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswnl4lfd24ru345wknheqfjfchvv0txt6kdrges04hl5vaw9p4mpgzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5968kz09v" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsg9v4lquc98g7d3w2rl9d2k9rqyf5ts4wxnyxwawaq9l9zme528sc38syd3&#39;&gt;nevent1q…syd3&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-04-06&lt;br/&gt;📝 Original message:I&amp;#39;m pretty sure that the question of &amp;#34;is signalling still possible by the&lt;br/&gt;time enough miners have upgraded and are ready to start signalling?&amp;#34;&lt;br/&gt;Strongly benefits from a guaranteed number of signaling periods that height&lt;br/&gt;based activation offers.  Especially for the short activation period of&lt;br/&gt;Speedy Trial.&lt;br/&gt;&lt;br/&gt;The other relevant value of giving enough time for users to upgrade is not&lt;br/&gt;very sensitive.  It&amp;#39;s not like 180 days is magic number that going over is&lt;br/&gt;safe and going below is unsafe.&lt;br/&gt;&lt;br/&gt;That said, as Jeremy has pointed out before (maybe it was on IRC), we can&lt;br/&gt;almost ensure a minimum of 7 retargeting periods by carefully selecting&lt;br/&gt;signaling start and end dates to line up in the middle of expected&lt;br/&gt;retargeting periods that we would otherwise chose with height based&lt;br/&gt;activation. Why we would rather use MTP to fake a height based activation,&lt;br/&gt;I will never understand. But if this is what it takes to activate taproot,&lt;br/&gt;that is fine by me.&lt;br/&gt;&lt;br/&gt;The differences between height and MTP activation are too small to matter&lt;br/&gt;that much for what is ultimately transient code.  As long as MTP activation&lt;br/&gt;can pass code review it is okay with me.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Mon., Apr. 5, 2021, 06:35 Anthony Towns via bitcoin-dev, &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Sat, Apr 03, 2021 at 09:39:11PM -0700, Jeremy via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; As such, the main conversation in this agenda item is&lt;br/&gt;&amp;gt; &amp;gt; around the pros/cons of height or MTP and determining if we can reach&lt;br/&gt;&amp;gt; consensus&lt;br/&gt;&amp;gt; &amp;gt; on either approach.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Here&amp;#39;s some numbers.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Given a desired signalling period of xxx days, where signaling begins&lt;br/&gt;&amp;gt; on the first retarget boundary after the starttime and ends on the last&lt;br/&gt;&amp;gt; retarget boundary before the endtime, this is how many retarget periods&lt;br/&gt;&amp;gt; you get (based on blocks since 2015-01-01):&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  90 days: mainnet  5-7 full 2016-block retarget periods&lt;br/&gt;&amp;gt; 180 days: mainnet 11-14&lt;br/&gt;&amp;gt; 365 days: mainnet 25-27&lt;br/&gt;&amp;gt; 730 days: mainnet 51-55&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (This applies to non-signalling periods like the activation/lock in delay&lt;br/&gt;&amp;gt; too of course. If you change it so that it ends at the first retarget&lt;br/&gt;&amp;gt; period after endtime, all the values just get incremented -- ie, 6-8,&lt;br/&gt;&amp;gt; 12-15 etc)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If I&amp;#39;ve got the maths right, then requiring 1814 of 2016 blocks to signal,&lt;br/&gt;&amp;gt; means that having 7 periods instead of 5 lets you get a 50% chance of&lt;br/&gt;&amp;gt; successful activation by maintaining 89.04% of hashpower over the entire&lt;br/&gt;&amp;gt; period instead of 89.17%, while 55 periods instead of 51 gives you a 50%&lt;br/&gt;&amp;gt; chance of success with 88.38% hashpower instead of 88.40% hashpower.&lt;br/&gt;&amp;gt; So the &amp;#34;repeated trials&amp;#34; part doesn&amp;#39;t look like it has any significant&lt;br/&gt;&amp;gt; effect on mainnet.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If you target yy periods instead of xxx days, starting and ending on a&lt;br/&gt;&amp;gt; retarget boundary, you get the following stats from the last few years&lt;br/&gt;&amp;gt; of mainnet (again starting at 2015-01-01):&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  1 period:  mainnet 11-17 days (range 5.2 days)&lt;br/&gt;&amp;gt;  7 periods: mainnet 87-103 days (range 15.4 days)&lt;br/&gt;&amp;gt; 13 periods: mainnet 166-185 days (range 17.9 days)&lt;br/&gt;&amp;gt; 27 periods: mainnet 352-377 days (range 24.4 days)&lt;br/&gt;&amp;gt; 54 periods: mainnet 711-747 days (range 35.0 days)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As far as I can see the questions that matter are:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * is signalling still possible by the time enough miners have upgraded&lt;br/&gt;&amp;gt;    and are ready to start signalling?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * have nodes upgraded to enforce the new rules by the time activation&lt;br/&gt;&amp;gt;    occurs, if it occurs?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But both those benefit from less real time variance, rather than less&lt;br/&gt;&amp;gt; variance in the numbers of signalling periods, at least in every way&lt;br/&gt;&amp;gt; that I can think of.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Corresponding numbers for testnet:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  90 days: testnet   5-85&lt;br/&gt;&amp;gt; 180 days: testnet  23-131&lt;br/&gt;&amp;gt; 365 days: testnet  70-224&lt;br/&gt;&amp;gt; 730 days: testnet 176-390&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (A 50% chance of activating within 5 periods requires sustaining 89.18%&lt;br/&gt;&amp;gt; hashpower; within 85 periods, 88.26% hashpower; far smaller differences&lt;br/&gt;&amp;gt; with all the other ranges -- of course, presumably the only way the&lt;br/&gt;&amp;gt; higher block rates ever actually happen is by someone pointing an ASIC at&lt;br/&gt;&amp;gt; testnet, and thus controlling 100% of blocks for multiple periods anyway)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   1 period:  testnet 5.6minutes-26 days (range 26.5 days)&lt;br/&gt;&amp;gt;  13 periods: testnet 1-135 days (range 133.5 days)&lt;br/&gt;&amp;gt;  27 periods: testnet 13-192 days (range 178.3 days)&lt;br/&gt;&amp;gt;  54 periods: testnet 39-283 days (range 243.1 days)&lt;br/&gt;&amp;gt; 100 periods: testnet 114-476 days (range 360.9 days)&lt;br/&gt;&amp;gt;              (this is the value used in [0] in order to ensure 3 months&amp;#39;&lt;br/&gt;&amp;gt;               worth of signalling is available)&lt;br/&gt;&amp;gt; 132 periods: testnet 184-583 days (range 398.1 days)&lt;br/&gt;&amp;gt; 225 periods: testnet 365-877 days (range 510.7 days)&lt;br/&gt;&amp;gt; 390 periods: testnet 725-1403 days (range 677.1 days)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [0] &lt;a href=&#34;https://github.com/bitcoin/bips/pull/1081#pullrequestreview-621934640&#34;&gt;https://github.com/bitcoin/bips/pull/1081#pullrequestreview-621934640&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; aj&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/20210406/1049635d/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210406/1049635d/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:31:09&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfwwly5y0fmsdhmahhn5jw4zjv5mtcsn6g7pgn9x26lzkzafmak4szyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5969rxnf4</id>
    
      <title type="html">📅 Original date posted:2021-03-06 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfwwly5y0fmsdhmahhn5jw4zjv5mtcsn6g7pgn9x26lzkzafmak4szyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5969rxnf4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsz2ycllzns3ddx35gr5gth0u6smyhavc4gtmdg8m38p2x965x9a6qjaxvz3&#39;&gt;nevent1q…xvz3&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-03-06&lt;br/&gt;📝 Original message:Hi Andrew,&lt;br/&gt;&lt;br/&gt;This is a slight misunderstanding of the proposal.  Rather than an extended&lt;br/&gt;lockin period (a term I&amp;#39;ve erroneously used in the past) it is really a&lt;br/&gt;minimum activation height.&lt;br/&gt;&lt;br/&gt;Thus using your figures it would instead be:&lt;br/&gt;&lt;br/&gt;* start height = 681408 /* about May 1st */&lt;br/&gt;* timeout height = 695520 /* about Aug 7th */&lt;br/&gt;* min activation height = 709632 /* about Nov 13th */&lt;br/&gt;* lockinontimeout = False&lt;br/&gt;* signaling bit = 2&lt;br/&gt;* threshold = 1815/2016 blocks (90%)&lt;br/&gt;&lt;br/&gt;This guarantees 7 retargeting periods between start height and timeout&lt;br/&gt;height.&lt;br/&gt;&lt;br/&gt;Being able to make a guarantee about how many retargeting periods we get is&lt;br/&gt;perhaps something worth pursuing given that the signaling period is so&lt;br/&gt;short for this trial.&lt;br/&gt;&lt;br/&gt;On Sat, Mar 6, 2021 at 1:04 AM Andrew Chow 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; I like this idea.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In terms of actual parameters, I propose that we base this Speedy Trial&lt;br/&gt;&amp;gt; off of BIP 8 with the following parameters:&lt;br/&gt;&amp;gt; * start height = 681408&lt;br/&gt;&amp;gt; * timeout height = 695520&lt;br/&gt;&amp;gt; * lockinontimeout = False&lt;br/&gt;&amp;gt; * signaling bit = 2&lt;br/&gt;&amp;gt; * threshold = 1815/2016 blocks (90%)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For the extended lockin period, I propose 14112 blocks, which is 7&lt;br/&gt;&amp;gt; retarget periods. Thus the earliest activation height will be 697536 and&lt;br/&gt;&amp;gt; the latest activation height will be 709632.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This will give us an approximate start time of May 1st 2021 and an&lt;br/&gt;&amp;gt; approximate timeout time of August 7th 2021, for a total activation&lt;br/&gt;&amp;gt; period of just over 3 months. The extended lockin period is the same&lt;br/&gt;&amp;gt; number of blocks as the activation period so that will also be just over&lt;br/&gt;&amp;gt; 3 months, giving us the latest activation time of November 13th, 2021.&lt;br/&gt;&amp;gt; If miners activated as soon as possible, the earliest activation time&lt;br/&gt;&amp;gt; would be August 21st 2021.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Additionally, this timeline assumes a mid-April release of Bitcoin Core&lt;br/&gt;&amp;gt; 0.21.1 containing these parameters. They could be changed to move up if&lt;br/&gt;&amp;gt; the expected release date were sooner.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Andrew Chow&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On 3/5/21 10:43 PM, David A. Harding via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; On the ##taproot-activation IRC channel, Russell O&amp;#39;Connor recently&lt;br/&gt;&amp;gt; &amp;gt; proposed a modification of the &amp;#34;Let&amp;#39;s see what happens&amp;#34; activation&lt;br/&gt;&amp;gt; &amp;gt; proposal.[1] The idea received significant discussion and seemed&lt;br/&gt;&amp;gt; &amp;gt; acceptable to several people who could not previously agree on a&lt;br/&gt;&amp;gt; &amp;gt; proposal (although this doesn&amp;#39;t necessarily make it their first&lt;br/&gt;&amp;gt; &amp;gt; choice).  The following is my attempt at a description.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 1. Start soon: shortly after the release of software containing this&lt;br/&gt;&amp;gt; &amp;gt;     proposed activation logic, nodes will begin counting blocks towards&lt;br/&gt;&amp;gt; &amp;gt;     the 90% threshold required to lock in taproot.[2]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 2. Stop soon: if the lockin threshold isn&amp;#39;t reached within approximately&lt;br/&gt;&amp;gt; &amp;gt;     three months, the activation attempt fails.  There is no mandatory&lt;br/&gt;&amp;gt; &amp;gt;     activation and everyone is encouraged to try again using different&lt;br/&gt;&amp;gt; &amp;gt;     activation parameters.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 2. Delayed activation: in the happy occasion where the lockin threshold&lt;br/&gt;&amp;gt; &amp;gt;     is reached, taproot is guaranteed to eventually activate---but not&lt;br/&gt;&amp;gt; &amp;gt;     until approximately six months after signal tracking started.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ## Example timeline&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; (All dates approximate; see the section below about BIP9 vs BIP8.)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; - T&#43;0: release of one or more full nodes with activation code&lt;br/&gt;&amp;gt; &amp;gt; - T&#43;14: signal tracking begins&lt;br/&gt;&amp;gt; &amp;gt; - T&#43;28: earliest possible lock in&lt;br/&gt;&amp;gt; &amp;gt; - T&#43;104: locked in by this date or need to try a different activation&lt;br/&gt;&amp;gt; process&lt;br/&gt;&amp;gt; &amp;gt; - T&#43;194: activation (if lockin occurred)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ## Analysis&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The goal of Speedy Trial is to allow a taproot activation attempt to&lt;br/&gt;&amp;gt; &amp;gt; either quickly succeed or quickly fail---without compromising safety in&lt;br/&gt;&amp;gt; &amp;gt; either case.  Details below:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ### Mitigating the problems of early success&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; New rules added in a soft fork need to be enforced by a large part of&lt;br/&gt;&amp;gt; &amp;gt; the economy or there&amp;#39;s a risk that a long chain of blocks breaking the&lt;br/&gt;&amp;gt; &amp;gt; rules will be accepted by some users and rejected by others, causing a&lt;br/&gt;&amp;gt; &amp;gt; chain split that can result in large direct losses to transaction&lt;br/&gt;&amp;gt; &amp;gt; receivers and potentially even larger indirect losses to holders due to&lt;br/&gt;&amp;gt; &amp;gt; reduced confidence in the safety of the Bitcoin system.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; One step developers have taken in the past to ensure widespread adoption&lt;br/&gt;&amp;gt; &amp;gt; of new consensus rules is programming in a delay between the time&lt;br/&gt;&amp;gt; software&lt;br/&gt;&amp;gt; &amp;gt; with those rules is expected to be released and when the software starts&lt;br/&gt;&amp;gt; &amp;gt; tracking which blocks signal for activation.  For example:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;      Soft fork        | Release    | Start      | Delta&lt;br/&gt;&amp;gt; &amp;gt;      -----------------&#43;------------&#43;------------&#43;----------&lt;br/&gt;&amp;gt; &amp;gt;      BIP68 (v0.12.1)  | 2016-04-15 | 2016-05-11 | 26 days&lt;br/&gt;&amp;gt; &amp;gt;      BIP141 (v0.13.1) | 2016-10-27 | 2016-11-18 | 24 days&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;      Sources: BitcoinCore.org,&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://gist.github.com/ajtowns/1c5e3b8bdead01124c04c45f01c817bc&#34;&gt;https://gist.github.com/ajtowns/1c5e3b8bdead01124c04c45f01c817bc&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Speedy Trial replaces most of that upfront delay with a backend delay.&lt;br/&gt;&amp;gt; &amp;gt; No matter how fast taproot&amp;#39;s activation threshold is reached by miners,&lt;br/&gt;&amp;gt; &amp;gt; there will be six months between the time signal tracking starts and when&lt;br/&gt;&amp;gt; &amp;gt; nodes will begin enforcing taproot&amp;#39;s rules.  This gives the userbase even&lt;br/&gt;&amp;gt; &amp;gt; more time to upgrade than if we had used the most recently proposed start&lt;br/&gt;&amp;gt; &amp;gt; date for a BIP8 activation (~July 23rd).[2]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ### Succeed, or fail fast&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The earlier version of this proposal was documented over 200 days ago[3]&lt;br/&gt;&amp;gt; &amp;gt; and taproot&amp;#39;s underlying code was merged into Bitcoin Core over 140 days&lt;br/&gt;&amp;gt; &amp;gt; ago.[4]  If we had started Speedy Trial at the time taproot&lt;br/&gt;&amp;gt; &amp;gt; was merged (which is a bit unrealistic), we would&amp;#39;ve either be less than&lt;br/&gt;&amp;gt; &amp;gt; two months away from having taproot or we would have moved on to the&lt;br/&gt;&amp;gt; &amp;gt; next activation attempt over a month ago.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Instead, we&amp;#39;ve debated at length and don&amp;#39;t appear to be any closer to&lt;br/&gt;&amp;gt; &amp;gt; what I think is a widely acceptable solution than when the mailing list&lt;br/&gt;&amp;gt; &amp;gt; began discussing post-segwit activation schemes over a year ago.[5]  I&lt;br/&gt;&amp;gt; &amp;gt; think Speedy Trial is a way to generate fast progress that will either&lt;br/&gt;&amp;gt; &amp;gt; end the debate (for now, if activation is successful) or give us some&lt;br/&gt;&amp;gt; &amp;gt; actual data upon which to base future taproot activation proposals.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Of course, for those who enjoy the debate, discussion can continue while&lt;br/&gt;&amp;gt; &amp;gt; waiting for the results of Speedy Trial.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ### Base activation protocol&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The idea can be implemented on top of either Bitcoin Core&amp;#39;s existing&lt;br/&gt;&amp;gt; &amp;gt; BIP9 code or its proposed BIP8 patchset.[6]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; - BIP9 uses two time-based[7] parameters, starttime and timeout.  Using&lt;br/&gt;&amp;gt; &amp;gt;    these values plus a time-based parameter for the minimum activation&lt;br/&gt;&amp;gt; &amp;gt;    delay would give three months for miners to activate taproot, but some&lt;br/&gt;&amp;gt; &amp;gt;    of that time near the start or the end might not be usable due to&lt;br/&gt;&amp;gt; &amp;gt;    signals only being measured in full retarget periods.  However, the&lt;br/&gt;&amp;gt; &amp;gt;    six month time for users to upgrade their node would be not be&lt;br/&gt;&amp;gt; &amp;gt;    affected by either slow or fast block production.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;      BIP9 is already part of Bitcoin Core and I think the changes being&lt;br/&gt;&amp;gt; &amp;gt;      proposed would be relatively small, resulting in a small patch that&lt;br/&gt;&amp;gt; &amp;gt;      could be easy to review.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; - BIP8 uses two height-based parameters, startheight and timeoutheight.&lt;br/&gt;&amp;gt; &amp;gt;    Using height values would ensure miners had a certain number of&lt;br/&gt;&amp;gt; &amp;gt;    retarget periods (6) to lock in taproot and that there&amp;#39;d be a certain&lt;br/&gt;&amp;gt; &amp;gt;    number of blocks (about 24,000) until activation, although latest lock&lt;br/&gt;&amp;gt; &amp;gt;    in and expected activation could occur moderately earlier or later&lt;br/&gt;&amp;gt; &amp;gt;    than the estimated three and six months.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;      BIP8 would likely be used if Speedy Trial fails, so it could be&lt;br/&gt;&amp;gt; &amp;gt;      advantageous to base this proposal on BIP8 so that we gain&lt;br/&gt;&amp;gt; &amp;gt;      experience running that code in production.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; For additional discussion about using times versus heights, see today&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt; log for ##taproot-activation.[11]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ### Additional concerns&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; - Encourages false signaling: false signaling is when miners signal&lt;br/&gt;&amp;gt; &amp;gt;    readiness to enforce rules that their nodes don&amp;#39;t actually support.&lt;br/&gt;&amp;gt; &amp;gt;    This was partially responsible for a six-block reorg shortly after the&lt;br/&gt;&amp;gt; &amp;gt;    final BIP66 activation[8] and was found to still be a problem during&lt;br/&gt;&amp;gt; &amp;gt;    the BIP68 lockin period despite BIP9 being designed to avoid it.[9]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;    Because Speedy Trial only gives miners a maximum of three months to&lt;br/&gt;&amp;gt; &amp;gt;    signal support for taproot, it may encourage such false signaling.  If&lt;br/&gt;&amp;gt; &amp;gt;    taproot locks in as a result of their signaling but most of them fail&lt;br/&gt;&amp;gt; &amp;gt;    to upgrade by the activation date several months later, unprepared&lt;br/&gt;&amp;gt; &amp;gt;    miners could lose large amounts of money and users could see long&lt;br/&gt;&amp;gt; &amp;gt;    reorgs (with unupgraded nodes and SPV lite clients potentially losing&lt;br/&gt;&amp;gt; &amp;gt;    money).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;    Compared to other activation proposals, I think the only difference is&lt;br/&gt;&amp;gt; &amp;gt;    Speedy Trial&amp;#39;s short timeline.  False signaling is possible with any&lt;br/&gt;&amp;gt; &amp;gt;    other proposal and the same problems can occur if miners fail to&lt;br/&gt;&amp;gt; &amp;gt;    upgrade for any mandatory activation.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ### Additional advantages&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; - No mandatory signaling: at no time are miners required to signal by&lt;br/&gt;&amp;gt; &amp;gt;    Speedy Trial.  This includes no mandatory signaling during the&lt;br/&gt;&amp;gt; &amp;gt;    locked_in period(s), although such signaling will be encouraged (as it&lt;br/&gt;&amp;gt; &amp;gt;    was with BIP9[10]).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; - Party time: to a lesser degree, a benefit mentioned for flag day&lt;br/&gt;&amp;gt; &amp;gt;    activation may also apply here: we could get up to six months&lt;br/&gt;&amp;gt; &amp;gt;    advanced notice of taproot activation, allowing users, developers, and&lt;br/&gt;&amp;gt; &amp;gt;    organizations to prepare software, announcements, and celebrations for&lt;br/&gt;&amp;gt; &amp;gt;    that event.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ## Implementation details and next steps&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Initial discussion about implementation may be found in today&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt; ##taproot-activation log.[11] If it appears Speedy Trial may have&lt;br/&gt;&amp;gt; &amp;gt; traction, Russell O&amp;#39;Connor has offered to work on a patch against BIP8&lt;br/&gt;&amp;gt; &amp;gt; implementing it.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ## Acknowledgments&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The original idea for a short-duration attempt was discussed in the&lt;br/&gt;&amp;gt; &amp;gt; ##taproot-activation IRC channel last July and the revised idea saw&lt;br/&gt;&amp;gt; &amp;gt; additional evaluation there this week.  Despite growing frustration,&lt;br/&gt;&amp;gt; &amp;gt; discussion has been overwhelmingly constructive, for which all the&lt;br/&gt;&amp;gt; &amp;gt; contributors should be commended.  Although this should not in any way&lt;br/&gt;&amp;gt; &amp;gt; imply endorsement, I&amp;#39;m grateful for the review and comments on a draft&lt;br/&gt;&amp;gt; &amp;gt; of this email by Adam Gibson, Andrew Chow, Anthony Towns, Chris Belcher,&lt;br/&gt;&amp;gt; &amp;gt; Jeremy Rubin, Jonas Nick, Luke Dashjr, Michael Folkson, Russell&lt;br/&gt;&amp;gt; &amp;gt; O&amp;#39;Connor, and IRC users maybehuman and proofofkeags&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ## Footnotes&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [1]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://en.bitcoin.it/wiki/Taproot_activation_proposals#Let.E2.80.99s_see_what_happens.2C_BIP8.28false.2C_3m.29&#34;&gt;https://en.bitcoin.it/wiki/Taproot_activation_proposals#Let.E2.80.99s_see_what_happens.2C_BIP8.28false.2C_3m.29&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [2] A threshold of 1,815/2,016 blocks (90%) in a single retarget period&lt;br/&gt;&amp;gt; &amp;gt;      seemed to have near-universal support during the 2021-02-16 IRC&lt;br/&gt;&amp;gt; &amp;gt;      meeting.  See:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://en.bitcoin.it/wiki/Taproot_activation_proposal_202102&#34;&gt;https://en.bitcoin.it/wiki/Taproot_activation_proposal_202102&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [3]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://en.bitcoin.it/w/index.php?title=Taproot_activation_proposals&amp;amp;oldid=68062&#34;&gt;https://en.bitcoin.it/w/index.php?title=Taproot_activation_proposals&amp;amp;oldid=68062&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [4] &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/19953&#34;&gt;https://github.com/bitcoin/bitcoin/pull/19953&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [5]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-January/017547.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-January/017547.html&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [6] &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/19573&#34;&gt;https://github.com/bitcoin/bitcoin/pull/19573&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [7] BIP9&amp;#39;s times are based on the median of the past 11 blocks, which&lt;br/&gt;&amp;gt; &amp;gt;      usually trails UTC by about 90 minutes but which can trail behind&lt;br/&gt;&amp;gt; &amp;gt;      realtime significantly if miners are doing weird things.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [8] &lt;a href=&#34;https://en.bitcoin.it/wiki/July_2015_chain_forks&#34;&gt;https://en.bitcoin.it/wiki/July_2015_chain_forks&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [9]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://buildingbitcoin.org/bitcoin-core-dev/log-2016-06-21.html#l-32&#34;&gt;https://buildingbitcoin.org/bitcoin-core-dev/log-2016-06-21.html#l-32&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [10]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/ed25cb58f605ba583c735f330482df0bf9348f3a/src/test/versionbits_tests.cpp#L337-L339&#34;&gt;https://github.com/bitcoin/bitcoin/blob/ed25cb58f605ba583c735f330482df0bf9348f3a/src/test/versionbits_tests.cpp#L337-L339&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [11] &lt;a href=&#34;http://gnusha.org/taproot-activation/2021-03-05.log&#34;&gt;http://gnusha.org/taproot-activation/2021-03-05.log&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; &amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; &amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&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/20210306/ac5abbef/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210306/ac5abbef/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:30:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstt3lzxv53uu8weeejxdr0jfluxkrkp3lqqps66pykmpzs5afs36czyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596x7xa8r</id>
    
      <title type="html">📅 Original date posted:2020-05-02 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstt3lzxv53uu8weeejxdr0jfluxkrkp3lqqps66pykmpzs5afs36czyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596x7xa8r" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0ycrpfuag9ppr7tl46f65m47wt96s76dncj6pmf4pj8euu8hhrfsr03c0l&#39;&gt;nevent1q…3c0l&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-05-02&lt;br/&gt;📝 Original message:&amp;gt; If you didn&amp;#39;t verify the output scriptPubKeys, you would *only* be able&lt;br/&gt;&amp;gt; to care about fees since you couldn&amp;#39;t verify where any of the funds went?&lt;br/&gt;&amp;gt; And you&amp;#39;d only be able to say fees are &amp;#34;at least x&amp;#34;, since they could be&lt;br/&gt;&amp;gt; more if one of the scriptPubKeys turned out to be OP_TRUE eg. That might&lt;br/&gt;&amp;gt; almost make sense for a transaction accelerator that&amp;#39;s trying to increase&lt;br/&gt;&amp;gt; the fees; but only if you were doing it for someone else&amp;#39;s transaction&lt;br/&gt;&amp;gt; (since otherwise you&amp;#39;d care about the output addresses) and only if you&lt;br/&gt;&amp;gt; were happy to not receive any change? Seems like a pretty weird use case?&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;You are right of course.  I was thinking of cases where you only care about&lt;br/&gt;where some of the outputs go but not all.  But of course, even in that case&lt;br/&gt;you will need to wade through all of the output ScriptPubKeys anyways.&lt;br/&gt;The current design shares the hashOuputs value with the one computed with&lt;br/&gt;BIP-143, and that is a somewhat valuable property to keep.&lt;br/&gt;&lt;br/&gt;Thanks for setting me straight.&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/20200502/6d03957c/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200502/6d03957c/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:24:14&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstjg8udvel0fhm7n0y86mjmfqjdfj8fzgjy9hsyyvpgyzvawfungqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5963f89x6</id>
    
      <title type="html">📅 Original date posted:2020-05-01 📝 Original message:While ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstjg8udvel0fhm7n0y86mjmfqjdfj8fzgjy9hsyyvpgyzvawfungqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5963f89x6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswgh753p3rjzeqj0pxl7ud9hugem7jgpttz87v7tqm57cxnla6eeqzxtxxn&#39;&gt;nevent1q…txxn&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-05-01&lt;br/&gt;📝 Original message:While I&amp;#39;m not entirely convinced yet that accertaining non-ownership of an&lt;br/&gt;input is a robust method of solving the problem here, I also see little&lt;br/&gt;reason not to amend BIP-341 as proposed. The ScriptPubKeys in question is&lt;br/&gt;already indirectly covered through the outpoints, so it is just a matter of&lt;br/&gt;optimization.  Furthermore in the consensus code, the ScriptPubKeys are&lt;br/&gt;part of the UTXO data set, and it is already being retrieved as part of the&lt;br/&gt;transaction checking process, so it is readily available.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not sure how much my opinion on the topic matters, but I did include&lt;br/&gt;this kind of functionality in my design for Simplicity on Elements, and I&lt;br/&gt;have been leaning towards adding this kind of functionality in my Bitcoin&lt;br/&gt;demo application of Simplicity.&lt;br/&gt;&lt;br/&gt;Regarding specifics, I personally think it would be better to keep the&lt;br/&gt;hashes of the ScriptPubKeys separate from the hashes of the input values.&lt;br/&gt;This way anyone only interested in input values does not need to wade&lt;br/&gt;through what are, in principle, arbitrarily long ScriptPubKeys in order to&lt;br/&gt;check the input values (which each fixed size).  To that end, I would also&lt;br/&gt;(and independently) propose separating the hashing of the output values&lt;br/&gt;from the output ScriptPubKeys in `sha_outputs` so again, applications&lt;br/&gt;interested only in summing the values of the outputs (for instance to&lt;br/&gt;compute fees) do not have to wade through those arbitrarily long&lt;br/&gt;ScriptPubKeys in the outputs.&lt;br/&gt;&lt;br/&gt;On Thu, Apr 30, 2020 at 4:22 AM Andrew Kozlik 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 everyone,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the current draft of BIP-0341 [1] the signature message commits to the&lt;br/&gt;&amp;gt; scriptPubKey of the output being spent by the input. I propose that the&lt;br/&gt;&amp;gt; signature message should commit to the scriptPubKeys of *all* transaction&lt;br/&gt;&amp;gt; inputs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In certain applications like CoinJoin, a wallet has to deal with&lt;br/&gt;&amp;gt; transactions containing external inputs. To calculate the actual amount&lt;br/&gt;&amp;gt; that the user is spending, the wallet needs to reliably determine for each&lt;br/&gt;&amp;gt; input whether it belongs to the wallet or not. Without such a mechanism an&lt;br/&gt;&amp;gt; adversary can fool the wallet into displaying incorrect information about&lt;br/&gt;&amp;gt; the amount being spent, which can result in theft of user funds [2].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In order to ascertain non-ownership of an input which is claimed to be&lt;br/&gt;&amp;gt; external, the wallet needs the scriptPubKey of the previous output spent by&lt;br/&gt;&amp;gt; this input. It must acquire the full transaction being spent and verify its&lt;br/&gt;&amp;gt; hash against that which is given in the outpoint. This is an obstacle in&lt;br/&gt;&amp;gt; the implementation of lightweight air-gapped wallets and hardware wallets&lt;br/&gt;&amp;gt; in general. If the signature message would commit to the scriptPubKeys of&lt;br/&gt;&amp;gt; all transaction inputs, then the wallet would only need to acquire the&lt;br/&gt;&amp;gt; scriptPubKey of the output being spent without having to acquire and verify&lt;br/&gt;&amp;gt; the hash of the entire previous transaction. If an attacker would provide&lt;br/&gt;&amp;gt; an incorrect scriptPubKey, then that would cause the wallet to generate an&lt;br/&gt;&amp;gt; invalid signature message.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Note that committing only to the scriptPubKey of the output being spent is&lt;br/&gt;&amp;gt; insufficient for this application, because the scriptPubKeys which are&lt;br/&gt;&amp;gt; needed to ascertain non-ownership of external inputs are precisely the ones&lt;br/&gt;&amp;gt; that would not be included in any of the signature messages produced by the&lt;br/&gt;&amp;gt; wallet.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The obvious way to implement this is to add another hash to the signature&lt;br/&gt;&amp;gt; message:&lt;br/&gt;&amp;gt; sha_scriptPubKeys (32): the SHA256 of the serialization of all&lt;br/&gt;&amp;gt; scriptPubKeys of the previous outputs spent by this transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Andrew Kozlik&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#common-signature-message&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#common-signature-message&lt;/a&gt;&lt;br/&gt;&amp;gt; [2]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-August/014843.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-August/014843.html&lt;/a&gt;&lt;br/&gt;&amp;gt; _______________________________________________&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/20200501/cc57f1b0/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200501/cc57f1b0/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:24:11&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsx6u0gmmccp007pp37ddzgzu9c5lxxh8wpumdvg3qtlejqv85mdmqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596l26ul8</id>
    
      <title type="html">📅 Original date posted:2020-03-21 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsx6u0gmmccp007pp37ddzgzu9c5lxxh8wpumdvg3qtlejqv85mdmqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596l26ul8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrrv29dn2vr2y55q4789hgs7d9uuwhdjhlq9v2ed7x4nlf4ryjwescuj8hu&#39;&gt;nevent1q…j8hu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-03-21&lt;br/&gt;📝 Original message:On Sat, Mar 21, 2020 at 12:46 PM Tim Ruffing 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 Pieter,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let&amp;#39;s take a step back first. If we believe that malicious hardware&lt;br/&gt;&amp;gt; wallets are big enough of a concern, then signing is only part of the&lt;br/&gt;&amp;gt; problem. The other issue is key generation. The PRG from which the seed&lt;br/&gt;&amp;gt; is derived can be malicious, e.g., just H(k_OO,counter) for a key k_OO&lt;br/&gt;&amp;gt; chosen by the hardware manufacturer. I haven&amp;#39;t seen an argument why&lt;br/&gt;&amp;gt; attacks during the signing model should more realistic than attacks&lt;br/&gt;&amp;gt; during key generation, so I&amp;#39;d be very hesitant to deploy anti-covert&lt;br/&gt;&amp;gt; channel singing protocols without deploying protocols for key&lt;br/&gt;&amp;gt; generation that are secure in the same attacker model.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Public keys are deterministic and can be spot checked.  In fact, AFAIU if&lt;br/&gt;hardened HD key derivations are not used, then spot checking is very easy.&lt;br/&gt;&lt;br/&gt;While spot checking isn&amp;#39;t ideal, my original concern with the synthetic&lt;br/&gt;none standard proposal was that it is inherently non-deterministic and&lt;br/&gt;cannot ever be spot checked.  This is why anti-covert signing protocols are&lt;br/&gt;so important if we are going to use synthetic nonces.&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/20200321/33b4ef58/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200321/33b4ef58/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:23:12&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsv7yx5xgh8qcyq0uey0dj8skx2xnf0uj2h89kyehcjyqepccenytszyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596agffgm</id>
    
      <title type="html">📅 Original date posted:2019-11-08 📝 Original message:I do ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsv7yx5xgh8qcyq0uey0dj8skx2xnf0uj2h89kyehcjyqepccenytszyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596agffgm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs00nj0f3fxuh74j2mvdj9vwjrdflqs320caszv23jxsgm8ryj0vkq4d9y92&#39;&gt;nevent1q…9y92&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-08&lt;br/&gt;📝 Original message:I do like the idea of length prefixing the witness program.  I will note&lt;br/&gt;that the 1 byte witness version is really more like a 1 character witness&lt;br/&gt;version.  There are 17 different segwit versions and there are 32&lt;br/&gt;characters in the bech32 alphabet.  That leaves 15 unused characters that&lt;br/&gt;we can use for assigning new meanings too.&lt;br/&gt;&lt;br/&gt;That said, it is probably most sensible to define a new&lt;br/&gt;human-readable-prefix for length prefixed bitcoin witness programs.  &amp;#34;btc1&amp;#34;&lt;br/&gt;anyone?&lt;br/&gt;&lt;br/&gt;On Fri, Nov 8, 2019 at 12:12 AM ZmnSCPxj 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; Good morning Pieter, and all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Can we modify Bech32 SegWit address format for version 1 and above as&lt;br/&gt;&amp;gt; below?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;       * The data-part values:&lt;br/&gt;&amp;gt;       ** 1 byte: the witness version&lt;br/&gt;&amp;gt;     &#43; ** If the witness version is non-zero, 1 byte: the length of the&lt;br/&gt;&amp;gt; witness program.&lt;br/&gt;&amp;gt;       ** A conversion of the 2-to-40-byte witness program (as defined by [&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki&lt;/a&gt; BIP141])&lt;br/&gt;&amp;gt; to base32:&lt;br/&gt;&amp;gt;       *** Start with the bits of the witness program, most significant bit&lt;br/&gt;&amp;gt; per byte first.&lt;br/&gt;&amp;gt;       *** Re-arrange those bits into groups of 5, and pad with zeroes at&lt;br/&gt;&amp;gt; the end if needed.&lt;br/&gt;&amp;gt;       *** Translate those bits to characters using the table above.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This retains the ability of a bech32 address to specify any valid witness&lt;br/&gt;&amp;gt; length and allows future version 1 addresses with lengths other than 32,&lt;br/&gt;&amp;gt; while closing this malleation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Older software being given the modified v1 address format would mis-send&lt;br/&gt;&amp;gt; it to the wrong witness program, however.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alternately we could just keep using version 0 in the address format&lt;br/&gt;&amp;gt; forever.&lt;br/&gt;&amp;gt; The requirement would be to ensure that SegWit vN (N &amp;gt;= 1) output witness&lt;br/&gt;&amp;gt; programs would have a data-part value encoded as below:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     * The data-part values:&lt;br/&gt;&amp;gt;     ** 1 byte: legacy witness version, which must always be 0.&lt;br/&gt;&amp;gt;     ** 1 byte: actual witness version, which must be non-zero.&lt;br/&gt;&amp;gt;     ** 1 byte: padding length: 0 or 1.&lt;br/&gt;&amp;gt;     ** If padding length is 1, 1 byte: padding, which must be 0.&lt;br/&gt;&amp;gt;     ** 1 byte: witness program length.&lt;br/&gt;&amp;gt;     ** variable: witness program.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A writer for a v1 or later address would initially set an empty padding,&lt;br/&gt;&amp;gt; then compute:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;       1 // actual witness version&lt;br/&gt;&amp;gt;     &#43; 1 // padding length&lt;br/&gt;&amp;gt;     &#43; 1 // witness length&lt;br/&gt;&amp;gt;     &#43; witness_length&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If the above sum is 20 or 32, then the writer selects a non-zero padding&lt;br/&gt;&amp;gt; and inserts the padding byte so that the above sum is now 21 or 33.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To a reader that understands only bech32 v0, such an encoding would look&lt;br/&gt;&amp;gt; like a SegWit v0 invalid-program-length, and be rejected.&lt;br/&gt;&amp;gt; A reader which understands the above protocol would, instead of rejecting&lt;br/&gt;&amp;gt; a SegWit v0 invalid-program-length, instead attempt to parse it as above&lt;br/&gt;&amp;gt; first, and consider it as SegWit v1 or higher if it was parsed correctly as&lt;br/&gt;&amp;gt; above.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The above proposal is of course ridiculous and I am now currently running&lt;br/&gt;&amp;gt; diagnostics on my processing units to see if further glitches occur in test&lt;br/&gt;&amp;gt; reasoning skills.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&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/20191108/7280da70/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20191108/7280da70/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:21:39&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8uqh55288lxv927g4ryncs7rvy8r9kea096rm674tjy0jwkxx4agzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5962qhq7r</id>
    
      <title type="html">📅 Original date posted:2019-06-18 📝 Original message:Just ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8uqh55288lxv927g4ryncs7rvy8r9kea096rm674tjy0jwkxx4agzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5962qhq7r" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs88eq4yalqljalh0j9hepcvyz65xvvkuw0y3ktwwef8p2azusv7wc6e3g9n&#39;&gt;nevent1q…3g9n&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-06-18&lt;br/&gt;📝 Original message:Just to be clear, while OP_CHECKTXDIGESTVERIFY would enable this style of&lt;br/&gt;covenants if it pulled data from the stack, the OP_SECURETHEBAG probably&lt;br/&gt;cannot create covenants even if it were to pull the data from the stack&lt;br/&gt;unless some OP_TWEEKPUBKEY operation is added to Script because the&lt;br/&gt;&amp;#34;commitment of the script itself&amp;#34; isn&amp;#39;t part of the OP_SECURETHEBAG.&lt;br/&gt;&lt;br/&gt;So with regards to OP_SECURETHEBAG, I am also &amp;#34;not really seeing any reason&lt;br/&gt;to complicate the spec to ensure the digest is precommitted as part of the&lt;br/&gt;opcode.&amp;#34;&lt;br/&gt;&lt;br/&gt;On Thu, Jun 6, 2019 at 3:33 AM ZmnSCPxj 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; Good morning aj,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sent with ProtonMail Secure Email.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;&amp;gt; On Wednesday, June 5, 2019 5:30 PM, Anthony Towns via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; On Fri, May 31, 2019 at 10:35:45PM -0700, Jeremy via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; OP_CHECKOUTPUTSHASHVERIFY is retracted in favor of OP_SECURETHEBAG*.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I think you could generalise that slightly and make it fit in&lt;br/&gt;&amp;gt; &amp;gt; with the existing opcode naming by calling it something like&lt;br/&gt;&amp;gt; &amp;gt; &amp;#34;OP_CHECKTXDIGESTVERIFY&amp;#34; and pull a 33-byte value from the stack,&lt;br/&gt;&amp;gt; &amp;gt; consisting of a sha256 hash and a sighash-byte, and adding a new sighash&lt;br/&gt;&amp;gt; &amp;gt; value corresponding to the set of info you want to include in the hash,&lt;br/&gt;&amp;gt; &amp;gt; which I think sounds a bit like &amp;#34;SIGHASH_EXACTLY_ONE_INPUT | SIGHASH_ALL&amp;#34;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; FWIW, I&amp;#39;m not really seeing any reason to complicate the spec to ensure&lt;br/&gt;&amp;gt; &amp;gt; the digest is precommitted as part of the opcode.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe in combination with `OP_LEFT` and `OP_CAT` this allows&lt;br/&gt;&amp;gt; Turing-complete smart contracts, in much the same way as&lt;br/&gt;&amp;gt; `OP_CHECKSIGFROMSTACK`?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Pass in the spent transaction (serialised for txid) and the spending&lt;br/&gt;&amp;gt; transaction (serialised for sighash) as part of the witness of the spending&lt;br/&gt;&amp;gt; transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Script verifies that the spending transaction witness value is indeed the&lt;br/&gt;&amp;gt; spending transaction by `OP_SHA256 &amp;lt;SIGHASH_ALL&amp;gt; OP_SWAP OP_CAT&lt;br/&gt;&amp;gt; OP_CHECKTXDIGESTVERIFY`.&lt;br/&gt;&amp;gt; Script verifies the spent transaction witness value is indeed the spent&lt;br/&gt;&amp;gt; transaction by hashing it, then splitting up the hash with `OP_LEFT` into&lt;br/&gt;&amp;gt; bytes, and comparing the bytes to the bytes in the input of the spending&lt;br/&gt;&amp;gt; transaction witness value (txid being the bytes in reversed order).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then the Script can extract a commitment of itself by extracting the&lt;br/&gt;&amp;gt; output of the spent transaction.&lt;br/&gt;&amp;gt; This lets the Script check that the spending transaction also pays to the&lt;br/&gt;&amp;gt; same script.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The Script can then access a state value, for example from an `OP_RETURN`&lt;br/&gt;&amp;gt; output of the spent transaction, and enforce that a correct next-state is&lt;br/&gt;&amp;gt; used in the spending transaction.&lt;br/&gt;&amp;gt; If the state is too large to fit in a standard `OP_RETURN`, then the&lt;br/&gt;&amp;gt; current state can be passed in as a witness and validated against a hash&lt;br/&gt;&amp;gt; commitment in an `OP_RETURN` output.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe this is the primary reason against not pulling data from the&lt;br/&gt;&amp;gt; stack.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&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/20190618/783d5ba9/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190618/783d5ba9/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:18:27&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0s9l2h55ecfjc4csq8fxg3rmqrhxn25as8m0w4nze2c05c3tjeuczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5968tfmyr</id>
    
      <title type="html">📅 Original date posted:2019-06-02 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0s9l2h55ecfjc4csq8fxg3rmqrhxn25as8m0w4nze2c05c3tjeuczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5968tfmyr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9wm5n6vnua392vaca8g9mr95qdap6r6cueglxe6pxstnrgh42fkc57ecu9&#39;&gt;nevent1q…ecu9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-06-02&lt;br/&gt;📝 Original message:On Sat, Jun 1, 2019 at 12:47 PM Jeremy 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 All,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CHECKOUTPUTSHASHVERIFY is retracted in favor of OP_SECURETHEBAG*.&lt;br/&gt;&amp;gt; OP_SECURETHEBAG does more or less the same thing, but fixes malleability&lt;br/&gt;&amp;gt; issues and lifts the single output restriction to a known number of inputs&lt;br/&gt;&amp;gt; restriction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CHECKOUTPUTSVERIFY had some issues with malleability of version and&lt;br/&gt;&amp;gt; locktime. OP_SECURETHEBAG commits to both of these values.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Can you elaborate a bit more on what the issues were?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; OP_SECURETHEBAG also lifts the restriction that OP_CHECKOUTPUTSVERIFY had&lt;br/&gt;&amp;gt; to be spent as only a single input, and instead just commits to the number&lt;br/&gt;&amp;gt; of inputs. This allows for more flexibility, but keeps it easy to get the&lt;br/&gt;&amp;gt; same single output restriction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; BIP:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/JeremyRubin/bips/blob/op-secure-the-bag/bip-secure-the-bag.mediawiki&#34;&gt;https://github.com/JeremyRubin/bips/blob/op-secure-the-bag/bip-secure-the-bag.mediawiki&lt;/a&gt;&lt;br/&gt;&amp;gt; Implementation: &lt;a href=&#34;https://github.com/JeremyRubin/bitcoin/tree/secure_the_bag&#34;&gt;https://github.com/JeremyRubin/bitcoin/tree/secure_the_bag&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A particularly useful topic of discussion is how best to eliminate the&lt;br/&gt;&amp;gt; PUSHDATA and treat OP_SECURETHEBAG like a pushdata directly. I thought&lt;br/&gt;&amp;gt; about how the interpreter works and is implemented and couldn&amp;#39;t come up&lt;br/&gt;&amp;gt; with something noninvasive.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not a Core developer but from what I understand, I&amp;#39;d be inclined to to&lt;br/&gt;treat OP_SECURETHEBAG as with an immediate 32-byte parameter by modifying&lt;br/&gt;GetScriptOp to return the 32-byte parameter through pvchRet.&lt;br/&gt;&lt;br/&gt;bool GetScriptOp(CScriptBase::const_iterator&amp;amp; pc,&lt;br/&gt;CScriptBase::const_iterator end, opcodetype&amp;amp; opcodeRet,&lt;br/&gt;std::vector&amp;lt;unsigned char&amp;gt;* pvchRet)&lt;br/&gt;{&lt;br/&gt;    opcodeRet = OP_INVALIDOPCODE;&lt;br/&gt;    if (pvchRet)&lt;br/&gt;        pvchRet-&amp;gt;clear();&lt;br/&gt;    if (pc &amp;gt;= end)&lt;br/&gt;        return false;&lt;br/&gt;&lt;br/&gt;    // Read instruction&lt;br/&gt;    if (end - pc &amp;lt; 1)&lt;br/&gt;        return false;&lt;br/&gt;    unsigned int opcode = *pc&#43;&#43;;&lt;br/&gt;&lt;br/&gt;    // Immediate operand&lt;br/&gt;    if (opcode &amp;lt;= OP_PUSHDATA4)&lt;br/&gt;    {&lt;br/&gt;        // ...&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    if (opcode == OP_SECURETHEBAG) {&lt;br/&gt;        if (end - pc &amp;lt; 0 || (unsigned int)(end - pc) &amp;lt; 32)&lt;br/&gt;            return false;&lt;br/&gt;        if (pvchRet)&lt;br/&gt;            pvchRet-&amp;gt;assign(pc, pc &#43; 32);&lt;br/&gt;        pc &#43;= 32;&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    opcodeRet = static_cast&amp;lt;opcodetype&amp;gt;(opcode);&lt;br/&gt;    return true;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;and go from there.&lt;br/&gt;&lt;br/&gt;Thank you for your review and discussion,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Jeremy&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Plus the name is better&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/20190602/74ada17f/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190602/74ada17f/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:18:26&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqzhmqgjn76qtfu02tmwya96q3kwfksesey0ygwm62v7ynuywn2cczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596upejx8</id>
    
      <title type="html">📅 Original date posted:2019-03-12 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqzhmqgjn76qtfu02tmwya96q3kwfksesey0ygwm62v7ynuywn2cczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596upejx8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyfltg5wrytcrlqtuaujc9akgg0yy4aatjh6czg36rjgwmxl2pr9gtk7zm5&#39;&gt;nevent1q…7zm5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-03-12&lt;br/&gt;📝 Original message:On Tue, Mar 12, 2019 at 6:39 PM Jacob Eliosoff &amp;lt;jacob.eliosoff at gmail.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Also, if future disabling isn&amp;#39;t the point of making a tx type like&lt;br/&gt;&amp;gt; OP_CODESEPARATOR non-standard - what is?  If we&amp;#39;re committed to indefinite&lt;br/&gt;&amp;gt; support of these oddball features, what do we gain by making them hard to&lt;br/&gt;&amp;gt; use/mine?&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;The purpose of making OP_CODESEPARATOR non-standard was to partly mitigate&lt;br/&gt;the risk of the vulnerability that OP_CODESEPARATOR induces while we&lt;br/&gt;consider how to patch it.&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190312/3a355816/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190312/3a355816/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:16:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszcdg20g5xs08a69ke6p0fp79m056qwqqqp5fz2u7vhncjsl6z68szyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596frkyfe</id>
    
      <title type="html">📅 Original date posted:2019-03-11 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszcdg20g5xs08a69ke6p0fp79m056qwqqqp5fz2u7vhncjsl6z68szyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596frkyfe" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrcllepz5prps3rts5wmp2a5ehm5q9v892yflgsulq38jnme6zkcc0d8z3s&#39;&gt;nevent1q…8z3s&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-03-11&lt;br/&gt;📝 Original message:Hi Jacob,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Huh?! The whole point of non-standardness in this context is to (a) make&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; soft-forking something out safer by derisking miners not upgrading right&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; away and (b) signal something that may be a candidate for soft-forking&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; out so that we get feedback. Who is getting things disabled who isn&amp;#39;t&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; bothering to *tell* people that their use-case is being hurt?!&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; People have told me that they are hurt by some other non-standardness&lt;br/&gt;&amp;gt;&amp;gt; changes and I understand that they have been sitting on those funds for&lt;br/&gt;&amp;gt;&amp;gt; years.  Maybe they don&amp;#39;t realize their is some place to complain or maybe&lt;br/&gt;&amp;gt;&amp;gt; they think there must be a good reason why they are not allowed to do what&lt;br/&gt;&amp;gt;&amp;gt; they were previously allowed to do.  Perhaps others don&amp;#39;t want to risk&lt;br/&gt;&amp;gt;&amp;gt; blowing their pseudonymity.  Perhaps they think that attempting to undo&lt;br/&gt;&amp;gt;&amp;gt; some of these non-standardness changes is futile.  I can bring up the&lt;br/&gt;&amp;gt;&amp;gt; specific cases I&amp;#39;ve encountered in a new thread if you think it is&lt;br/&gt;&amp;gt;&amp;gt; worthwhile.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Like Matt, I understand non-standardness to be specifically for making a&lt;br/&gt;&amp;gt; transaction type more difficult to set the stage for a future disabling.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If anyone is actually harmed by this change, let them at least speak up&lt;br/&gt;&amp;gt; pseudonymously as others have before.  Backwards compatibility shouldn&amp;#39;t&lt;br/&gt;&amp;gt; mean letting imaginary implausible cases veto net-beneficial changes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;It is so easy to say stuff like this when one&amp;#39;s own money isn&amp;#39;t what is at&lt;br/&gt;risk.&lt;br/&gt;&lt;br/&gt;While I encourage users who would be harmed to chime in if they can,&lt;br/&gt;unfortunately, I think it is mostly wishful thinking on our part that they&lt;br/&gt;necessarily would.  In fact, there is evidence that in practice people&lt;br/&gt;don&amp;#39;t.&lt;br/&gt;&lt;br/&gt;To illustrate this, consider the example of the people affected by PR #5247&lt;br/&gt;&amp;lt;&lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/5247&amp;gt&#34;&gt;https://github.com/bitcoin/bitcoin/pull/5247&amp;gt&lt;/a&gt;;, which makes unparsable&lt;br/&gt;public keys non-standard.  As far as I am aware none have commented on this&lt;br/&gt;mailing list about it yet even though I happen to know such people do exist&lt;br/&gt;because I&amp;#39;ve talked with them on Slack.  I believe the person I spoke with&lt;br/&gt;to took over a year (and probably more than two years) to even notice that&lt;br/&gt;the transactions they want to redeem with are no longer standard.  To be&lt;br/&gt;fair, their money that is stuck due to PR #5247 isn&amp;#39;t lost yet, but I&amp;#39;m&lt;br/&gt;skeptical they would think or know to speak up here even if their money was&lt;br/&gt;on the chopping block.  The fact that they haven&amp;#39;t been able to move their&lt;br/&gt;money in the last *4 years* doesn&amp;#39;t mean they wouldn&amp;#39;t like it back one day.&lt;br/&gt;&lt;br/&gt;While non-standardness is a helpful in dissuading users from committing new&lt;br/&gt;funds to OP_CODESEPARATOR scripts, it doesn&amp;#39;t do anything to help users&lt;br/&gt;that may have been caught unaware by the non-standardness change.&lt;br/&gt;Furthermore, because these transactions are non-standard, anyone caught off&lt;br/&gt;guard by the change is going to have a very hard time redeeming their&lt;br/&gt;funds, as we have already seen with PR #5247, a non-standardness change&lt;br/&gt;that is far older than the OP_CODESERPATOR change in PR #11423&lt;br/&gt;&amp;lt;&lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/11423&amp;gt&#34;&gt;https://github.com/bitcoin/bitcoin/pull/11423&amp;gt&lt;/a&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/20190311/4722d88f/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190311/4722d88f/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:16:47&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9dh6jx0e8wnd9ex2xla772x3kp4vnn38p9teuh5pa7p8dd40954szyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596pv8kmd</id>
    
      <title type="html">📅 Original date posted:2019-03-09 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9dh6jx0e8wnd9ex2xla772x3kp4vnn38p9teuh5pa7p8dd40954szyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596pv8kmd" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsry3vn8vjj9u70telf3qxrgaewfzcy7nc4a360dfdfkhp82943pusg6h3dr&#39;&gt;nevent1q…h3dr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-03-09&lt;br/&gt;📝 Original message:Hi Matt,&lt;br/&gt;&lt;br/&gt;On Fri, Mar 8, 2019 at 1:35 PM Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Replies inline.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On 3/8/19 3:57 PM, Russell O&amp;#39;Connor wrote:&lt;br/&gt;&amp;gt; &amp;gt; On Thu, Mar 7, 2019 at 2:50 PM Matt Corallo &amp;lt;lf-lists at mattcorallo.com&lt;br/&gt;&amp;gt; &amp;gt; &amp;lt;mailto:lf-lists at mattcorallo.com&amp;gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; It&amp;#39;s very easy to construct a practical script using OP_CODESEPARATOR.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; IF &amp;lt;2&amp;gt; &amp;lt;ALICEPUBKEY&amp;gt; &amp;lt;BOBPUBKEY&amp;gt; &amp;lt;2&amp;gt; CHECKMULTISIGVERIFY ELSE&lt;br/&gt;&amp;gt; &amp;gt; CODESEPARATOR &amp;lt;ALICEPUBKEY&amp;gt; CHECKSIGVERFY ENDIF&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Now when someone hands Alice, the CFO of XYZ corp., some transaction,&lt;br/&gt;&amp;gt; &amp;gt; she has the option of either signing it unilaterally herself, or&lt;br/&gt;&amp;gt; &amp;gt; creating a partial signature such that the transaction additionally&lt;br/&gt;&amp;gt; &amp;gt; needs Bob, the CEOs signature as well, and Alice&amp;#39;s choice is committed&lt;br/&gt;&amp;gt; &amp;gt; to the blockchain for auditing purposes later.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Now, there are many things you might object about this scheme, but my&lt;br/&gt;&amp;gt; &amp;gt; point is that (A) regardless of what you think about this scheme, it, or&lt;br/&gt;&amp;gt; &amp;gt; similar schemes, may have been devised by users, and (B) users may have&lt;br/&gt;&amp;gt; &amp;gt; already committed funds to such schemes, and due to P2SH you cannot know&lt;br/&gt;&amp;gt; &amp;gt; that this is not the case.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The common way to set that up is to have a separate key, but, ok, fair&lt;br/&gt;&amp;gt; enough. That said, the argument that &amp;#34;it may be hidden by P2SH!&amp;#34; isn&amp;#39;t&lt;br/&gt;&amp;gt; sufficient here. It has to *both* be hidden by P2SH and have never been&lt;br/&gt;&amp;gt; spent from (either on mainnet or testnet) or be lock-timed a year in the&lt;br/&gt;&amp;gt; future. I&amp;#39;m seriously skeptical that someone is using a highly esoteric&lt;br/&gt;&amp;gt; scheme and has just been pouring money into it without ever having&lt;br/&gt;&amp;gt; tested it or having withdrawn any money from it whatsoever. This is just&lt;br/&gt;&amp;gt; a weird argument.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;No one is required to test their Scripts on a public testnet; they can use&lt;br/&gt;regtest. Because these transactions are non-standard on mainnet, it could&lt;br/&gt;take years to arrange for these funds to be recovered by having their&lt;br/&gt;transactions mined directly, or take years to become valuable enough to be&lt;br/&gt;worth bothering having them directly mined.  As I have noted elsewhere, you&lt;br/&gt;cannot first make transactions non-standard and then use the fact that you&lt;br/&gt;don&amp;#39;t see them being used on mainnet to justify a soft-fork.&lt;br/&gt;&lt;br/&gt;My argument isn&amp;#39;t weird; it is principled.  You are skeptical that any uses&lt;br/&gt;of OP_CODESEPARATOR have P2SH commitments.  I am also skeptical, and so is&lt;br/&gt;everyone reading this mailing list.  But none of us know this with&lt;br/&gt;certainty, and it is /wrong/ for any of us to gamble with other people&amp;#39;s&lt;br/&gt;money that our assumptions are true.&lt;br/&gt;&lt;br/&gt;Instead, it is this soft-fork proposal that is unprecedented. Let me&lt;br/&gt;reiterate what I posted in another thread:&lt;br/&gt;&lt;br/&gt;Bitcoin has *never* made a soft-fork, since the time of Satoishi, that&lt;br/&gt;invalidated transactions that send secured inputs to secured outputs&lt;br/&gt;(excluding uses of OP_NOP1-OP_NOP10).&lt;br/&gt;&lt;br/&gt;The fact that Bitcoin has stuck to this principle gives me and everyone&lt;br/&gt;else confidence in the protocol; that anyone can secure their funds by&lt;br/&gt;whatever scheme they dream up, and deploy it without needing permission or&lt;br/&gt;anyone else to vet their Scripts. So long as they are not impairing the&lt;br/&gt;Bitcoin protocol itself, the most that Bitcoin Core will do is stop&lt;br/&gt;relaying their transactions by default.&lt;br/&gt;&lt;br/&gt;Undermining this principle means undermining what provides Bitcoin&amp;#39;s value&lt;br/&gt;in the first place.&lt;br/&gt;&lt;br/&gt;The problem in this particular case is that there exist valid secure&lt;br/&gt;transactions that make use OP_CODESEPARATOR such that these transactions&lt;br/&gt;themselves impair the Bitcoin protocol (through excessive validation costs)&lt;br/&gt;in a way that, AFAIU, is fundamental to the nature of such transactions (in&lt;br/&gt;particular, it isn&amp;#39;t just due to an implementation detail of Bitcoin&lt;br/&gt;Core).  Thus to fix this vulnerability we must necessarily violate the&lt;br/&gt;principle of not invalidating, secure transactions.  However, this fact&lt;br/&gt;isn&amp;#39;t license to freely invalidate any transactions we want.  We ought to&lt;br/&gt;strive to minimize the scope of violation of this principle.  Alice and Bob&lt;br/&gt;from XYZ. corp should be able to keep their benign transaction illustrated&lt;br/&gt;above, and we only eliminate those transactions that actually impair the&lt;br/&gt;Bitcoin protocol.&lt;br/&gt;&lt;br/&gt;This is the perfect opportunity to show the world that Bitcoin Core simply&lt;br/&gt;doesn&amp;#39;t take chances when it comes to other people money.&lt;br/&gt;&lt;br/&gt;&amp;gt; Please don&amp;#39;t strawman my position.  I am not suggesting we don&amp;#39;t fix a&lt;br/&gt;&amp;gt; &amp;gt; vulnerability in Bitcoin.  I am suggesting we find another way.  One&lt;br/&gt;&amp;gt; &amp;gt; that limits the of risk destroying other people&amp;#39;s money.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Here is a more concrete proposal:  No matter how bad OP_CODESEPARATOR&lt;br/&gt;&amp;gt; &amp;gt; is, it cannot be worse than instead including another input that spends&lt;br/&gt;&amp;gt; &amp;gt; another identically sized UTXO.  So how about we soft-fork in a rule&lt;br/&gt;&amp;gt; &amp;gt; that says that an input&amp;#39;s weight is increased by an amount equal to the&lt;br/&gt;&amp;gt; &amp;gt; number of OP_CODESEPARATORs executed times the sum of weight of the UTXO&lt;br/&gt;&amp;gt; &amp;gt; being spent and 40 bytes, the weight of a stripped input. The risk of&lt;br/&gt;&amp;gt; &amp;gt; destroying other people&amp;#39;s money is limited and AFAIU it would completely&lt;br/&gt;&amp;gt; &amp;gt; address the vulnerabilities caused by OP_CODESEPARATOR.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; You&amp;#39;re already arguing that someone has such an esoteric use of script,&lt;br/&gt;&amp;gt; suggesting they aren&amp;#39;t *also* creating pre-signed, long-locktimed&lt;br/&gt;&amp;gt; transactions with many inputs isn&amp;#39;t much of a further stretch&lt;br/&gt;&amp;gt; (especially since this may result in the fee being non-standardly low if&lt;br/&gt;&amp;gt; you artificially increase its weight).&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;There is no consensus rule about minimum fees, and CPFP could add the more&lt;br/&gt;fees. But yes, I am saying that Alice and Bob could be building on their&lt;br/&gt;transaction illustrated above, but not creating a many input tx that&lt;br/&gt;wouldn&amp;#39;t fit into a block with my proposed added weight, because if their&lt;br/&gt;transaction won&amp;#39;t fit into a block with the added weight then it was a&lt;br/&gt;malicious transaction to begin with.&lt;br/&gt;&lt;br/&gt;Do you not recognize the material difference between a soft-fork that&lt;br/&gt;doubles the cost of a transaction like Alice and Bob&amp;#39;s versus making their&lt;br/&gt;transaction entirely illegal?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Note that &amp;#34;just limit number of OP_CODESEPARATOR calls&amp;#34; results in a ton&lt;br/&gt;&amp;gt; of complexity and reduces the simple analysis that fees (almost) have&lt;br/&gt;&amp;gt; today vs just removing it allows us to also remove a ton of code.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Further note that if you don&amp;#39;t remove it getting the efficiency wins&lt;br/&gt;&amp;gt; right is even harder because instead of being able to cache sighashes&lt;br/&gt;&amp;gt; you now have to (at a minimum) wipe the cache between each&lt;br/&gt;&amp;gt; OP_CODESEPARATOR call, which results in a ton of additional&lt;br/&gt;&amp;gt; implementation complexity.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;How can this be &amp;#34;additional&amp;#34; complexity when this is how the protocol works&lt;br/&gt;today?  All you have to do is not change the semantics of&lt;br/&gt;OP_CODESEPARATOR.  It is literally no work.&lt;br/&gt;Regarding the efficiency wins, let me repeat myself: The performance costs&lt;br/&gt;of wiping the cached sighashs is not worse than what the performance costs&lt;br/&gt;would be if the transaction had an additional input spending an equally&lt;br/&gt;sized UTXO.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;      &amp;gt; I suggest an alternative whereby the execution of OP_CODESEPARATOR&lt;br/&gt;&amp;gt; &amp;gt;      &amp;gt; increases the transactions weight suitably as to temper the&lt;br/&gt;&amp;gt; &amp;gt;      &amp;gt; vulnerability caused by it.  Alternatively there could be some&lt;br/&gt;&amp;gt; &amp;gt;     sort of&lt;br/&gt;&amp;gt; &amp;gt;      &amp;gt; limit (maybe 1) on the maximum number of OP_CODESEPARATORs&lt;br/&gt;&amp;gt; &amp;gt;     allowed to be&lt;br/&gt;&amp;gt; &amp;gt;      &amp;gt; executed per script, but that would require an argument as to why&lt;br/&gt;&amp;gt; &amp;gt;      &amp;gt; exceeding that limit isn&amp;#39;t reasonable.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     You could equally argue, however, that any such limit could render&lt;br/&gt;&amp;gt; some&lt;br/&gt;&amp;gt; &amp;gt;     moderately-large transaction unspendable, so I&amp;#39;m somewhat skeptical&lt;br/&gt;&amp;gt; of&lt;br/&gt;&amp;gt; &amp;gt;     this argument. Note that OP_CODESEPARATOR is non-standard, so getting&lt;br/&gt;&amp;gt; &amp;gt;     them mined is rather difficult in any case.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I already know of people who&amp;#39;s funds are tied up due to in other changes&lt;br/&gt;&amp;gt; &amp;gt; to Bitcoin Core&amp;#39;s default relay policy.  Non-standardness is not an&lt;br/&gt;&amp;gt; &amp;gt; excuse to take other people&amp;#39;s tied up funds and destroy them permanently.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Huh?! The whole point of non-standardness in this context is to (a) make&lt;br/&gt;&amp;gt; soft-forking something out safer by derisking miners not upgrading right&lt;br/&gt;&amp;gt; away and (b) signal something that may be a candidate for soft-forking&lt;br/&gt;&amp;gt; out so that we get feedback. Who is getting things disabled who isn&amp;#39;t&lt;br/&gt;&amp;gt; bothering to *tell* people that their use-case is being hurt?!&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;People have told me that they are hurt by some other non-standardness&lt;br/&gt;changes and I understand that they have been sitting on those funds for&lt;br/&gt;years.  Maybe they don&amp;#39;t realize their is some place to complain or maybe&lt;br/&gt;they think there must be a good reason why they are not allowed to do what&lt;br/&gt;they were previously allowed to do.  Perhaps others don&amp;#39;t want to risk&lt;br/&gt;blowing their pseudonymity.  Perhaps they think that attempting to undo&lt;br/&gt;some of these non-standardness changes is futile.  I can bring up the&lt;br/&gt;specific cases I&amp;#39;ve encountered in a new thread if you think it is&lt;br/&gt;worthwhile.&lt;br/&gt;&lt;br/&gt;Regarding OP_CODESEAPRATOR specifically, disabling the rely of such&lt;br/&gt;transactions partially mitigates the vulnerability.  Once the vulnerability&lt;br/&gt;is properly patched, for example by suitably increasing the weight of the&lt;br/&gt;operation or opcode, we could drop the prohibition on relaying such&lt;br/&gt;transactions.  Non-standardness is not necessarily a path to a new&lt;br/&gt;consensus rule. We have several non-standardness rules in place that are&lt;br/&gt;never intended to become new consensus rules.  Sometimes non-standardness&lt;br/&gt;is a temporary mitigation.&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/20190309/9a5108cc/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190309/9a5108cc/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:16:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxfv3a2yp3gl99frg4fkdux6u538enn9fg38x3da5ct26j5jc8nugzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596fsuhkn</id>
    
      <title type="html">📅 Original date posted:2019-03-08 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxfv3a2yp3gl99frg4fkdux6u538enn9fg38x3da5ct26j5jc8nugzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596fsuhkn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs97n563a374wtu8sark06arwz6meerp7nlutl92k6l657r6k94l2g3hr4nh&#39;&gt;nevent1q…r4nh&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-03-08&lt;br/&gt;📝 Original message:On Thu, Mar 7, 2019 at 2:50 PM Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Replies inline.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Matt&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On 3/7/19 3:03 PM, Russell O&amp;#39;Connor wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     * OP_CODESEPARATOR in non-BIP 143 scripts fails the script&lt;br/&gt;&amp;gt; validation.&lt;br/&gt;&amp;gt; &amp;gt;     This includes OP_CODESEPARATORs in unexecuted branches of if&lt;br/&gt;&amp;gt; &amp;gt;     statements,&lt;br/&gt;&amp;gt; &amp;gt;     similar to other disabled opcodes, but unlike OP_RETURN.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; OP_CODESEPARATOR is the only mechanism available that allows users to&lt;br/&gt;&amp;gt; &amp;gt; sign which particular branch they are authorizing for within scripts&lt;br/&gt;&amp;gt; &amp;gt; that have multiple possible conditions that reuse the same public key.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is true, and yet it does not appear to actually be practically&lt;br/&gt;&amp;gt; usable. Thus far, despite a ton of effort, I have not yet seen a&lt;br/&gt;&amp;gt; practical use-case for OP_CODESEPARATOR (except for one example of it&lt;br/&gt;&amp;gt; being used to make SegWit scripts ever-so-slightly more effecient in&lt;br/&gt;&amp;gt; TumbleBit, hence why this BIP does not propose disabling it for SegWit).&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;It&amp;#39;s very easy to construct a practical script using OP_CODESEPARATOR.&lt;br/&gt;&lt;br/&gt;IF &amp;lt;2&amp;gt; &amp;lt;ALICEPUBKEY&amp;gt; &amp;lt;BOBPUBKEY&amp;gt; &amp;lt;2&amp;gt; CHECKMULTISIGVERIFY ELSE CODESEPARATOR&lt;br/&gt;&amp;lt;ALICEPUBKEY&amp;gt; CHECKSIGVERFY ENDIF&lt;br/&gt;&lt;br/&gt;Now when someone hands Alice, the CFO of XYZ corp., some transaction, she&lt;br/&gt;has the option of either signing it unilaterally herself, or creating a&lt;br/&gt;partial signature such that the transaction additionally needs Bob, the&lt;br/&gt;CEOs signature as well, and Alice&amp;#39;s choice is committed to the blockchain&lt;br/&gt;for auditing purposes later.&lt;br/&gt;&lt;br/&gt;Now, there are many things you might object about this scheme, but my point&lt;br/&gt;is that (A) regardless of what you think about this scheme, it, or similar&lt;br/&gt;schemes, may have been devised by users, and (B) users may have already&lt;br/&gt;committed funds to such schemes, and due to P2SH you cannot know that this&lt;br/&gt;is not the case.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Because of P2SH you cannot know that no one is currently using this&lt;br/&gt;&amp;gt; &amp;gt; feature.  Activating a soft-fork as describe above means these sorts of&lt;br/&gt;&amp;gt; &amp;gt; funds would be permanently lost.  It is not acceptable to risk people&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt; money like this.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (1) It has been well documented again and again that there is desire to&lt;br/&gt;&amp;gt; remove OP_CODESEPARATOR, (2) it is well-documented OP_CODESEPARATOR in&lt;br/&gt;&amp;gt; non-segwit scripts represents a rather significant vulnerability in&lt;br/&gt;&amp;gt; Bitcoin today, and (3) lots of effort has gone into attempting to find&lt;br/&gt;&amp;gt; practical use-cases for OP_CODESEPARATOR&amp;#39;s specific construction, with&lt;br/&gt;&amp;gt; no successes as of yet. I strongly, strongly disagree that the&lt;br/&gt;&amp;gt; highly-unlikely remote possibility that someone created something before&lt;br/&gt;&amp;gt; which could be rendered unspendable is sufficient reason to not fix a&lt;br/&gt;&amp;gt; vulnerability in Bitcoin today.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Please don&amp;#39;t strawman my position.  I am not suggesting we don&amp;#39;t fix a&lt;br/&gt;vulnerability in Bitcoin.  I am suggesting we find another way.  One that&lt;br/&gt;limits the of risk destroying other people&amp;#39;s money.&lt;br/&gt;&lt;br/&gt;Here is a more concrete proposal:  No matter how bad OP_CODESEPARATOR is,&lt;br/&gt;it cannot be worse than instead including another input that spends another&lt;br/&gt;identically sized UTXO.  So how about we soft-fork in a rule that says that&lt;br/&gt;an input&amp;#39;s weight is increased by an amount equal to the number of&lt;br/&gt;OP_CODESEPARATORs executed times the sum of weight of the UTXO being spent&lt;br/&gt;and 40 bytes, the weight of a stripped input. The risk of destroying other&lt;br/&gt;people&amp;#39;s money is limited and AFAIU it would completely address the&lt;br/&gt;vulnerabilities caused by OP_CODESEPARATOR.&lt;br/&gt;&lt;br/&gt;Even soft forking a rule like, &amp;#34;it is illegal to execute an&lt;br/&gt;OP_CODESEPARATOR after any CHECKSIG/CHECKMULTISIG operation&amp;#34;, would be&lt;br/&gt;vastly better than the current proposal, even though I would still object&lt;br/&gt;to it.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; I suggest an alternative whereby the execution of OP_CODESEPARATOR&lt;br/&gt;&amp;gt; &amp;gt; increases the transactions weight suitably as to temper the&lt;br/&gt;&amp;gt; &amp;gt; vulnerability caused by it.  Alternatively there could be some sort of&lt;br/&gt;&amp;gt; &amp;gt; limit (maybe 1) on the maximum number of OP_CODESEPARATORs allowed to be&lt;br/&gt;&amp;gt; &amp;gt; executed per script, but that would require an argument as to why&lt;br/&gt;&amp;gt; &amp;gt; exceeding that limit isn&amp;#39;t reasonable.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; You could equally argue, however, that any such limit could render some&lt;br/&gt;&amp;gt; moderately-large transaction unspendable, so I&amp;#39;m somewhat skeptical of&lt;br/&gt;&amp;gt; this argument. Note that OP_CODESEPARATOR is non-standard, so getting&lt;br/&gt;&amp;gt; them mined is rather difficult in any case.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;I already know of people who&amp;#39;s funds are tied up due to in other changes to&lt;br/&gt;Bitcoin Core&amp;#39;s default relay policy.  Non-standardness is not an excuse to&lt;br/&gt;take other people&amp;#39;s tied up funds and destroy them permanently.&lt;br/&gt;&lt;br/&gt;There is some sort of crisis in the Bitcoin protocol stemming from the&lt;br/&gt;possible excessive usage of OP_CODESEPARTOR otherwise we wouldn&amp;#39;t even be&lt;br/&gt;considering this soft fork.  Fine.  But presumably it is impossible for a&lt;br/&gt;transaction to both be produced in good faith for legitimate use and at the&lt;br/&gt;same time are expensive enough to be used as an attack vector, and&lt;br/&gt;hopefully there is a wide gap between these two cases.  So let&amp;#39;s draw a&lt;br/&gt;line between the two cases to rule out attacks while allowing legitimate&lt;br/&gt;uses by simply suitably pricing the OP_CODESEPARATOR opcode by weight.  At&lt;br/&gt;worst case this moderately-large transaction is very expensive, reflecting&lt;br/&gt;its true cost, or is was so expensive that it couldn&amp;#39;t possibly have been&lt;br/&gt;legitimate to begin with since the resources to validate it exceed the&lt;br/&gt;amount that are reasonable to validate an entire block of regular&lt;br/&gt;transactions.&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/20190308/b6349b97/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190308/b6349b97/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:16:45&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxy63uuq72zvw2sr2l96tkufa9fmcgugjjktlzezwclusa2wntthgzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596x458jp</id>
    
      <title type="html">📅 Original date posted:2019-03-07 📝 Original message:&amp;gt; * ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxy63uuq72zvw2sr2l96tkufa9fmcgugjjktlzezwclusa2wntthgzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596x458jp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8rz8v5c9eg9x2etvjylgs0rsz3xl8u79dm4t9z4sx396pnwev7sch265jt&#39;&gt;nevent1q…65jt&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-03-07&lt;br/&gt;📝 Original message:&amp;gt; * OP_CODESEPARATOR in non-BIP 143 scripts fails the script validation.&lt;br/&gt;&amp;gt; This includes OP_CODESEPARATORs in unexecuted branches of if statements,&lt;br/&gt;&amp;gt; similar to other disabled opcodes, but unlike OP_RETURN.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;OP_CODESEPARATOR is the only mechanism available that allows users to sign&lt;br/&gt;which particular branch they are authorizing for within scripts that have&lt;br/&gt;multiple possible conditions that reuse the same public key.  Because of&lt;br/&gt;P2SH you cannot know that no one is currently using this feature.&lt;br/&gt;Activating a soft-fork as describe above means these sorts of funds would&lt;br/&gt;be permanently lost.  It is not acceptable to risk people&amp;#39;s money like this.&lt;br/&gt;&lt;br/&gt;I suggest an alternative whereby the execution of OP_CODESEPARATOR&lt;br/&gt;increases the transactions weight suitably as to temper the vulnerability&lt;br/&gt;caused by it.  Alternatively there could be some sort of limit (maybe 1) on&lt;br/&gt;the maximum number of OP_CODESEPARATORs allowed to be executed per script,&lt;br/&gt;but that would require an argument as to why exceeding that limit isn&amp;#39;t&lt;br/&gt;reasonable.&lt;br/&gt;&lt;br/&gt;-- &lt;br/&gt;Russell O&amp;#39;Connor&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/20190307/0f0ed246/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190307/0f0ed246/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:16:44&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspuenlwt4n2fu2nnhcp2eq2n0v2taythrylzc2x3xmcga8xmzh97szyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596650u4k</id>
    
      <title type="html">📅 Original date posted:2018-12-11 📝 Original message:I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspuenlwt4n2fu2nnhcp2eq2n0v2taythrylzc2x3xmcga8xmzh97szyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596650u4k" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxu4vq8zf8pvmxe6ln7hg9ul98kn92kddkd0kfvgd9pzscqengd0gz3y4vx&#39;&gt;nevent1q…y4vx&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-12-11&lt;br/&gt;📝 Original message:I don&amp;#39;t believe that the default RBF policy works that way.  My&lt;br/&gt;understanding is that current policy requires an absolute fee increase (by&lt;br/&gt;an amount related to incrementalrelayfee).  There have been proposals to&lt;br/&gt;change default RBF policy, however even my proposal &amp;lt;&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-February/015717.html&amp;gt&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-February/015717.html&amp;gt&lt;/a&gt;;&lt;br/&gt;still requires a minimal amount of absolute fee increase as a DoS defense.&lt;br/&gt;&lt;br/&gt;(I&amp;#39;m reading your comment as attempting to rebroadcast the original&lt;br/&gt;transaction with the same fee amount, with its relatively higher fee-rate).&lt;br/&gt;&lt;br/&gt;On Mon, Dec 10, 2018 at 10:00 AM David A. Harding &amp;lt;dave at dtrt.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Thu, Dec 06, 2018 at 11:57:09AM -0500, Russell O&amp;#39;Connor via bitcoin-dev&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; One more item to consider is &amp;#34;signature covers witness weight&amp;#34;.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; While signing the witness weight doesn&amp;#39;t completely eliminate witness&lt;br/&gt;&amp;gt; &amp;gt; malleability (of the kind that can cause grief for compact blocks), it&lt;br/&gt;&amp;gt; does&lt;br/&gt;&amp;gt; &amp;gt; eliminate the worst kind of witness malleability from the user&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt; perspective, the kind where malicious relay nodes increase the amount of&lt;br/&gt;&amp;gt; &amp;gt; witness data and therefore reduce the overall fee-rate of the&lt;br/&gt;&amp;gt; transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To what degree is this an actual problem?  If the mutated transaction&lt;br/&gt;&amp;gt; pays a feerate at least incremental-relay-fee[1] below the original&lt;br/&gt;&amp;gt; transaction, then the original transaction can be rebroadcast as an RBF&lt;br/&gt;&amp;gt; replacement of the mutated transaction (unless the mutated version has&lt;br/&gt;&amp;gt; been pinned[2]).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -Dave&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1] $ bitcoind -help-debug | grep -A2 incremental&lt;br/&gt;&amp;gt;   -incrementalrelayfee=&amp;lt;amt&amp;gt;&lt;br/&gt;&amp;gt;        Fee rate (in BTC/kB) used to define cost of relay, used for mempool&lt;br/&gt;&amp;gt;        limiting and BIP 125 replacement. (default: 0.00001)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [2]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://bitcoin.stackexchange.com/questions/80803/what-is-meant-by-transaction-pinning&#34;&gt;https://bitcoin.stackexchange.com/questions/80803/what-is-meant-by-transaction-pinning&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20181211/ba277d2d/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20181211/ba277d2d/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:15:35&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsyd8v92p67r63tnurdf4g32gh6tn6x3yapczwm9jptrdxk3wlfe3czyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j59654gt8v</id>
    
      <title type="html">📅 Original date posted:2018-12-13 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsyd8v92p67r63tnurdf4g32gh6tn6x3yapczwm9jptrdxk3wlfe3czyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j59654gt8v" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst8qad4vsx2yy2njrq0ahm923kj4fllel82lwct6pmvrrgsutaj2gmkjgqt&#39;&gt;nevent1q…jgqt&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-12-13&lt;br/&gt;📝 Original message:On Wed, Dec 12, 2018 at 2:53 PM Johnson Lau &amp;lt;jl2012 at xbt.hk&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think the root cause of witness weight malleability is some opcodes&lt;br/&gt;&amp;gt; accept variable size input (without affecting the output), and that input&lt;br/&gt;&amp;gt; is provided by the puzzle solver. Going through the opcode list, I think&lt;br/&gt;&amp;gt; such opcodes include IF, NOTIF, VERIFY, DROP, 2DROP, NIP, DEPTH, and all&lt;br/&gt;&amp;gt; arithmetic opcode that accepts CScriptNum (including CHECKMULTISIG)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; VERIFY, DROP, 2DROP, NIP are not real problem, since they should not be&lt;br/&gt;&amp;gt; the first opcode to interact with data directly provided by the puzzle&lt;br/&gt;&amp;gt; solver.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; CHECKMULTISIG is fixed by BIP147. For the key number and sig number, they&lt;br/&gt;&amp;gt; should be part of the script, so not malleable.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; DEPTH is a problem only if its inputs are not later examined by other&lt;br/&gt;&amp;gt; opcodes. Again, this is pointless.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The liberally example should be protected by the MINIMAL_IF policy, which&lt;br/&gt;&amp;gt; requires the input of OP_IF be minimal. As you note, OP_IF could be&lt;br/&gt;&amp;gt; replaced by taproot in many cases&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Non-minimal CScriptNum is also banned as BIP62 policy.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For the purpose of preventing malicious third party witness bloating, all&lt;br/&gt;&amp;gt; we need is the miners to enforce the policy. There is no reason for miners&lt;br/&gt;&amp;gt; to accept size malleated txs, as that will reduce the usable block space.&lt;br/&gt;&amp;gt; If they hate a tx, they would simply drop it, instead of wasting the block&lt;br/&gt;&amp;gt; space.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t know if it such a clear cut case for miner&amp;#39;s policy.  A miner is&lt;br/&gt;passed a malleated tx.  They know that there is probably a non-malleated&lt;br/&gt;variant floating around out there somewhere, and they would rather have&lt;br/&gt;it.  But right now they don&amp;#39;t, and they probably not going to try to&lt;br/&gt;unmalleate it themselves.  So, why not stick it into their mempool?  If it&lt;br/&gt;eventually makes it into one of their blocks, then it will because it has&lt;br/&gt;the best fee rate available, and to reject it outright is harmful to their&lt;br/&gt;bottom line.  If they find the non-malleated variant later, great, they can&lt;br/&gt;replace it and gain a higher-fee rate tx.  Of course, such a policy opens&lt;br/&gt;them up to a Denial of Service attack.&lt;br/&gt;&lt;br/&gt;So what do they do?  Do they accept malleated tx&amp;#39;s and implement an RBF&lt;br/&gt;policy that requires sufficient fee rate increases?  Do they reject&lt;br/&gt;malleated txs outright to avoid falling in this trap in the first place as&lt;br/&gt;you suggest?  I don&amp;#39;t know, but I don&amp;#39;t think things are as clear cut as&lt;br/&gt;you present.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;That aside, your list of weight malleable opcodes is shorter than I&lt;br/&gt;imagined and I&amp;#39;m grateful you&amp;#39;ve compiled it.  Perhaps the best solution is&lt;br/&gt;to make MINIMAL_IF and minimal CScriptNum consensus enforced in the next&lt;br/&gt;version of Script and all but eliminate weight malleability in practice?&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/20181213/b5787537/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20181213/b5787537/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:15:34&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszl4nmgq0tmusqvn0z33n9jk04uczdvsgxvpc39ffkuerzskv0u6qzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596tx2au5</id>
    
      <title type="html">📅 Original date posted:2018-12-11 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszl4nmgq0tmusqvn0z33n9jk04uczdvsgxvpc39ffkuerzskv0u6qzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596tx2au5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfyt7quwadm49yt2slxucr53g6fardlyqyhg7tdz7vwrndy223e5supxa83&#39;&gt;nevent1q…xa83&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-12-11&lt;br/&gt;📝 Original message:On Sun, Dec 9, 2018 at 2:13 PM Johnson Lau &amp;lt;jl2012 at xbt.hk&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; The current proposal is that a 64-byte signature will be used for the&lt;br/&gt;&amp;gt; default “signing all” sighash, and 65-byte for other sighash types. The&lt;br/&gt;&amp;gt; space saved will allow a few more txs in a block, so I think it worths&lt;br/&gt;&amp;gt; doing. However, this also makes witness weight estimation more difficult in&lt;br/&gt;&amp;gt; multisig cases.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This idea of signing witness weight has been brought up before. I think&lt;br/&gt;&amp;gt; the concern is the difficulty to estimate the witness weight for complex&lt;br/&gt;&amp;gt; scripts, which need this feature most. So it will work when it is not&lt;br/&gt;&amp;gt; needed, and will not work when it is needed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Is there any script example that witness size malleability is unavoidable?&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;I tend to think in opposite terms. Is there a proof that any script can be&lt;br/&gt;transformed into an equivalent one that avoids witness weight&lt;br/&gt;malleability?   But I admit there is a trade off:  If we don&amp;#39;t allow for&lt;br/&gt;signature covers weight, and we do need it, it will be too late to add.  On&lt;br/&gt;the other hand if we add signature covers weight, but it turns out that no&lt;br/&gt;Script ever needs to use it, then we&amp;#39;ve added that software complexity for&lt;br/&gt;no gain.  However, I think the software complexity is relatively low,&lt;br/&gt;making it worthwhile.&lt;br/&gt;&lt;br/&gt;Moreover, even if witness weight malleability is entirely avoidable, it&lt;br/&gt;always seems to come at a cost.  Taking as an example libwally&amp;#39;s proposed &amp;#34;&lt;br/&gt;&amp;lt;&lt;a href=&#34;https://github.com/ElementsProject/libwally-core/blob/c6db6ccdfa54571afeeb582919240263424736a2/src/script.c#L718-L735&amp;gt;csv_2of3_then_2&amp;#34&#34;&gt;https://github.com/ElementsProject/libwally-core/blob/c6db6ccdfa54571afeeb582919240263424736a2/src/script.c#L718-L735&amp;gt;csv_2of3_then_2&amp;#34&lt;/a&gt;;&lt;br/&gt;Script&lt;br/&gt;&amp;lt;&lt;a href=&#34;https://github.com/ElementsProject/libwally-core/blob/c6db6ccdfa54571afeeb582919240263424736a2/src/script.c#L718-L735&amp;gt&#34;&gt;https://github.com/ElementsProject/libwally-core/blob/c6db6ccdfa54571afeeb582919240263424736a2/src/script.c#L718-L735&amp;gt&lt;/a&gt;;,&lt;br/&gt;it begins with &amp;#34;OP_DEPTH OP_1SUB OP_1SUB&amp;#34; spending 3 vbytes to avoid any&lt;br/&gt;possible witness malleability versus just taking a witness stack item to&lt;br/&gt;determine the branch, costing 1 or 2 (unmalleated) vbytes.  Now to be fair,&lt;br/&gt;under Taproot this particular script&amp;#39;s witness malleability problem&lt;br/&gt;probably goes away.  Nonetheless, I think it is fair to say that Bitcoin&lt;br/&gt;Script was designed without any regard given to scriptSig/witness&lt;br/&gt;malleability concerns and the result is that one is constantly fighting&lt;br/&gt;against malleability issues.  Short of a wholesale replacement of Bitcoin&lt;br/&gt;Script, I do think that having an option for signature covers weight is one&lt;br/&gt;of the best ways to address the whole problem.&lt;br/&gt;&lt;br/&gt;Regarding your point about 64/65-byte signatures; I speculate that in most&lt;br/&gt;protocols, all parties that are able to consider signing the weight, know&lt;br/&gt;what sighash flags the other parties are expected to be using.  However,&lt;br/&gt;your point is well-taken, and if we choose to adopt the option of&lt;br/&gt;signatures covering weight, we ought to make sure there exists a 65-byte&lt;br/&gt;signature that performs the equivalent of a sigHashAll (of course, still&lt;br/&gt;covering that particular sighash flag under the signature), to ensure that&lt;br/&gt;anti-weight-malleability can be use even when the sighash flags that other&lt;br/&gt;parties will use are unknown.  Even with the extra vbytes in the&lt;br/&gt;signatures, there may be a net weight savings by avoiding the need for&lt;br/&gt;anti-malleability Script code. (It might also be reasonable to have&lt;br/&gt;participants create signatures for a small range of different weight&lt;br/&gt;values? (Sorry in advance to PSBT)).&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/20181211/1f119c76/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20181211/1f119c76/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:15:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdm09z272crnmcvtar4km0wjl4xupq7ls2try7pl9ruwz35xhswmqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596kf96d7</id>
    
      <title type="html">📅 Original date posted:2018-12-06 📝 Original message:One ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdm09z272crnmcvtar4km0wjl4xupq7ls2try7pl9ruwz35xhswmqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596kf96d7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs80jpymps7f96epxgm0hy5pf6hsld3rfaja2m2mn64v0ggg7jd7xqe8rnld&#39;&gt;nevent1q…rnld&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-12-06&lt;br/&gt;📝 Original message:One more item to consider is &amp;#34;signature covers witness weight&amp;#34;.&lt;br/&gt;&lt;br/&gt;While signing the witness weight doesn&amp;#39;t completely eliminate witness&lt;br/&gt;malleability (of the kind that can cause grief for compact blocks), it does&lt;br/&gt;eliminate the worst kind of witness malleability from the user&amp;#39;s&lt;br/&gt;perspective, the kind where malicious relay nodes increase the amount of&lt;br/&gt;witness data and therefore reduce the overall fee-rate of the transaction.&lt;br/&gt;Generally users should strive to construct their Bitcoin Scripts in such a&lt;br/&gt;way that witness malleability isn&amp;#39;t possible, but as you are probably&lt;br/&gt;aware, this can be quite difficult to achieve as Scripts become more&lt;br/&gt;complex and maybe isn&amp;#39;t even possible for some complex Scripts.&lt;br/&gt;&lt;br/&gt;Given the new fixed-sized signature of the Schnorr BIP, it becomes much&lt;br/&gt;easier to compute the final witness weight prior to signing.  In complex&lt;br/&gt;multi-party signing protocol, the final witness weight might not be known&lt;br/&gt;at signing time for everyone involved, so the &amp;#34;signature covers witness&lt;br/&gt;weight&amp;#34; ought to be optional.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Tue, Nov 27, 2018 at 11:59 PM Pieter Wuille via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Mon, 19 Nov 2018 at 14:37, Pieter Wuille &amp;lt;pieter.wuille at gmail.com&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; Here is a combined proposal:&lt;br/&gt;&amp;gt; &amp;gt; * Three new sighash flags are added: SIGHASH_NOINPUT, SIGHASH_NOFEE, and&lt;br/&gt;&amp;gt; SIGHASH_SCRIPTMASK.&lt;br/&gt;&amp;gt; &amp;gt; * A new opcode OP_MASK is added, which acts as a NOP during execution.&lt;br/&gt;&amp;gt; &amp;gt; * The sighash is computed like in BIP143, but:&lt;br/&gt;&amp;gt; &amp;gt;   * If SIGHASH_SCRIPTMASK is present, for every OP_MASK in scriptCode&lt;br/&gt;&amp;gt; the subsequent opcode/push is removed.&lt;br/&gt;&amp;gt; &amp;gt;   * The scriptPubKey being spent is added to the sighash, unless&lt;br/&gt;&amp;gt; SIGHASH_SCRIPTMASK is set.&lt;br/&gt;&amp;gt; &amp;gt;   * The transaction fee is added to the sighash, unless SIGHASH_NOFEE is&lt;br/&gt;&amp;gt; set.&lt;br/&gt;&amp;gt; &amp;gt;   * hashPrevouts, hashSequence, and outpoint are set to null when&lt;br/&gt;&amp;gt; SIGHASH_NOINPUT is set (like BIP118, but not for scriptCode).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks for all the input so far. Going over the suggestions and other&lt;br/&gt;&amp;gt; ideas:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * OP_MASK should be required to be followed by a push, as suggested by&lt;br/&gt;&amp;gt; Anthony Towns. The alternative would permit substituting arbitrary&lt;br/&gt;&amp;gt; opcodes for masked pushes, which is at least very hard to reason&lt;br/&gt;&amp;gt; about. This would effectively turn it into a multi-byte OP_MASKEDPUSH&lt;br/&gt;&amp;gt; opcode.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * It&amp;#39;s probably better to sign the amounts of all inputs, as suggested&lt;br/&gt;&amp;gt; by Johnson Lau. As that would cause default sighashes to sign all&lt;br/&gt;&amp;gt; input and output amounts, is there still a need to sign the tx fee&lt;br/&gt;&amp;gt; explicitly? Or in other words, are there situations where changing the&lt;br/&gt;&amp;gt; set of inputs or outputs after signing is desired, but the net&lt;br/&gt;&amp;gt; difference between them cannot change? If not, that would remove the&lt;br/&gt;&amp;gt; need for NOFEE.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Do we need to keep the rule that sequence values of other inputs are&lt;br/&gt;&amp;gt; only signed with default sighash? It feels cleaner to always sign the&lt;br/&gt;&amp;gt; sequence values of all inputs that are included in the sighash anyway&lt;br/&gt;&amp;gt; (so all of them, unless ANYONECANPAY or NOINPUT, which would make it&lt;br/&gt;&amp;gt; sign only the current input&amp;#39;s sequence value). If NOINPUT also blanks&lt;br/&gt;&amp;gt; the sequence values (as currently specified by BIP118), and all input&lt;br/&gt;&amp;gt; amounts are signed, that would make amounts/sequence values always be&lt;br/&gt;&amp;gt; treated identically.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * If MASK implies NOINPUT, and NOINPUT implies ANYONECANPAY, the 3 of&lt;br/&gt;&amp;gt; them can be encoded in just 2 bits using the&lt;br/&gt;&amp;gt; PARTIALSCRIPT/KNOWNSCRIPT/KNOWNTX/ALL_INPUTS encoding Anthony Towns&lt;br/&gt;&amp;gt; suggested.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Regarding the discussion about preventing signatures from being&lt;br/&gt;&amp;gt; rebound to a different script(path)/checksig:&lt;br/&gt;&amp;gt;   * With MAST there is indeed less need for this, but at least&lt;br/&gt;&amp;gt; single-tree MAST constructions cannot replace all script branches (a&lt;br/&gt;&amp;gt; script with 40 IF/THEN/ELSE constructions may have 2^40 different&lt;br/&gt;&amp;gt; execution paths, for which computing a Merkle tree is intractable).&lt;br/&gt;&amp;gt;   * Just signing the opcode position of the CHECKSIG operator isn&amp;#39;t&lt;br/&gt;&amp;gt; enough for all cases either. For example, you could have a complex&lt;br/&gt;&amp;gt; nested set of branches that puts a number of pubkeys on the stack, and&lt;br/&gt;&amp;gt; then a CHECKMULTISIG after the last ENDIF to verify all of them. In&lt;br/&gt;&amp;gt; such a situation, if the same key can occur in multiple combinations,&lt;br/&gt;&amp;gt; you still may want to prevent a signature generated for one&lt;br/&gt;&amp;gt; combination from being rebindable to the same key in another&lt;br/&gt;&amp;gt; combination. I believe that signing the opcode position plus the&lt;br/&gt;&amp;gt; true/false condition of all previous(?) IF statements is probably&lt;br/&gt;&amp;gt; sufficient to achieve that, but it would also introduce unnecessary&lt;br/&gt;&amp;gt; complexity for signers in most cases (see next point).&lt;br/&gt;&amp;gt;   * Thinking about signing code, adding these sort of execution trace&lt;br/&gt;&amp;gt; commitments to the sighash means they need to know which checksig&lt;br/&gt;&amp;gt; operator etc. they are signing for. I believe that in practice for&lt;br/&gt;&amp;gt; example HW devices will just whatever position the wallet indicated,&lt;br/&gt;&amp;gt; rather than verifying it corresponds with a particular intended code&lt;br/&gt;&amp;gt; path. Preventing rebinding isn&amp;#39;t very useful if an attacker can make&lt;br/&gt;&amp;gt; you bind to the wrong thing regardless, so I&amp;#39;m not convinced this is&lt;br/&gt;&amp;gt; even worth having by default.&lt;br/&gt;&amp;gt;   * An alternative (not sure who suggested it) is to simply make every&lt;br/&gt;&amp;gt; CHECKSIG sign the opcode position of the last executed CODESEPARATOR&lt;br/&gt;&amp;gt; (and remove the earlier cut-of-scriptCode effect of CODESEPARATOR).&lt;br/&gt;&amp;gt; This gives a simple (but somewhat limited) way for scripts that need&lt;br/&gt;&amp;gt; to prevent certain kinds of cross-execution-trace rebinding.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A few misc ideas:&lt;br/&gt;&amp;gt; * (Taken from&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/jl2012/bips/blob/sighash2/bip-sighash2.mediawiki&#34;&gt;https://github.com/jl2012/bips/blob/sighash2/bip-sighash2.mediawiki&lt;/a&gt;)&lt;br/&gt;&amp;gt; For a default sign-everything sighash, the sighash byte can be&lt;br/&gt;&amp;gt; dropped.&lt;br/&gt;&amp;gt; * For the commitments to the scriptPubKey and scriptCode, an&lt;br/&gt;&amp;gt; intermediary hash should be used (so the data included in the sighash&lt;br/&gt;&amp;gt; includes a hash of those, rather than the script directly). This&lt;br/&gt;&amp;gt; prevents a blow up in hashing time for large scripts with many&lt;br/&gt;&amp;gt; different sighash types in its signatures.&lt;br/&gt;&amp;gt; * When masking the scriptCode, the push opcode immediately following&lt;br/&gt;&amp;gt; OP_MASKEDPUSH can be replaced by OP_VERIF (which will never collide&lt;br/&gt;&amp;gt; with any real script, as OP_VERIF makes a script invalid even when&lt;br/&gt;&amp;gt; occurring in an unexecuted branch).&lt;br/&gt;&amp;gt; * Sighashes (and really all new hashes that are introduced) should be&lt;br/&gt;&amp;gt; prefixed with a fixed 64-byte array as &amp;#34;tag&amp;#34;, chosen to not collide&lt;br/&gt;&amp;gt; with any existing use of SHA256 in Bitcoin, to prevent signatures from&lt;br/&gt;&amp;gt; being re-interpretable as something else. Picking 64 bytes as tag size&lt;br/&gt;&amp;gt; means it can be efficiently implemented as just a modified SHA256 IV.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So a combined proposal:&lt;br/&gt;&amp;gt; * All existing sighash flags, plus NOINPUT and MASK&lt;br/&gt;&amp;gt; (ANYONECANPAY/NOINPUT/MASK are encoded in 2 bits).&lt;br/&gt;&amp;gt; * A new opcode called OP_MASKEDPUSH, whose only runtime behaviour is&lt;br/&gt;&amp;gt; failing if not immediately followed by a push, or when appearing as&lt;br/&gt;&amp;gt; last opcode in the script.&lt;br/&gt;&amp;gt; * Signatures are 64 plus an optional sighash byte. A missing sighash&lt;br/&gt;&amp;gt; byte implies ALL, and ALL cannot be specified explicitly.&lt;br/&gt;&amp;gt; * The sighash is computed from the following:&lt;br/&gt;&amp;gt;   * A 64-byte constant tag&lt;br/&gt;&amp;gt;   * Data about the spending transaction:&lt;br/&gt;&amp;gt;     * The transaction version number&lt;br/&gt;&amp;gt;     * The hash of txins&amp;#39; prevouts&#43;amounts&#43;sequences (or nothing if&lt;br/&gt;&amp;gt; ANYONECANPAY)&lt;br/&gt;&amp;gt;     * The hash of all txouts (or just the corresponding txout if&lt;br/&gt;&amp;gt; SINGLE; nothing if NONE)&lt;br/&gt;&amp;gt;     * The transaction locktime&lt;br/&gt;&amp;gt;   * Data about the output being spent:&lt;br/&gt;&amp;gt;     * The prevout (or nothing if NOINPUT)&lt;br/&gt;&amp;gt;     * The amount&lt;br/&gt;&amp;gt;     * The sequence number&lt;br/&gt;&amp;gt;     * The hash of the scriptPubKey (or nothing if MASK)&lt;br/&gt;&amp;gt;   * Data about the script being executed:&lt;br/&gt;&amp;gt;     * The hash of the scriptCode (after masking out, if MASK is set)&lt;br/&gt;&amp;gt;     * The opcode number of the last executed OP_CODESEPARATOR (or&lt;br/&gt;&amp;gt; 0xFFFFFFFF if none)&lt;br/&gt;&amp;gt;   * The sighash mode&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Pieter&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; 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/20181206/49fae6ab/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20181206/49fae6ab/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:15:32&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2hgxa5vl32phqvx4z2j3f2wjwsrg5t99tgsply004xq8zuyupnyqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596e97jgh</id>
    
      <title type="html">📅 Original date posted:2018-11-22 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2hgxa5vl32phqvx4z2j3f2wjwsrg5t99tgsply004xq8zuyupnyqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596e97jgh" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrzsq3c5jfs8n5leh7z9vycqe7yuq67fskc93886ywc8l74q7xl3qd2y2wc&#39;&gt;nevent1q…y2wc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-22&lt;br/&gt;📝 Original message:On Thu, Nov 22, 2018 at 3:53 PM Johnson Lau &amp;lt;jl2012 at xbt.hk&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Assuming a script size of 128 bytes (including SHA256 padding), 2^20&lt;br/&gt;&amp;gt; scripts is 134MB. Double it to 268MB for the merkle branch hashes. With&lt;br/&gt;&amp;gt; roughly 100MB/s, this should take 2.5s (or 42min for 30 levels). However,&lt;br/&gt;&amp;gt; memory use is not considered.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;each call to this operation effectively takes O(script-size) time&lt;br/&gt;&amp;gt; I’m not sure if this is correct. Actually,&lt;br/&gt;&amp;gt; CTransactionSignatureSerializer() scans every script for OP_CODESEPARATOR.&lt;br/&gt;&amp;gt; Scripts with and without OP_CODESEPARATOR should take exactly the same&lt;br/&gt;&amp;gt; O(script-size) time (see &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/14786&#34;&gt;https://github.com/bitcoin/bitcoin/pull/14786&lt;/a&gt;)&lt;br/&gt;&amp;gt; Also, this is no longer a concern under segwit (BIP143), which&lt;br/&gt;&amp;gt; CTransactionSignatureSerializer() is not used. Actually, OP_CODESEPARATOR&lt;br/&gt;&amp;gt; under segwit is way simpler than the proposed OP_MASK. If one finds OP_MASK&lt;br/&gt;&amp;gt; acceptable, there should be no reason to reject OP_CODESEPARATOR.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Even still, each call to OP_CODESEPARATOR / OP_CHECKSIG pair requires&lt;br/&gt;recomputing a new #5. scriptCode from BIP 143, and hence computes a new&lt;br/&gt;transaction digest.  I understood that this issue was the main motivation&lt;br/&gt;for wanting to deprecate OP_CODESEPARATOR and remove it from later versions&lt;br/&gt;of script.&lt;br/&gt;&lt;br/&gt;However, given that we are looking at a combinatorial explosion in SIGHASH&lt;br/&gt;flag combinations already, coupled with existing SigOp limitations, maybe&lt;br/&gt;the cost of recomputing scriptCode with OP_CODESEPARATOR isn&amp;#39;t such a big&lt;br/&gt;deal.&lt;br/&gt;&lt;br/&gt;And even if we choose remove the behavior of OP_CODESEPARATOR in new&lt;br/&gt;versions of Script, it seems more than 30 layers of sequential OP_IFs can&lt;br/&gt;be MASTified, so there is no need to use OP_CODESEPARATOR within that limit.&lt;br/&gt;&lt;br/&gt;&amp;gt;One suggestion I heard (I think I heard it from Pieter) to achieve the&lt;br/&gt;above is to add an internal counter that increments on every control flow&lt;br/&gt;operator,……...&lt;br/&gt;&lt;br/&gt;&amp;gt; If I have to choose among OP_CODESEPARATOR and “flow operator counting”,&lt;br/&gt;&amp;gt; I’d rather choose OP_CODESEPARATOR. At least we don’t need to add more&lt;br/&gt;&amp;gt; lines to the consensus code, just for something that is mostly archivable&lt;br/&gt;&amp;gt; with MAST.&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/20181122/e7761aed/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20181122/e7761aed/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:15:19&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsww3rj6qa7jz643wgk7xr98qnp8x4nfmvqzswzuh7yz5rc5sf4reczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5962defgk</id>
    
      <title type="html">📅 Original date posted:2018-11-22 📝 Original message:I see, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsww3rj6qa7jz643wgk7xr98qnp8x4nfmvqzswzuh7yz5rc5sf4reczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5962defgk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvzx66my9k2p4ej93g8mqf4h7r354qh2ce3xzklrx960kxdlg0vhs4qchvu&#39;&gt;nevent1q…chvu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-22&lt;br/&gt;📝 Original message:I see, so your suggestion is that a sequence of OP_IF ... OP_ENDIF can be&lt;br/&gt;replaced by a Merklized Script tree of that depth in practice.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m concerned that at script creation time it takes exponential time to&lt;br/&gt;complete a Merkle root of depth &amp;#39;n&amp;#39;.  Can anyone provide benchmarks or&lt;br/&gt;estimates of how long it takes to compute a Merkle root of a full tree of&lt;br/&gt;various depths on typical consumer hardware?  I would guess things stop&lt;br/&gt;becoming practical at a depth of 20-30.&lt;br/&gt;&lt;br/&gt;On Thu, Nov 22, 2018 at 9:28 AM Johnson Lau &amp;lt;jl2012 at xbt.hk&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; With MAST in taproot, OP_IF etc become mostly redundant, with worse&lt;br/&gt;&amp;gt; privacy. To maximise fungibility, we should encourage people to use MAST,&lt;br/&gt;&amp;gt; instead of improve the functionality of OP_IF and further complicate the&lt;br/&gt;&amp;gt; protocol.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On 22 Nov 2018, at 1:07 AM, Russell O&amp;#39;Connor via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Mon, Nov 19, 2018 at 10:22 PM Pieter Wuille via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; So my question is whether anyone can see ways in which this introduces&lt;br/&gt;&amp;gt;&amp;gt; redundant flexibility, or misses obvious use cases?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hopefully my comment is on-topic for this thread:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Given that we want to move away from OP_CODESEPARATOR, because each call&lt;br/&gt;&amp;gt; to this operation effectively takes O(script-size) time, we need a&lt;br/&gt;&amp;gt; replacement for the functionality it currently provides.  While perhaps the&lt;br/&gt;&amp;gt; original motivation for OP_CODESEPARTOR is surrounded in mystery, it&lt;br/&gt;&amp;gt; currently can be used (or perhaps abused) for the task of creating&lt;br/&gt;&amp;gt; signature that covers, not only which input is being signed, but which&lt;br/&gt;&amp;gt; specific branch within that input Script code is being signed for.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For example, one can place an OP_CODESEPARATOR within each branch of an IF&lt;br/&gt;&amp;gt; block, or by placing an OP_CODESEPARATOR before each OP_CHECKSIG&lt;br/&gt;&amp;gt; operation.  By doing so, signatures created for one clause cannot be used&lt;br/&gt;&amp;gt; as signatures for another clause.  Since different clauses in Bitcoin&lt;br/&gt;&amp;gt; Script may be enforcing different conditions (such as different time-locks,&lt;br/&gt;&amp;gt; hash-locks, etc), it is useful to be able to sign in such a way that your&lt;br/&gt;&amp;gt; signature is only valid when the conditions for a particular branch are&lt;br/&gt;&amp;gt; satisfied.  In complex Scripts, it may not be practical or possible to use&lt;br/&gt;&amp;gt; different public keys for every different clause. (In practice, you will be&lt;br/&gt;&amp;gt; able to get away with fewer OP_CODESEPARATORS than one in every IF block).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; One suggestion I heard (I think I heard it from Pieter) to achieve the&lt;br/&gt;&amp;gt; above is to add an internal counter that increments on every control flow&lt;br/&gt;&amp;gt; operator, OP_IF, OP_NOTIF, OP_ELSE, OP_ENDIF, and have the signature cover&lt;br/&gt;&amp;gt; the value of this counter.  Equivalently we divide every Bitcoin Script&lt;br/&gt;&amp;gt; program into blocks deliminated by these control flow operator and have the&lt;br/&gt;&amp;gt; signature cover the index of the block that the OP_CHECKSIG occurs within.&lt;br/&gt;&amp;gt; More specifically, we will want a SigHash flag to enables/disable the&lt;br/&gt;&amp;gt; signature covering this counter.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There are many different ways one might go about replacing the remaining&lt;br/&gt;&amp;gt; useful behaviour of OP_CODESEPARATOR than the one I gave above. I would be&lt;br/&gt;&amp;gt; happy with any solution.&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- 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/20181122/e50caccd/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20181122/e50caccd/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:15:18&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfpttv3nuy97d03dd0klx0mqn45m8fad3vaz4kyd27junkhrhqxqqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596llr4y4</id>
    
      <title type="html">📅 Original date posted:2018-11-21 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfpttv3nuy97d03dd0klx0mqn45m8fad3vaz4kyd27junkhrhqxqqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596llr4y4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsz737z9nztl3e9gzlv7vpmzfclxlpvx69y8kmknxhy540rlgv5kvcc9cne5&#39;&gt;nevent1q…cne5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-21&lt;br/&gt;📝 Original message:On Mon, Nov 19, 2018 at 10:22 PM Pieter Wuille via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; So my question is whether anyone can see ways in which this introduces&lt;br/&gt;&amp;gt; redundant flexibility, or misses obvious use cases?&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Hopefully my comment is on-topic for this thread:&lt;br/&gt;&lt;br/&gt;Given that we want to move away from OP_CODESEPARATOR, because each call to&lt;br/&gt;this operation effectively takes O(script-size) time, we need a replacement&lt;br/&gt;for the functionality it currently provides.  While perhaps the original&lt;br/&gt;motivation for OP_CODESEPARTOR is surrounded in mystery, it currently can&lt;br/&gt;be used (or perhaps abused) for the task of creating signature that covers,&lt;br/&gt;not only which input is being signed, but which specific branch within that&lt;br/&gt;input Script code is being signed for.&lt;br/&gt;&lt;br/&gt;For example, one can place an OP_CODESEPARATOR within each branch of an IF&lt;br/&gt;block, or by placing an OP_CODESEPARATOR before each OP_CHECKSIG&lt;br/&gt;operation.  By doing so, signatures created for one clause cannot be used&lt;br/&gt;as signatures for another clause.  Since different clauses in Bitcoin&lt;br/&gt;Script may be enforcing different conditions (such as different time-locks,&lt;br/&gt;hash-locks, etc), it is useful to be able to sign in such a way that your&lt;br/&gt;signature is only valid when the conditions for a particular branch are&lt;br/&gt;satisfied.  In complex Scripts, it may not be practical or possible to use&lt;br/&gt;different public keys for every different clause. (In practice, you will be&lt;br/&gt;able to get away with fewer OP_CODESEPARATORS than one in every IF block).&lt;br/&gt;&lt;br/&gt;One suggestion I heard (I think I heard it from Pieter) to achieve the&lt;br/&gt;above is to add an internal counter that increments on every control flow&lt;br/&gt;operator, OP_IF, OP_NOTIF, OP_ELSE, OP_ENDIF, and have the signature cover&lt;br/&gt;the value of this counter.  Equivalently we divide every Bitcoin Script&lt;br/&gt;program into blocks deliminated by these control flow operator and have the&lt;br/&gt;signature cover the index of the block that the OP_CHECKSIG occurs within.&lt;br/&gt;More specifically, we will want a SigHash flag to enables/disable the&lt;br/&gt;signature covering this counter.&lt;br/&gt;&lt;br/&gt;There are many different ways one might go about replacing the remaining&lt;br/&gt;useful behaviour of OP_CODESEPARATOR than the one I gave above. I would be&lt;br/&gt;happy with any solution.&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/20181121/785d31a4/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20181121/785d31a4/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:15:18&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsw32w73zg0vkaff9se8sswcm2et7krfd9kva0gw67sw89e256s8rczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596tq0c0q</id>
    
      <title type="html">📅 Original date posted:2018-08-05 📝 Original message:Over ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsw32w73zg0vkaff9se8sswcm2et7krfd9kva0gw67sw89e256s8rczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596tq0c0q" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvcffjn72afy58ddjkzfppv2vg32vuyqmj5878gg2vvyy6rr7syxqkj8z3k&#39;&gt;nevent1q…8z3k&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-08-05&lt;br/&gt;📝 Original message:Over chat it has been pointed out to me that computing the non-quadratic&lt;br/&gt;residue is not the same cost as computing a quadratic residue.  As pointed&lt;br/&gt;out in footnote 7 of the the proposed BIP, c^((p&#43;1)/4) is always a&lt;br/&gt;quadratic residue and must be negated to find the non-quadratic residue.&lt;br/&gt;&lt;br/&gt;In light of this, I revise my proposed change to make the verification&lt;br/&gt;equation&lt;br/&gt;&lt;br/&gt;R &#43; sG &#43; eP = 0.&lt;br/&gt;&lt;br/&gt;(by 0 in the equation above I mean the identity element for the (&#43;)&lt;br/&gt;operation, which is the point at infinity.)&lt;br/&gt;&lt;br/&gt;This equation is suitable for batch verification.  This equation is clearly&lt;br/&gt;written as a linear combination that doesn&amp;#39;t use negation.  In most&lt;br/&gt;implementations, equality comparison tests are implemented by subtraction&lt;br/&gt;and a comparison with zero. By writing the verification equation this way,&lt;br/&gt;we clearly see that only the comparison with zero test is needed.&lt;br/&gt;&lt;br/&gt;For single signature verification the check becomes, compute Q := sG &#43; eP.&lt;br/&gt;Verify that Q isn&amp;#39;t the point at infinity and Q.x = r.  Verify that Q.y is&lt;br/&gt;*not* a quadratic residue. (While I was incorrect earlier about the costs&lt;br/&gt;of computing a non-residue, it is the case the *verifying* a value is a&lt;br/&gt;quadratic residue is the same cost as verifying a value is a non-residue.)&lt;br/&gt;&lt;br/&gt;Effectively in my first email I was suggesting that the &amp;#39;e&amp;#39; value in a&lt;br/&gt;signature be negated from the current BIP proposal.  In this revision I am&lt;br/&gt;effectively suggesting that the &amp;#39;s&amp;#39; value in a signature should be the one&lt;br/&gt;that is negated instead.&lt;br/&gt;&lt;br/&gt;On Sat, Aug 4, 2018 at 8:22 AM, Russell O&amp;#39;Connor &amp;lt;roconnor at blockstream.io&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; I propose changing the verification equation from &amp;#34;Let *R = sG - eP*&amp;#34; to&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     Let *R = sG &#43; eP*&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This allows faster verification by avoiding negating a point (or a&lt;br/&gt;&amp;gt; coefficient).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If, instead of directly following the literal verification specification,&lt;br/&gt;&amp;gt; one is instead reconstructing R from r by finding a y coordinate that is a&lt;br/&gt;&amp;gt; quadratic residue, under the existing scheme one would verify&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; *sG - eP = R*&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; which is effectively verifying&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   0 = *sG - eP* - R  or 0 = R - *sG &#43; eP*&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Either way one needs to negate at least one point (or one coefficient)&lt;br/&gt;&amp;gt; because of the opposite signs between sG and eP.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Under my proposed revised verification scheme, one would instead verify&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   0 = sG &#43; eP &#43; (-R).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; While it seems that this requires negating R, it does not.  Rather (-R)&lt;br/&gt;&amp;gt; can be directly constructed from r by finding a y coordinate that is *not*&lt;br/&gt;&amp;gt; a quadratic residue, which is precisely the same amount of work that&lt;br/&gt;&amp;gt; construction R from r was.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In either verification procedure, changing the verification equation to my&lt;br/&gt;&amp;gt; proposal removes one negation operation from the cost of doing verification.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180805/08b47da6/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180805/08b47da6/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:13:56&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvcffjn72afy58ddjkzfppv2vg32vuyqmj5878gg2vvyy6rr7syxqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j59604r0qf</id>
    
      <title type="html">📅 Original date posted:2018-08-04 📝 Original message:I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvcffjn72afy58ddjkzfppv2vg32vuyqmj5878gg2vvyy6rr7syxqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j59604r0qf" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv7qmgzn582494a9mvs9teltd2r8293c2dke8dcgez02c486pq7qcmehn2d&#39;&gt;nevent1q…hn2d&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-08-04&lt;br/&gt;📝 Original message:I propose changing the verification equation from &amp;#34;Let *R = sG - eP*&amp;#34; to&lt;br/&gt;&lt;br/&gt;    Let *R = sG &#43; eP*&lt;br/&gt;&lt;br/&gt;This allows faster verification by avoiding negating a point (or a&lt;br/&gt;coefficient).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;If, instead of directly following the literal verification specification,&lt;br/&gt;one is instead reconstructing R from r by finding a y coordinate that is a&lt;br/&gt;quadratic residue, under the existing scheme one would verify&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;*sG - eP = R*&lt;br/&gt;&lt;br/&gt;which is effectively verifying&lt;br/&gt;&lt;br/&gt;  0 = *sG - eP* - R  or 0 = R - *sG &#43; eP*&lt;br/&gt;&lt;br/&gt;Either way one needs to negate at least one point (or one coefficient)&lt;br/&gt;because of the opposite signs between sG and eP.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Under my proposed revised verification scheme, one would instead verify&lt;br/&gt;&lt;br/&gt;  0 = sG &#43; eP &#43; (-R).&lt;br/&gt;&lt;br/&gt;While it seems that this requires negating R, it does not.  Rather (-R) can&lt;br/&gt;be directly constructed from r by finding a y coordinate that is *not* a&lt;br/&gt;quadratic residue, which is precisely the same amount of work that&lt;br/&gt;construction R from r was.&lt;br/&gt;&lt;br/&gt;In either verification procedure, changing the verification equation to my&lt;br/&gt;proposal removes one negation operation from the cost of doing verification.&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/20180804/2fc635e5/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180804/2fc635e5/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:13:55&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsr6zlg8y8jazvlm3gv43mdekjusgy9q4x8dth0ltz8q09kc55dzsgzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5967983hv</id>
    
      <title type="html">📅 Original date posted:2018-07-06 📝 Original message:Some ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsr6zlg8y8jazvlm3gv43mdekjusgy9q4x8dth0ltz8q09kc55dzsgzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5967983hv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsr6hket20lgllfcyf4k29wzj3w89vdypdcmzl6erdg3vhcnf73zwgn48yhg&#39;&gt;nevent1q…8yhg&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-07-06&lt;br/&gt;📝 Original message:Some quick comments:&lt;br/&gt;&lt;br/&gt;Signing&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To sign:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    - Let *k = int(hash(bytes(d) || m)) mod n*[8&lt;br/&gt;&amp;gt;    &amp;lt;&lt;a href=&#34;https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki#cite_note-8&amp;gt&#34;&gt;https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki#cite_note-8&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;    ].&lt;br/&gt;&amp;gt;    - Let *R = kG*.&lt;br/&gt;&amp;gt;    - If *jacobi(y(R)) ≠ 1*, let *k = n - k*.&lt;br/&gt;&amp;gt;    - Let *e = int(hash(bytes(x(R)) || bytes(dG) || m)) mod n*.&lt;br/&gt;&amp;gt;    - The signature is *bytes(x(R)) || bytes(k &#43; ex mod n)*.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Can we avoid mutable variables in these specification?  I know this is&lt;br/&gt;commonly done in RFCs, but I think it is fairly confusing to have `k`&lt;br/&gt;defined in two different ways within a single specification.&lt;br/&gt;Let&amp;#39;s let k&amp;#39; = k when jacobi(y(R)) = 1 and let k&amp;#39; = n - k when jacobi(y(R))&lt;br/&gt;= -1.  Note that this ensures that jacobi(y(k&amp;#39;G)) = 1.&lt;br/&gt;&lt;br/&gt;Also you&amp;#39;ve sort of left it undefined what to do when k = 0.  According to&lt;br/&gt;the current specification, you will produce an invalid signature.  The&lt;br/&gt;expected result is that you should win a 1000 BTC prize.&lt;br/&gt;&lt;br/&gt;One solution is to let k = *1 &#43; int(hash(bytes(d) || m)) mod (n-1)*.&lt;br/&gt;Alternatively you could let k&amp;#39; = 1 when k = 0.  Or you could just make a&lt;br/&gt;note that signature generation fails with this message and private key pair&lt;br/&gt;when this happens.&lt;br/&gt;&lt;br/&gt;Let *e = int(hash(bytes(x(R)) || bytes(dG) || m)) mod n*.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;P = dG should probably be noted somewhere in the text.  I.e. this signature&lt;br/&gt;is generated for the public key P = dG.&lt;br/&gt;&lt;br/&gt;If the inputs to hash were reordered as *hash(bytes(dG) || bytes(x(R)) ||&lt;br/&gt;m)* then there is an opportunity for SHA256 expander to be partially&lt;br/&gt;prefilled for a fixed public key.  This could provide a little benefit,&lt;br/&gt;especially when multiple signatures for a single public key need to be&lt;br/&gt;generated and/or verified.  If all things are otherwise equal, perhaps this&lt;br/&gt;alternate order is better.&lt;br/&gt;&lt;br/&gt; The signature is *bytes(x(R)) || bytes(k &#43; ex mod n)*.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;You haven&amp;#39;t defined `x`.  I&amp;#39;m guessing you mean `d` instead.&lt;br/&gt;&lt;br/&gt;&amp;gt; Optimizations&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; *Jacobian coordinates*&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    - *oncurve(P)* can be implemented as *y2 = x3 &#43; 7z6 mod p*.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; oncurve(P) requires that `P` be on the curve and not infinity.  You need&lt;br/&gt;another condition here to ensure that `P` is not infinity.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Fri, Jul 6, 2018 at 2:08 PM, Pieter Wuille via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hello everyone,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Here is a proposed BIP for 64-byte elliptic curve Schnorr signatures,&lt;br/&gt;&amp;gt; over the same curve as is currently used in ECDSA:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki&#34;&gt;https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It is simply a draft specification of the signature scheme itself. It&lt;br/&gt;&amp;gt; does not concern consensus rules, aggregation, or any other&lt;br/&gt;&amp;gt; integration into Bitcoin - those things are left for other proposals,&lt;br/&gt;&amp;gt; which can refer to this scheme if desirable. Standardizing the&lt;br/&gt;&amp;gt; signature scheme is a first step towards that, and as it may be useful&lt;br/&gt;&amp;gt; in other contexts to have a common Schnorr scheme available, it is its&lt;br/&gt;&amp;gt; own informational BIP.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If accepted, we&amp;#39;ll work on more production-ready reference&lt;br/&gt;&amp;gt; implementations and tests.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is joint work with several people listed in the document.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Pieter&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; 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/20180706/46edd80f/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180706/46edd80f/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:13:37&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswx7g2yswvgnpm6nucm759hzzveutydvke7fa0zmkv35qk2a3q2eqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596dw7qz2</id>
    
      <title type="html">📅 Original date posted:2018-01-22 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswx7g2yswvgnpm6nucm759hzzveutydvke7fa0zmkv35qk2a3q2eqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596dw7qz2" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsx6dcse8q0400ttm8k8p94rtyc5prfmyz3yh9tw4n9lzul6g924jsf2w76y&#39;&gt;nevent1q…w76y&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-01-22&lt;br/&gt;📝 Original message:On Thu, Jan 18, 2018 at 1:58 PM, Gregory Maxwell via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Thu, Jan 18, 2018 at 4:59 PM, Ondřej Vejpustek&lt;br/&gt;&amp;gt; &amp;lt;ondrej.vejpustek at satoshilabs.com&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; If being secure against partial share leakage is really part of your&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; threat model the current proposal is gratuitously insecure against it.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I don&amp;#39;t think that is true. Shared secret is an input of KDF which&lt;br/&gt;&amp;gt; &amp;gt; should prevent this kind of attack.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; My post provided a concrete example. I&amp;#39;d be happy to answer any&lt;br/&gt;&amp;gt; questions about it, but otherwise I&amp;#39;m not sure how to make it more&lt;br/&gt;&amp;gt; clear.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Actually, we&amp;#39;ve been considering something like that. We concluded that&lt;br/&gt;&amp;gt; it is to much &amp;#34;rolling your own crypto&amp;#34;. Instead of diffusion layer we&lt;br/&gt;&amp;gt; decided to apply KDF on the shared secret.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Quite the opposite-- a large block cipher is a standard&lt;br/&gt;&amp;gt; construction... and the off-label application of a KDF that you&amp;#39;ve&lt;br/&gt;&amp;gt; used here doesn&amp;#39;t provide any protection against the example I gave.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;At this point, is it better just to use GF(2^256&#43;n)?  Is GF(2^256&#43;n) going&lt;br/&gt;to be that much slower than GF(2^8) that we care to make things this&lt;br/&gt;complicated?  (I honestly don&amp;#39;t know the answer.)&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/20180122/c8799a13/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180122/c8799a13/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:09:34&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfx4fymcatyrwt9rxlshw85ykkkumshue6yaf2yyp94pga4hs5wjgzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596jzf6rn</id>
    
      <title type="html">📅 Original date posted:2018-01-17 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfx4fymcatyrwt9rxlshw85ykkkumshue6yaf2yyp94pga4hs5wjgzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596jzf6rn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9qagkvt835ddskg6udcvmyc7uacrxqu065v9s7mrhuch8jwuawmctfw5cj&#39;&gt;nevent1q…w5cj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-01-17&lt;br/&gt;📝 Original message:Hi Ondřej,&lt;br/&gt;&lt;br/&gt;1. There is no similarity between SSS and RSA or any other public-key or&lt;br/&gt;symmetric crypto.  SSS is effectively a one-time pad and is&lt;br/&gt;information-theoretically secure.&lt;br/&gt;&lt;br/&gt;2. Even if there were a problem (which there cannot be, due to (1)), using&lt;br/&gt;error correcting codes and truncated hash functions create identical&lt;br/&gt;amounts of information theoretic redundancy.&lt;br/&gt;&lt;br/&gt;Let me repeat that SSS is &amp;#34;information-theoretically secure&amp;#34;!  It isn&amp;#39;t&lt;br/&gt;only computationally infeasible to break SSS; it is impossible to break&lt;br/&gt;SSS.  If you have all but one necessary share of SSS, there is no&lt;br/&gt;information leaked about the the hidden data, because for every possible&lt;br/&gt;message that could be encoded, there exists some final share that would&lt;br/&gt;decode to that message.  Any of the possibilities for the missing final&lt;br/&gt;share are equally as likely.&lt;br/&gt;&lt;br/&gt;It is of no use to apply the precautionary principle against impossible&lt;br/&gt;attacks, especially at the cost of losing the useful properties of a real&lt;br/&gt;error correcting codes that would provide actual guarantees against likely&lt;br/&gt;errors.&lt;br/&gt;&lt;br/&gt;On Wed, Jan 17, 2018 at 6:39 AM, Ondřej Vejpustek 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; The entropy argument is as follows:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There is a rule of thumb which says it is safer plaintext to have low&lt;br/&gt;&amp;gt; redundancy, see&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://en.wikipedia.org/wiki/Redundancy_(information_theory)&#34;&gt;https://en.wikipedia.org/wiki/Redundancy_(information_theory)&lt;/a&gt;, i. e.&lt;br/&gt;&amp;gt; it&amp;#39;s better to encrypt random or compressed data than natural language.&lt;br/&gt;&amp;gt; This rule is based on Shannon&amp;#39;s information theory which means that a&lt;br/&gt;&amp;gt; breach of the rule usually doesn&amp;#39;t induce a vulnerability (there is no&lt;br/&gt;&amp;gt; known generic attack). This rule is application of a precautionary&lt;br/&gt;&amp;gt; principle.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Nevertheless, here are some examples of cryptographic attacks which may&lt;br/&gt;&amp;gt; be considered as a consequence of the breach of the rule:&lt;br/&gt;&amp;gt;   * Related Message Attack by Coppersmith, Franklin, Patarin, Reiter&lt;br/&gt;&amp;gt; (&lt;a href=&#34;https://pdfs.semanticscholar.org/899a/4fdc048102471875e24f7fecb3fb89&#34;&gt;https://pdfs.semanticscholar.org/899a/4fdc048102471875e24f7fecb3fb89&lt;/a&gt;&lt;br/&gt;&amp;gt; 98d754.pdf)&lt;br/&gt;&amp;gt; - given RSA ciphertext of two plaintexts x and a*x &#43; b, where a, b are&lt;br/&gt;&amp;gt; known, it&amp;#39;s possible to effectively compute x provided public exponent&lt;br/&gt;&amp;gt; is three. From the informaton-theoretic point of view the second message&lt;br/&gt;&amp;gt; is redundant, because it&amp;#39;s determined by the first one. Which means that&lt;br/&gt;&amp;gt; relative redundancy of both messages is at least one half.&lt;br/&gt;&amp;gt;   * Stereotyped Messages by Coppersmith&lt;br/&gt;&amp;gt; (&lt;a href=&#34;https://www.di.ens.fr/~fouque/ens-rennes/coppersmith.pdf&#34;&gt;https://www.di.ens.fr/~fouque/ens-rennes/coppersmith.pdf&lt;/a&gt;, section 7) -&lt;br/&gt;&amp;gt; given RSA ciphertext and (1-1/e) fraction of plaintext (where e is&lt;br/&gt;&amp;gt; public exponent), it&amp;#39;s possible to effectively compute x. Message is&lt;br/&gt;&amp;gt; highly redundant, because only 1/e of the message is unknown. Relative&lt;br/&gt;&amp;gt; redundancy of the message is at least (1-1/e).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Consider a few notes:&lt;br/&gt;&amp;gt;   * Nowadays there exists more complicated variants of mentioned attacks&lt;br/&gt;&amp;gt; which have weaker premisses.&lt;br/&gt;&amp;gt;   * There is a considerable similarity between RSA and SSS. Both schemes&lt;br/&gt;&amp;gt; are algebraically-based (rather than boolean function based).&lt;br/&gt;&amp;gt;   * CRCs (and error-correcting codes generally) introduce redundancy&lt;br/&gt;&amp;gt; into the message. Moreover the redundancy is induced by a linear&lt;br/&gt;&amp;gt; relationship among message (compare with the premise of the Related&lt;br/&gt;&amp;gt; Message Attack).&lt;br/&gt;&amp;gt;   * Related Message Attack wouldn&amp;#39;t be possible if you had two&lt;br/&gt;&amp;gt; plaintexts x and hash(x). The relationship between messages has to be&lt;br/&gt;&amp;gt; (algebraically) uncomplicated. From the information-theoretic point of&lt;br/&gt;&amp;gt; view the situation is the same, but from the practical point of view it&lt;br/&gt;&amp;gt; is completely different.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To sum it up, there is a precautionary principle which tells us not to&lt;br/&gt;&amp;gt; increase redundancy of a message unless it is introduced in a&lt;br/&gt;&amp;gt; complicated way (for example by a hash function). That&amp;#39;s why we use SHA&lt;br/&gt;&amp;gt; rather than CRC. One more reason why we stick to the principle is that&lt;br/&gt;&amp;gt; there&amp;#39;s no randomisation in our scheme (such as padding or&lt;br/&gt;&amp;gt; initialisation vector). We understood advantages of error-correctings&lt;br/&gt;&amp;gt; codes over hash functions (minimal codewords distance property,&lt;br/&gt;&amp;gt; performance) and we considered it thoroughly.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Ondřej Vejpustek&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/20180117/4ce36a81/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180117/4ce36a81/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:09:32&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqst9tm9rq9tjxy6f4ltkh3pyvpwxljfnzglmxry4rtq7a4cg8scqeszyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596k2auyq</id>
    
      <title type="html">📅 Original date posted:2018-01-09 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqst9tm9rq9tjxy6f4ltkh3pyvpwxljfnzglmxry4rtq7a4cg8scqeszyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596k2auyq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswfxyyz3t8vwqqrcnr7rgn7zr8smfmujfuh3srk8ty6ucufy0vsgqsrxphr&#39;&gt;nevent1q…xphr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-01-09&lt;br/&gt;📝 Original message:On Mon, Jan 8, 2018 at 7:39 AM, Pavol Rusnak via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On 08/01/18 05:22, Gregory Maxwell wrote:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/satoshilabs/slips/blob/master/slip-0039.md&#34;&gt;https://github.com/satoshilabs/slips/blob/master/slip-0039.md&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The 16-bit &amp;#34;checksum&amp;#34; based on sha2 seems pretty poor since basing&lt;br/&gt;&amp;gt; &amp;gt; small checksums on a cryptographic hash results in a fairly poor&lt;br/&gt;&amp;gt; &amp;gt; checksum that is surprisingly likely to accept an errored string. Your&lt;br/&gt;&amp;gt; &amp;gt; wordlist is 10 bits and you have much less than 1023*10 bits of input,&lt;br/&gt;&amp;gt; &amp;gt; so you could easily have a 20 bit code (two words) which guaranteed&lt;br/&gt;&amp;gt; &amp;gt; that up to two errored words would always be detected, and probably&lt;br/&gt;&amp;gt; &amp;gt; could choose one which catches three words much more often 1:2^20&lt;br/&gt;&amp;gt; &amp;gt; (sipa&amp;#39;s crc tools can help find codes like this).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Originally, we wanted to use 16-bit of CRC32 for checksum, but after the&lt;br/&gt;&amp;gt; discussion with Daan Sprenkels we were suggested to change this for&lt;br/&gt;&amp;gt; cryptographically strong function. The argument was that CRC32 contains&lt;br/&gt;&amp;gt; less entropy and mixing high-entropy data (secret) with low-entropy data&lt;br/&gt;&amp;gt; (checksum) is not a good idea.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;This entropy argument seems confused.  Ignoring constant factors, the&lt;br/&gt;entropy of a checksum is the sum over all possible checksums, i, of&lt;br/&gt;-n_i*log(n_i), where n_i is the number of times the ith checksum occurs&lt;br/&gt;over the space of all possible data being checksummed.  In this application&lt;br/&gt;the checksum is being applied to a fixed m-bit blob of uniformly random&lt;br/&gt;data.&lt;br/&gt;&lt;br/&gt;The entropy is maximized when every possible checksum occurs equally as&lt;br/&gt;frequently, that is we achieve maximum entropy when all the n_i values are&lt;br/&gt;equal to each other.  Any error correcting code worth it&amp;#39;s salt will try to&lt;br/&gt;achieve this property because the designers want every checksum value to&lt;br/&gt;have as much error correcting power as every other checksum value.  I&amp;#39;m&lt;br/&gt;almost certain that the algebraic properties of your typical error&lt;br/&gt;correcting codes allow you to prove that maximum entropy is perfectly&lt;br/&gt;achieved whenever the data-blob size is at least as large as the checksum&lt;br/&gt;size.&lt;br/&gt;&lt;br/&gt;Meanwhile the truncated value of a cryptographic hash function is expected&lt;br/&gt;to be slightly under the maximum entropy value, under the assumption that&lt;br/&gt;the hash function it behaves like a random function.&lt;br/&gt;&lt;br/&gt;The main properties of a &amp;#34;strong cryptographic hash function&amp;#34; is that it is&lt;br/&gt;infeasible to find collisions and preimages.  However these properties are&lt;br/&gt;lost when you truncate the hash down to 16-bits.  At this point is it&lt;br/&gt;entirely feasible to find collisions and preimages.&lt;br/&gt;&lt;br/&gt;So using a truncated cryptographic hash function doesn&amp;#39;t provide you with&lt;br/&gt;more entropy (and, in fact, probably a sliver less entropy), and doesn&amp;#39;t&lt;br/&gt;provide you with any of the befits of strong cryptographic hash function.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Also, there is an argument between a checksum and ECC. We discussed that&lt;br/&gt;&amp;gt; ECC might not be a good idea, because it helps the attacker to compute&lt;br/&gt;&amp;gt; missing information, while we only want to check for integrity. Also the&lt;br/&gt;&amp;gt; word mnemonic is itself a ECC, because if you see the word &amp;#34;acadornic&amp;#34;&lt;br/&gt;&amp;gt; it is probably the word &amp;#34;academic&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Every checksum is error correcting.  Given an failed checksum, all you have&lt;br/&gt;to do is search around the space of edits to find the smallest set edits&lt;br/&gt;that yield a valid checksum.  With a 2^16 bit checksum one will expect to&lt;br/&gt;find a nearby checksum within 2^16 trails, even when using a truncated hash&lt;br/&gt;function.&lt;br/&gt;&lt;br/&gt;What an error-correcting codes gives you isn&amp;#39;t the ability to correct&lt;br/&gt;errors, which we have seen is something that all short checksums provide,&lt;br/&gt;rather they provide *guarantees* about the ability to detect (and correct)&lt;br/&gt;certain common classes of errors.  For example we can have an ECC that&lt;br/&gt;guarantees to find the error where are word is accidentally written down&lt;br/&gt;twice (see&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-January/015506.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-January/015506.html&lt;/a&gt;&lt;br/&gt;).&lt;br/&gt;&lt;br/&gt;The advice you have been given will only result in losing any guarantees&lt;br/&gt;about detecting common classes or errors; it won&amp;#39;t stop attackers from&lt;br/&gt;recovering missing information, and it won&amp;#39;t provide a cryptographically&lt;br/&gt;strong function.&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/20180109/5f03431f/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180109/5f03431f/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:09:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs20ahn9um2dqetrpqtmp8z06ueq4llh8v4qkgs5zmdml6e58lxx8szyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596nens7n</id>
    
      <title type="html">📅 Original date posted:2017-10-02 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs20ahn9um2dqetrpqtmp8z06ueq4llh8v4qkgs5zmdml6e58lxx8szyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596nens7n" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsg6702kellgd67fqel482pcsn3hxrjezjr4a2qqcc2fz2fvhplp4qntpk73&#39;&gt;nevent1q…pk73&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-10-02&lt;br/&gt;📝 Original message:On Sun, Oct 1, 2017 at 4:39 PM, Mark Friedenbach &amp;lt;mark at friedenbach.org&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; On Oct 1, 2017, at 12:41 PM, Russell O&amp;#39;Connor &amp;lt;roconnor at blockstream.io&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Creating a Bitcoin script that does not allow malleability is difficult&lt;br/&gt;&amp;gt; and requires wasting a lot of bytes to do so, typically when handling&lt;br/&gt;&amp;gt; issues around non-0-or-1 witness values being used with OP_IF, and dealing&lt;br/&gt;&amp;gt; with non-standard-zero values, etc.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Script validation flags of the correct place to do this. We already have&lt;br/&gt;&amp;gt; policy validation flags that check for these things. They were not made&lt;br/&gt;&amp;gt; consensus rules with Segwit v0 mainly due to concern over scope creep in an&lt;br/&gt;&amp;gt; already large overhaul, of my memory is correct. Script versions and&lt;br/&gt;&amp;gt; quadratic hashing fixes where the minimum necessary to allow segwit to&lt;br/&gt;&amp;gt; activate safely while still enabling future upgrades that would otherwise&lt;br/&gt;&amp;gt; have been hard forks. We knew that we would be later changing the EC&lt;br/&gt;&amp;gt; signature scheme to be something that supported signature aggregation, and&lt;br/&gt;&amp;gt; that would be more appropriate time to discuss such changes. As we are&lt;br/&gt;&amp;gt; considering to do now (although witness versions means we don’t need to&lt;br/&gt;&amp;gt; omnibus the script upgrade here either, so a v1 before signature&lt;br/&gt;&amp;gt; aggregation is ready is fine IMHO).&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Script validation isn&amp;#39;t the correct place to do this.  The reason is that&lt;br/&gt;script operations are not aware of whether the stack items they are&lt;br/&gt;processing are witness malleable items or Script computed values.  Let me&lt;br/&gt;take OP_IF as one example.  When OP_IF operates directly on witness data,&lt;br/&gt;it is subject to witness malleability, and therefore one needs to add extra&lt;br/&gt;code around that to prevent witness malleability.  On the other hand, when&lt;br/&gt;OP_IF operates on computed data, it isn&amp;#39;t subject to malleability and can&lt;br/&gt;safely process non-zero-or-one values. If OP_IF were restricted to&lt;br/&gt;requiring canonical inputs, then for the cases that OP_IF operates on&lt;br/&gt;computed data, they will need to add extra code to canonicalize their&lt;br/&gt;inputs.  I don&amp;#39;t think there is a correct answer here.  That is because I&lt;br/&gt;believe this isn&amp;#39;t the correct place to aim to restrict witness&lt;br/&gt;malleability.&lt;br/&gt;&lt;br/&gt;OTOH, signatures are a fine place to aim to restrict witness malleability.&lt;br/&gt;In fact, if signatures could securely cover all witness data, I think&lt;br/&gt;everyone here would jump at the opportunity to implement that.  However,&lt;br/&gt;since that isn&amp;#39;t known to be possible, we are left with doing the best we&lt;br/&gt;can, which is to have signatures cover weight (or bytes).  This prevents&lt;br/&gt;the worst effects of witness malleability and does so without burdening&lt;br/&gt;Script development.  (This also requires signatures have a fixed size, so&lt;br/&gt;it is understandable that signature-covers-weight wasn&amp;#39;t included in Segwit&lt;br/&gt;v0 scripts).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; In any case if there is any general witness malleability due to opcode&lt;br/&gt;&amp;gt; semantics that it’s not fixed by one of our existing policy flags, that is&lt;br/&gt;&amp;gt; a bug and I would encourage you to report it.&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;ll argue that I don&amp;#39;t want my counter-party going off and using a very&lt;br/&gt;&amp;gt; deeply nested key in order to subvert the fee rate we&amp;#39;ve agreed upon after&lt;br/&gt;&amp;gt; I&amp;#39;ve signed my part of the input.  If we are doing multi-party signing of&lt;br/&gt;&amp;gt; inputs we need to communicate anyways to construct the transaction.  I see&lt;br/&gt;&amp;gt; no problem with requiring my counter-party to choose their keys before I&lt;br/&gt;&amp;gt; sign so that I know up front what our fee rate is going to be.  If they&lt;br/&gt;&amp;gt; lose their keys and need a backup, they should have to come back to me to&lt;br/&gt;&amp;gt; resign in order that we can negotiate a new fee rate for the transaction&lt;br/&gt;&amp;gt; and who is going to be covering how much of the fee and on which inputs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Arguing that every single user should be forced to restart an interactive&lt;br/&gt;&amp;gt; signing session. That’s a very strong statement based on something that I&lt;br/&gt;&amp;gt; would say is a preference that depends on circumstances.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What about an optional commitment to witness size in bytes? The value zero&lt;br/&gt;&amp;gt; meaning “I don’t care.” I would argue that it should be a maximum however,&lt;br/&gt;&amp;gt; and therefor serialized as part of the witness. The serialization of this&lt;br/&gt;&amp;gt; would be very compact (1 plus the difference between actual and maximum,&lt;br/&gt;&amp;gt; with zero meaning not used.)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I would be fine your suggestion above, though I think Luke&amp;#39;s suggestion of&lt;br/&gt;having both SIGHASH_WITNESS_SIZE and SIGHASH_WITNESS_DEPTH flag is better&lt;br/&gt;because it is simpler.&lt;br/&gt;&lt;br/&gt;Those people worried about restarting interactive signing session in the&lt;br/&gt;unlikely event of parties not knowing what keys they are planning to use&lt;br/&gt;can use just the SIGHASH_WITNESS_DEPTH flag.  Those people worried about&lt;br/&gt;counterparties fiddling with fee rates can use both flags.  The choice&lt;br/&gt;doesn&amp;#39;t even need to be made at script commitment time.&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/20171002/36c4797d/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20171002/36c4797d/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:06:47&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsd4ml8sc9l7nmqte56xq3wjfprfsmhxarqtutqfg9y4uh33szkwfqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596q78mdt</id>
    
      <title type="html">📅 Original date posted:2017-10-01 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsd4ml8sc9l7nmqte56xq3wjfprfsmhxarqtutqfg9y4uh33szkwfqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596q78mdt" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgm53gdhm38n2js4vhm75sp7f6wu448nheeu6pjyh0g6aw00jp79g0jjwxe&#39;&gt;nevent1q…jwxe&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-10-01&lt;br/&gt;📝 Original message:On Sun, Oct 1, 2017 at 3:27 PM, Mark Friedenbach &amp;lt;mark at friedenbach.org&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; On Oct 1, 2017, at 12:05 PM, Russell O&amp;#39;Connor &amp;lt;roconnor at blockstream.io&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Given the proposed fixed signature size, It seems better to me that we&lt;br/&gt;&amp;gt; create a SIGHASH_WITNESS_WEIGHT flag as opposed to SIGHASH_WITNESS_DEPTH.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For what benefit? If your script actually uses all the items on the stack,&lt;br/&gt;&amp;gt; and if your script is not written in such a way as to allow malleability&lt;br/&gt;&amp;gt; (which cannot be prevented in general), then they’re equivalent. Using&lt;br/&gt;&amp;gt; weight instead of depth only needlessly restricts other parties to select a&lt;br/&gt;&amp;gt; witness size up-front.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Creating a Bitcoin script that does not allow malleability is difficult and&lt;br/&gt;requires wasting a lot of bytes to do so, typically when handling issues&lt;br/&gt;around non-0-or-1 witness values being used with OP_IF, and dealing with&lt;br/&gt;non-standard-zero values, etc.  Adding a witness weight flag cuts through&lt;br/&gt;the worst of all this, and makes script design enormously simpler and makes&lt;br/&gt;scripts smaller and cheaper.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; And to be clear, signing witness weight doesn’t mean the witness is not&lt;br/&gt;&amp;gt; malleable. The signer could sign again with a different ECDSA nonce. Or if&lt;br/&gt;&amp;gt; the signer is signing from a 2-of-3 wallet, a common scenario I hope, there&lt;br/&gt;&amp;gt; are 3 possible key combinations that could be used. If using MBV, a&lt;br/&gt;&amp;gt; 3-element tree is inherently unbalanced and the common use case can have a&lt;br/&gt;&amp;gt; smaller proof size.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Witnesses are not 3rd party malleable and we will maintain that property&lt;br/&gt;&amp;gt; going forward with future opcodes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Mark, you seem to be arguing that in general we still want weight&lt;br/&gt;&amp;gt; malleability even with witness depth fixed, but I don&amp;#39;t understand in what&lt;br/&gt;&amp;gt; scenario we would want that.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Any time all parties are not online at the same time in an interactive&lt;br/&gt;&amp;gt; signing protocol, or for which individual parties have to reconfigure their&lt;br/&gt;&amp;gt; signing choices due to failures. We should not restrict our script&lt;br/&gt;&amp;gt; signature system to such a degree that it becomes difficult to create&lt;br/&gt;&amp;gt; realistic signing setups for people using best practices (multi-key, 2FA,&lt;br/&gt;&amp;gt; etc.) to sign. If I am a participant in a signing protocol, it would be&lt;br/&gt;&amp;gt; layer violating to treat me as anything other than a black box, such that&lt;br/&gt;&amp;gt; internal errors and timeouts in my signing setup don’t propagate upwards to&lt;br/&gt;&amp;gt; the multi-party protocol.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For example, I should be able to try to 2FA sign, and if that fails go&lt;br/&gt;&amp;gt; fetch my backup key and sign with that. But because it’s my infrequently&lt;br/&gt;&amp;gt; used backup key, it might be placed deeper in the key tree and therefore&lt;br/&gt;&amp;gt; signatures using it are larger. All the other signers need care is that&lt;br/&gt;&amp;gt; slot #3 in the witness is where my Merkle proof goes. They shouldn’t have&lt;br/&gt;&amp;gt; to restart and resign because my proof was a little larger than anticipated&lt;br/&gt;&amp;gt; — and maybe they can’t resign because double-spend protections!&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;I&amp;#39;ll argue that I don&amp;#39;t want my counter-party going off and using a very&lt;br/&gt;deeply nested key in order to subvert the fee rate we&amp;#39;ve agreed upon after&lt;br/&gt;I&amp;#39;ve signed my part of the input.  If we are doing multi-party signing of&lt;br/&gt;inputs we need to communicate anyways to construct the transaction.  I see&lt;br/&gt;no problem with requiring my counter-party to choose their keys before I&lt;br/&gt;sign so that I know up front what our fee rate is going to be.  If they&lt;br/&gt;lose their keys and need a backup, they should have to come back to me to&lt;br/&gt;resign in order that we can negotiate a new fee rate for the transaction&lt;br/&gt;and who is going to be covering how much of the fee and on which inputs.&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/20171001/a587d6ba/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20171001/a587d6ba/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:06:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxnjqwdf5c0erapsefvsxchv5j7gt8zq94vw08j4z6ty5qxqnpykczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596njvmn7</id>
    
      <title type="html">📅 Original date posted:2017-10-01 📝 Original message:Given ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxnjqwdf5c0erapsefvsxchv5j7gt8zq94vw08j4z6ty5qxqnpykczyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596njvmn7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvuhppramj45dn6pldpcrgpuu03wusgk4speyzkwv60g4c6ekxd5cuy8j4m&#39;&gt;nevent1q…8j4m&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-10-01&lt;br/&gt;📝 Original message:Given the proposed fixed signature size, It seems better to me that we&lt;br/&gt;create a SIGHASH_WITNESS_WEIGHT flag as opposed to SIGHASH_WITNESS_DEPTH.&lt;br/&gt;&lt;br/&gt;Mark, you seem to be arguing that in general we still want weight&lt;br/&gt;malleability even with witness depth fixed, but I don&amp;#39;t understand in what&lt;br/&gt;scenario we would want that.&lt;br/&gt;&lt;br/&gt;It strikes me that is most scenarios all parties signing an input would do&lt;br/&gt;so after an execution path through the script has been agreed upon by all&lt;br/&gt;parties, in which case the witness weight can be fixed.&lt;br/&gt;In rare cases where the smart contract requires that some parties sign in&lt;br/&gt;advance of the decision about the execution path (for example, I&amp;#39;m thinking&lt;br/&gt;about delegation here, but I want to keep my remarks general), we wouldn&amp;#39;t&lt;br/&gt;want to fix the witness depth either.&lt;br/&gt;&lt;br/&gt;A SIGHASH_WITNESS_WEIGHT would prevent all possible malleability that would&lt;br/&gt;modify the transaction&amp;#39;s fee/weight priority (at least for that one input),&lt;br/&gt;and greatly reduce the overall attack surface of witness malleability&lt;br/&gt;issues.&lt;br/&gt;&lt;br/&gt;On Sun, Oct 1, 2017 at 1:04 AM, Mark Friedenbach 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; Clean stack should be eliminated for other possible future uses, the most&lt;br/&gt;&amp;gt; obvious of which is recursive tail-call for general computation capability.&lt;br/&gt;&amp;gt; I’m not arguing for that at this time, just arguing that we shouldn’t&lt;br/&gt;&amp;gt; prematurely cut off an easy implementation of such should we want to. Clean&lt;br/&gt;&amp;gt; stack must still exist as policy for future soft-fork safety, but being a&lt;br/&gt;&amp;gt; consensus requirement was only to avoid witness malleability, which&lt;br/&gt;&amp;gt; committing to the size of the witness also accomplishes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Committing to the number of witness elements is fully sufficient, and&lt;br/&gt;&amp;gt; using the number of elements avoids problems of not knowing the actual size&lt;br/&gt;&amp;gt; in bytes at the time of signing, e.g. because the witness contains a merkle&lt;br/&gt;&amp;gt; proof generated by another party from an unbalanced tree, and unbalanced&lt;br/&gt;&amp;gt; trees are expected to be common (so that elements can be placed higher in&lt;br/&gt;&amp;gt; the tree in accordance with their higher expected probability of usage).&lt;br/&gt;&amp;gt; Other future extensions might also have variable-length proofs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; On Sep 30, 2017, at 7:47 PM, Luke Dashjr &amp;lt;luke at dashjr.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Should it perhaps commit to the length of the serialised witness data&lt;br/&gt;&amp;gt; instead&lt;br/&gt;&amp;gt; &amp;gt; or additionally? Now that signatures are no longer variable-length,&lt;br/&gt;&amp;gt; that&amp;#39;d be&lt;br/&gt;&amp;gt; &amp;gt; possible...&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; As far as tail-call needs are concerned, CLEANSTACK wouldn&amp;#39;t have been&lt;br/&gt;&amp;gt; checked&lt;br/&gt;&amp;gt; &amp;gt; until AFTER the tail-call in the first draft. But I suppose eliminating&lt;br/&gt;&amp;gt; it for&lt;br/&gt;&amp;gt; &amp;gt; other possible future purposes is still useful.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Luke&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/20171001/61186661/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20171001/61186661/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:06:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvp2fdts27kx4k0g7ut6yzjl2yskzd2l2dnpw6thh5z4ugpn4vl2szyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5962vkg2m</id>
    
      <title type="html">📅 Original date posted:2017-09-07 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvp2fdts27kx4k0g7ut6yzjl2yskzd2l2dnpw6thh5z4ugpn4vl2szyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j5962vkg2m" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0nh754dp2vh9llacru47ue8ks2jl5pljxa0y2rn0akdt7z29dp2qzn54vf&#39;&gt;nevent1q…54vf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-09-07&lt;br/&gt;📝 Original message:On Thu, Sep 7, 2017 at 1:42 PM, Mark Friedenbach &amp;lt;mark at friedenbach.org&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; I&amp;#39;ve been puzzling over your email since receiving it. I&amp;#39;m not sure it&lt;br/&gt;&amp;gt; is possible to perform the attack you describe with the tree structure&lt;br/&gt;&amp;gt; specified in the BIP. If I may rephrase your attack, I believe you are&lt;br/&gt;&amp;gt; seeking a solution to the following:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Want: An innocuous script and a malign script for which&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    double-SHA256(innocuous)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; is equal to either&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    fast-SHA256(double-SHA256(malign) || r) or&lt;br/&gt;&amp;gt;    fast-SHA256(r || double-SHA256(malign))&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;or  fast-SHA256(fast-SHA256(double-SHA256(malign) || r1) || r0)&lt;br/&gt;or  fast-SHA256(fast-SHA256(r1 || double-SHA256(malign)) || r0)&lt;br/&gt;or ...&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; where r is a freely chosen 32-byte nonce. This would allow the&lt;br/&gt;&amp;gt; attacker to reveal the innocuous script before funds are sent to the&lt;br/&gt;&amp;gt; MAST, then use the malign script to spend.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Because of the double-SHA256 construction I do not see how this can be&lt;br/&gt;&amp;gt; accomplished without a full break of SHA256.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;The particular scenario I&amp;#39;m imagining is a collision between&lt;br/&gt;&lt;br/&gt;    double-SHA256(innocuous)&lt;br/&gt;&lt;br/&gt;and&lt;br/&gt;&lt;br/&gt;    fast-SHA256(fast-SHA256(fast-SHA256(double-SHA256(malign) || r2) || r1)&lt;br/&gt;|| r0).&lt;br/&gt;&lt;br/&gt;where innocuous is a Bitcoin Script that is between 32 and 55 bytes long.&lt;br/&gt;&lt;br/&gt;Observe that when data is less than 55 bytes then double-SHA256(data) =&lt;br/&gt;fast-SHA256(fast-SHA256(padding-SHA256(data)) || 0x8000...100) (which is&lt;br/&gt;really the crux of the matter).&lt;br/&gt;&lt;br/&gt;Therefore, to get our collision it suffices to find a collision between&lt;br/&gt;&lt;br/&gt;    padding-SHA256(innocuous)&lt;br/&gt;&lt;br/&gt;and&lt;br/&gt;&lt;br/&gt;    fast-SHA256(double-SHA256(malign) || r2) || r1&lt;br/&gt;&lt;br/&gt;r1 can freely be set to the second half of padding-SHA256(innocuous), so it&lt;br/&gt;suffices to find a collision between&lt;br/&gt;&lt;br/&gt;   fast-SHA256(double-SHA256(malign) || r2)&lt;br/&gt;&lt;br/&gt;and the first half of padding-SHA256(innocuous) which is equal to the first&lt;br/&gt;32 bytes of innocuous.&lt;br/&gt;&lt;br/&gt;Imagine the first opcode of innocuous is the push of a value that the&lt;br/&gt;attacker claims to be his 33-byte public key.&lt;br/&gt;So long as the attacker doesn&amp;#39;t need to prove that they know the discrete&lt;br/&gt;log of this pubkey, they can grind r2 until the result of&lt;br/&gt;fast-SHA256(double-SHA256(malign) || r2) contains the correct first couple&lt;br/&gt;of bytes for the script header and the opcode for a 33-byte push.  I&lt;br/&gt;believe that is only about 3 or 4 bytes of they need to grind out.&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/20170907/724c4de6/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170907/724c4de6/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:05:43&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0wk9nj4age39cxltqx9d0dqzly34yd0gugpfpag3nz3aysr6rp7czyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596m0px0v</id>
    
      <title type="html">📅 Original date posted:2017-09-07 📝 Original message:In ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0wk9nj4age39cxltqx9d0dqzly34yd0gugpfpag3nz3aysr6rp7czyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596m0px0v" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsztphe0h0t60qwn2vxcz2t4zg7q7gnrujkx389h8vr086w9v6astqr2h0c3&#39;&gt;nevent1q…h0c3&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-09-07&lt;br/&gt;📝 Original message:In that case, you may as well remove all references to leaves and double&lt;br/&gt;SHA-256 from your BIP since your design has no method for distinguishing&lt;br/&gt;between internal nodes and leaves.&lt;br/&gt;&lt;br/&gt;I think that if this design stands, it will play a role in some future&lt;br/&gt;CVEs.  The BIP itself is too abstract about its data contents to&lt;br/&gt;specifically say that it has a vulnerability; however, I believe it is&lt;br/&gt;inviting vulnerabilities.&lt;br/&gt;For example, I might agree with a counterparty to a design of some sort of&lt;br/&gt;smart contract in the form of a MAST.  My counterparty has shown me all the&lt;br/&gt;&amp;#34;leaves&amp;#34; of our MAST and I can verify its Merkle root computation.&lt;br/&gt;After being deployed, I found out that one of the leaves wasn&amp;#39;t really a&lt;br/&gt;leaf but is instead a specially crafted &amp;#34;script&amp;#34; with a fake pubkey chosen&lt;br/&gt;by my couterparty so that this leaf can also be interpreted as a fake&lt;br/&gt;internal node (i.e. an internal node with a right branch of 0x8000...100).&lt;br/&gt;Because the Fast Merkle Tree design doesn&amp;#39;t distinguish between leaves and&lt;br/&gt;internal nodes my counter party gets away with building an Inclusion Proof&lt;br/&gt;through this &amp;#34;leaf&amp;#34; to reveal the evil code that they had designed into the&lt;br/&gt;MAST at a deeper level.&lt;br/&gt;&lt;br/&gt;Turns out my counterparty was grinding their evil code to produce an&lt;br/&gt;internal node that can also be parsed as an innocent script.  They used&lt;br/&gt;their &amp;#34;pubkey&amp;#34; to absorb excess random data from their grinding that they&lt;br/&gt;cannot eliminate.&lt;br/&gt;(The counterparty doesn&amp;#39;t actually know the discrete log of this &amp;#34;pubkey&amp;#34;,&lt;br/&gt;they just claimed it was their pubkey and I believed them).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Having ambiguity about whether a node is a leaf or an internal node is a&lt;br/&gt;security risk. Furthermore, changing the design so that internal node and&lt;br/&gt;leaves are distinguishable still allows chained invocations.&lt;br/&gt;Arbitrary data can be stored in Fast Merkle Tree leaves, including the&lt;br/&gt;Merkle root of another Fast Merkle Tree.&lt;br/&gt;Applications that are limited to proof with paths no longer than 32&lt;br/&gt;branches can still circumvent this limit by staging these Fast Merkle Trees&lt;br/&gt;in explicit layers (as opposed to the implicit layers with the current&lt;br/&gt;design).&lt;br/&gt;&lt;br/&gt;By storing a inner Fast Merkle Tree root inside the (explicit) leaf of an&lt;br/&gt;outer Fast Merkle Tree, the application can verify a Inclusion Proof of the&lt;br/&gt;inner Fast Merkle Tree Root in the outer Fast Merkle Tree Root, and then&lt;br/&gt;verify a second Inclusion Proof of the desired data in the inner Faster&lt;br/&gt;Merkle Tree Root.  The application will need to tag their data to&lt;br/&gt;distinguish between inner Fast Merkle Tree Roots and other application&lt;br/&gt;data, but that is just part of the general expectation that applications&lt;br/&gt;not store ambiguous data inside the leaves of Fast Merkle Trees.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Wed, Sep 6, 2017 at 10:20 PM, Mark Friedenbach &amp;lt;mark at friedenbach.org&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; This design purposefully does not distinguish leaf nodes from internal&lt;br/&gt;&amp;gt; nodes. That way it chained invocations can be used to validate paths longer&lt;br/&gt;&amp;gt; than 32 branches. Do you see a vulnerability due to this lack of&lt;br/&gt;&amp;gt; distinction?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Sep 6, 2017, at 6:59 PM, Russell O&amp;#39;Connor &amp;lt;roconnor at blockstream.io&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The fast hash for internal nodes needs to use an IV that is not the&lt;br/&gt;&amp;gt; standard SHA-256 IV. Instead needs to use some other fixed value, which&lt;br/&gt;&amp;gt; should itself be the SHA-256 hash of some fixed string (e.g. the string&lt;br/&gt;&amp;gt; &amp;#34;BIP ???&amp;#34; or &amp;#34;Fash SHA-256&amp;#34;).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As it stands, I believe someone can claim a leaf node as an internal node&lt;br/&gt;&amp;gt; by creating a proof that provides a phony right-hand branch claiming to&lt;br/&gt;&amp;gt; have hash 0x80000..0000100 (which is really the padding value for the&lt;br/&gt;&amp;gt; second half of a double SHA-256 hash).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (I was schooled by Peter Todd by a similar issue in the past.)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Wed, Sep 6, 2017 at 8:38 PM, Mark Friedenbach via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Fast Merkle Trees&lt;br/&gt;&amp;gt;&amp;gt; BIP: &lt;a href=&#34;https://gist.github.com/maaku/41b0054de0731321d23e9da90ba4ee0a&#34;&gt;https://gist.github.com/maaku/41b0054de0731321d23e9da90ba4ee0a&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; Code: &lt;a href=&#34;https://github.com/maaku/bitcoin/tree/fast-merkle-tree&#34;&gt;https://github.com/maaku/bitcoin/tree/fast-merkle-tree&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170907/87bc87d5/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170907/87bc87d5/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:05:42&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs227wrz298dftvy28myf4w29wze7fetln7ffdh2m562axaxr87mgqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596uhtw27</id>
    
      <title type="html">📅 Original date posted:2017-09-06 📝 Original message:The ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs227wrz298dftvy28myf4w29wze7fetln7ffdh2m562axaxr87mgqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596uhtw27" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgyks2tq9rtsfen4l266luedntpatjzlfwth68sw5cf5e2lw66jcqjzqncq&#39;&gt;nevent1q…qncq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-09-06&lt;br/&gt;📝 Original message:The fast hash for internal nodes needs to use an IV that is not the&lt;br/&gt;standard SHA-256 IV. Instead needs to use some other fixed value, which&lt;br/&gt;should itself be the SHA-256 hash of some fixed string (e.g. the string&lt;br/&gt;&amp;#34;BIP ???&amp;#34; or &amp;#34;Fash SHA-256&amp;#34;).&lt;br/&gt;&lt;br/&gt;As it stands, I believe someone can claim a leaf node as an internal node&lt;br/&gt;by creating a proof that provides a phony right-hand branch claiming to&lt;br/&gt;have hash 0x80000..0000100 (which is really the padding value for the&lt;br/&gt;second half of a double SHA-256 hash).&lt;br/&gt;&lt;br/&gt;(I was schooled by Peter Todd by a similar issue in the past.)&lt;br/&gt;&lt;br/&gt;On Wed, Sep 6, 2017 at 8:38 PM, Mark Friedenbach 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; Fast Merkle Trees&lt;br/&gt;&amp;gt; BIP: &lt;a href=&#34;https://gist.github.com/maaku/41b0054de0731321d23e9da90ba4ee0a&#34;&gt;https://gist.github.com/maaku/41b0054de0731321d23e9da90ba4ee0a&lt;/a&gt;&lt;br/&gt;&amp;gt; Code: &lt;a href=&#34;https://github.com/maaku/bitcoin/tree/fast-merkle-tree&#34;&gt;https://github.com/maaku/bitcoin/tree/fast-merkle-tree&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/20170906/59d742fe/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170906/59d742fe/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:05:42&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsp883cx9d68tnya0ysjhe0mwx3vr833s8jzumhwfnw24ww4stxtpgzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596hs9fwh</id>
    
      <title type="html">📅 Original date posted:2017-05-13 📝 Original message:I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsp883cx9d68tnya0ysjhe0mwx3vr833s8jzumhwfnw24ww4stxtpgzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596hs9fwh" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszcy0hnr8r8l6jd2yskwp0z2hcyc330q0x3mxj6y7p6yhagdeyzxg3sjryp&#39;&gt;nevent1q…jryp&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-05-13&lt;br/&gt;📝 Original message:I recall chatting about this idea recently and my conclusion was the same&lt;br/&gt;as Peter Todd&amp;#39;s conclusion: this will just encourage miners to false signal&lt;br/&gt;readiness with undermines both BIP 9 and BIP 8.&lt;br/&gt;&lt;br/&gt;I felt that rather than using script system for this construction, it would&lt;br/&gt;be better to use the transaction version number instead by soft-forking in&lt;br/&gt;a rule that says when the most significant bits of a transaction version&lt;br/&gt;are 001 then the transaction can only be included in blocks whose lower 29&lt;br/&gt;version bits are set at the same position as the lower 29 version bits set&lt;br/&gt;in the transaction version.&lt;br/&gt;&lt;br/&gt;That is to say, if we have block version blkVersion and transaction version&lt;br/&gt;txVersion, we soft fork in a rule that requires that&lt;br/&gt;&lt;br/&gt;(txVersion &amp;amp; 0xe0000000 != 0x020000000) || ((blkVersion &amp;amp; 0xe0000000 =&lt;br/&gt;0x020000000) &amp;amp;&amp;amp; (blkVersion &amp;amp; txVersion = txVersion))&lt;br/&gt;&lt;br/&gt;While I think that making use of the transaction version number is superior&lt;br/&gt;to adding an opcode, because it doesn&amp;#39;t interfere with caching of script&lt;br/&gt;validity and because it doesn&amp;#39;t use any more transaction space by making&lt;br/&gt;use of the otherwise useless transaction version number, I still think it&lt;br/&gt;is a bad proposal.&lt;br/&gt;&lt;br/&gt;On Fri, May 12, 2017 at 3:22 PM, Luke Dashjr 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; I&amp;#39;ve written a new BIP draft for OP_CHECKBLOCKVERSION to allow the&lt;br/&gt;&amp;gt; community&lt;br/&gt;&amp;gt; to put economic pressure on miners to deploy softforks without the extreme&lt;br/&gt;&amp;gt; of&lt;br/&gt;&amp;gt; a UASF.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     &lt;a href=&#34;https://github.com/luke-jr/bips/blob/bip-cbv/bip-cbv.mediawiki&#34;&gt;https://github.com/luke-jr/bips/blob/bip-cbv/bip-cbv.mediawiki&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Due to the potential for miners to maliciously block this softfork, it is&lt;br/&gt;&amp;gt; suggested that we deploy it using BIP 8 to ensure it eventually activates&lt;br/&gt;&amp;gt; even&lt;br/&gt;&amp;gt; if encountering hostility.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is intended to be an alternative to BIP 8 in the long term.&lt;br/&gt;&amp;gt; It is NOT intended to make BIP 148 obsolete, given the timeframes involved.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; An implementation is available (based on top of BIP 115&amp;#39;s implementation):&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    &lt;a href=&#34;https://github.com/luke-jr/bitcoin/compare/cbah...luke-&#34;&gt;https://github.com/luke-jr/bitcoin/compare/cbah...luke-&lt;/a&gt;&lt;br/&gt;&amp;gt; jr:checkblockversion&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Luke&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/20170513/5ceec501/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170513/5ceec501/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:01:09&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs24w96u70z46c2a8afzjpq70ef5gpp74yv40g6g60eqackpdhk35gzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596xxdn7p</id>
    
      <title type="html">📅 Original date posted:2017-05-09 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs24w96u70z46c2a8afzjpq70ef5gpp74yv40g6g60eqackpdhk35gzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596xxdn7p" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszvs24huj7ld9w8nvwvg3pl63tzdxhnx022fhhltga0uu7hamsnvgr4fp4g&#39;&gt;nevent1q…fp4g&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-05-09&lt;br/&gt;📝 Original message:I&amp;#39;m a bit amateur at this sort of thing, but let me try to argue that this&lt;br/&gt;proposal is in fact horribly broken ;)&lt;br/&gt;&lt;br/&gt;Suppose Alice has some UTXO with some money Bob wants to steal.  Grant me&lt;br/&gt;that the public key P0 protecting Alice&amp;#39;s UTXO is public (say because the&lt;br/&gt;public key has been reused elsewhere).&lt;br/&gt;&lt;br/&gt;Bob going to spend Alice&amp;#39;s UTXO by generating random values s0, k0 and R0&lt;br/&gt;:= k0*G and thus creating a random signature for it, [R0, s0].  Now clearly&lt;br/&gt;this signature isn&amp;#39;t going to be valid by itself because it is just random.&lt;br/&gt;Bob&amp;#39;s goal will be to make a transaction with other inputs such that, while&lt;br/&gt;the individual signatures are not valid, the aggregated signature will be&lt;br/&gt;valid.&lt;br/&gt;&lt;br/&gt;To do this Bob generates a set of random public keys P1 ... P_n of the form&lt;br/&gt;P_i := P0 &#43; r_i*G, and a bunch of random k1 ... k_n with R1 := k1*G ... R_n&lt;br/&gt;:= k_n*G, such that&lt;br/&gt;&lt;br/&gt;    h(m1, R1, P1) &#43; ... &#43; h(m_n, R_n, P_n) = -h(m0, R0 P0) (modulo the&lt;br/&gt;order of the elliptic curve)&lt;br/&gt;&lt;br/&gt;I understand that this can be done efficiently with Wagner&amp;#39;s Generalized&lt;br/&gt;Birthday attack.&lt;br/&gt;&lt;br/&gt;The RHS aggregated signature equation on the private side is&lt;br/&gt;&lt;br/&gt;    k0 &#43; k1 &#43; ... k_n - h(m0, R0, P0)x0 - h(m1, R1, P1)(x0 &#43; r1) - ... -&lt;br/&gt;h(m_n, R_n, P_n)(x0 &#43; r_n)&lt;br/&gt;&lt;br/&gt;with x0 unknown to Bob.  Rearranging the terms we get&lt;br/&gt;&lt;br/&gt;    k0 &#43; k1 &#43; ... k_n - [h(m0, R0, P0) &#43; h(m1, R1, P1) &#43; ... &#43; h(m_n, R_n,&lt;br/&gt;P_n)]*x0 - [h(m1, R1, P1)*r1 &#43; ... &#43; h(m_n, R_n, P_n)*r_n]&lt;br/&gt;&lt;br/&gt;However [h(m0, R0, P0) &#43; h(m1, R1, P1) &#43; ... &#43; h(m_n, R_n, P_n)] is 0 so&lt;br/&gt;cancelling that we are left with&lt;br/&gt;&lt;br/&gt;    k0 &#43; k1 &#43; ... k_n - [h(m1, R1, P1)*r1 &#43; ... &#43; h(m_n, R_n, P_n)*r_n]&lt;br/&gt;&lt;br/&gt;which no longer depends on the unknown value x0, so that is good.  Bob&lt;br/&gt;knows what this value is.&lt;br/&gt;&lt;br/&gt;Bob creates a set UTXOs by spending to the set of public keys P1 .. P_n.&lt;br/&gt;Bob don&amp;#39;t know what the private keys are for these public keys, but that is&lt;br/&gt;going to be okay.&lt;br/&gt;&lt;br/&gt;Bob creates a final transaction that takes as input the UTXO of Alice&amp;#39;s&lt;br/&gt;funds he wants to steal, with public key P0, and also his newly created&lt;br/&gt;UTXOs with public keys P1 ... P_n.&lt;br/&gt;For the signature on Alice&amp;#39;s input he uses [R0,s0].  For the rest of the&lt;br/&gt;signature he picks s1 ... s_n such that&lt;br/&gt;&lt;br/&gt;    s0 &#43; s1 &#43; ... &#43; sn = k0 &#43; k1 &#43; ... k_n - [h(m1, R1, P1)*r1 &#43; ... &#43;&lt;br/&gt;h(m_n, R_n, P_n)*r_n] (which is equal to k0 &#43; k1 &#43; ... k_n - h(m0, R0,&lt;br/&gt;P0)x0 - h(m1, R1, P1)(x0 &#43; r1) - ... - h(m_n, R_n, P_n)(x0 &#43; r_n)).&lt;br/&gt;&lt;br/&gt;and uses signatures [R1, s1] ... [R_n, s_n] on his other inputs.&lt;br/&gt;&lt;br/&gt;Thus, while none of the individual signatures are valid, the aggregated&lt;br/&gt;signature does validate.&lt;br/&gt;&lt;br/&gt;One wrinkles in this argument is that Bob needs to pick m1 ... m_n before&lt;br/&gt;he knows what the transaction will be.  I think this can be mitigated by&lt;br/&gt;using some combination of SIGHASH_ANYONECANPAY, but I&amp;#39;m not sure if that&lt;br/&gt;works.  Even if my argument doesn&amp;#39;t actually work, I think it is close&lt;br/&gt;enough to be pretty scary.&lt;br/&gt;&lt;br/&gt;Thanks goes to Pieter Wuille for helping explain things to me; however any&lt;br/&gt;errors above are my own.&lt;br/&gt;&lt;br/&gt;On Sun, May 7, 2017 at 2:45 AM, adiabat 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; If / when Schnorr signatures are deployed in a future witness version, it&lt;br/&gt;&amp;gt; may be possible to have non-interactive partial aggregation of the&lt;br/&gt;&amp;gt; signatures on a per-block basis.  This could save quite a bit of space.  It&lt;br/&gt;&amp;gt; *seems* not to have any security problems but this mailing list is very&lt;br/&gt;&amp;gt; good at finding vulnerabilities so that type of feedback is the main reason&lt;br/&gt;&amp;gt; I&amp;#39;m writing :) (A quick explanation of why this is horribly broken could&lt;br/&gt;&amp;gt; save me lots of time!)&lt;br/&gt;&amp;gt; (also sorry if this has been discussed; didn&amp;#39;t see anything)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Quick recap / context of Schnorr sigs:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There are a bunch of private keys x1, x2, x3...&lt;br/&gt;&amp;gt; multiply by generator G to get x1G = P1, x2G = P2, x3G = P3&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Everyone makes their sighash m1, m2, m3, and their random nonces k1, k2,&lt;br/&gt;&amp;gt; k3.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To sign, people calculate s values:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; s1 = k1 - h(m1, R1, P1)x1&lt;br/&gt;&amp;gt; s2 = k2 - h(m2, R2, P2)x2&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (adding the P2 into the e hash value is not in most literature /&lt;br/&gt;&amp;gt; explanations but helps with some attacks; I beleive that&amp;#39;s the current&lt;br/&gt;&amp;gt; thinking.  Anyway it doesn&amp;#39;t matter for this idea)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Signature 1 is [R1, s1].  Verifiers check, given P1, m1, R1, s1:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; s1G =? R1 - h(m1, R1, P1)P1&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; You can *interactively* make aggregate signatures, which requires&lt;br/&gt;&amp;gt; co-signers to build an aggregate R value by coming up with their own k&lt;br/&gt;&amp;gt; values, sharing their R with the co-signers, adding up the R&amp;#39;s to get a&lt;br/&gt;&amp;gt; summed R, and using that to sign.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Non-interactively though, it seems like you can aggregate half the&lt;br/&gt;&amp;gt; signature.  The R values are unique to the [m, P] pair, but the s&amp;#39;s can be&lt;br/&gt;&amp;gt; summed up:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; s1 &#43; s2 = k1 &#43; k2 - h(m1, R1, P1)x1 - h(m2, R2, P2)x2&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (s1 &#43; s2)G = R1 &#43; R2 - h(m1, R1, P1)P1 - h(m2, R2, P2)P2&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To use this property in Bitcoin, when making transactions, wallets can&lt;br/&gt;&amp;gt; sign in the normal way, and the signature, consisting of [R, s] goes into&lt;br/&gt;&amp;gt; the witness stack.  When miners generate a block, they remove the s-value&lt;br/&gt;&amp;gt; from all compatible inputs, and commit to the aggregate s-value in the&lt;br/&gt;&amp;gt; coinbase transaction (either in a new OP_RETURN or alongside the existing&lt;br/&gt;&amp;gt; witness commitment structure).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The obvious advatage is that signatures go down to 32 bytes each, so you&lt;br/&gt;&amp;gt; can fit more of them in a block, and they take up less disk and network&lt;br/&gt;&amp;gt; space.  (In IBD; if a node maintains a mempool they&amp;#39;ll need to receive all&lt;br/&gt;&amp;gt; the separate s-values)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Another advatage is that block verification is sped up.  For individual&lt;br/&gt;&amp;gt; signatures, the computation involves:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; e = h(m1, R1, P1)           &amp;lt;- hash function, super fast&lt;br/&gt;&amp;gt; e*P                         &amp;lt;- point multiplication, slowest&lt;br/&gt;&amp;gt; R - e*P                     &amp;lt;- point addidion, pretty fast&lt;br/&gt;&amp;gt; s*G                         &amp;lt;- base point multiplication, pretty slow&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; with s-aggregate verification, the first three steps are still carried out&lt;br/&gt;&amp;gt; on each signature, but the s*G operation only needs to be done once.&lt;br/&gt;&amp;gt; Instead another point addition per signature is needed, where you have some&lt;br/&gt;&amp;gt; accumulator and add in the left side:&lt;br/&gt;&amp;gt; A &#43;= R - e*P&lt;br/&gt;&amp;gt; this can be parallelized pretty well as it&amp;#39;s commutative.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The main downside I can see (assuming this actually works) is that it&amp;#39;s&lt;br/&gt;&amp;gt; hard to cache signatures and quickly validate a block after it has come&lt;br/&gt;&amp;gt; in.  It might not be as bad as it first seems, as validation given chached&lt;br/&gt;&amp;gt; signatures looks possible without any elliptic curve operations.  Keep an&lt;br/&gt;&amp;gt; aggregate s-value (which is a scalar) for all the txs in your mempool.&lt;br/&gt;&amp;gt; When a block comes in, subtract all the s-values for txs not included in&lt;br/&gt;&amp;gt; the block.  If the block includes txs you weren&amp;#39;t aware of, request them in&lt;br/&gt;&amp;gt; the same way compact blocks works, and get the full signature for those&lt;br/&gt;&amp;gt; txs.  It could be several thousand operations, but those are all bigInt&lt;br/&gt;&amp;gt; modular additions / subtractions which I believe are pretty quick in&lt;br/&gt;&amp;gt; comparison with point additions / multiplications.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There may be other complications due to the fact that the witness-txids&lt;br/&gt;&amp;gt; change when building a block.  TXIDs don&amp;#39;t change though so should be&lt;br/&gt;&amp;gt; possible to keep track of things OK.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Also you can&amp;#39;t &amp;#34;fail fast&amp;#34; for the signature verification; you have to add&lt;br/&gt;&amp;gt; everything up before you can tell if it&amp;#39;s correct.  Probably not a big deal&lt;br/&gt;&amp;gt; as PoW check comes first, and invalid blocks are pretty uncommon and quite&lt;br/&gt;&amp;gt; costly.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Would be interested to hear if this idea looks promising.&lt;br/&gt;&amp;gt; Andrew Polestra mentioned something like this in the context of CT /&lt;br/&gt;&amp;gt; mimblewimble transactions a while ago, but it seems it may be applicable to&lt;br/&gt;&amp;gt; regular bitcoin Schnorr txs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -Tadge&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170509/75fc05c4/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170509/75fc05c4/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:00:51&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsv5vgfanhkdluh4sz8v0m4sntxng2y9sxtlx3qw07tuvdcfw0rsaqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596qw0kcj</id>
    
      <title type="html">📅 Original date posted:2017-04-26 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsv5vgfanhkdluh4sz8v0m4sntxng2y9sxtlx3qw07tuvdcfw0rsaqzyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596qw0kcj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8sp45sqkjjkylejh7zsgvq6lyy0mujumtzsfhxd8zla85kqvsrgcm2sluk&#39;&gt;nevent1q…sluk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-04-26&lt;br/&gt;📝 Original message:On Wed, Apr 26, 2017 at 4:01 PM, Luke Dashjr 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; There are things scriptSig can do that witness cannot today - specifically&lt;br/&gt;&amp;gt; add&lt;br/&gt;&amp;gt; additional conditions under the signature. We can always obsolete scriptSig&lt;br/&gt;&amp;gt; later, after segwit has provided an alternative way to do this.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not sure what you are referring to here.  The data in the scriptSigs&lt;br/&gt;are never signed.  The scriptSigs are always stripped from the transaction&lt;br/&gt;before the sigHash is made.&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/20170426/f3cfa587/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170426/f3cfa587/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:00:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfqap0lkugu0qsq60lrf4c7m526lwmjf2eufz0eawh440r7gu47hszyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596ch8ert</id>
    
      <title type="html">📅 Original date posted:2016-11-02 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfqap0lkugu0qsq60lrf4c7m526lwmjf2eufz0eawh440r7gu47hszyp4cuaek3qzqz0t3y6ayka78jcaulmlepyf40y2nzzta0g8s8j596ch8ert" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxra0z6548dva7en9u4hnljh3kx33zrud8j2xhmpn07v0z737npvqq44w4y&#39;&gt;nevent1q…4w4y&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-11-02&lt;br/&gt;📝 Original message:Hi all,&lt;br/&gt;&lt;br/&gt;It is possible to implement covenants using two script extensions: OP_CAT&lt;br/&gt;and OP_CHECKSIGFROMSTACKVERIFY.  Both of these op codes are already&lt;br/&gt;available in the Elements Alpha sidechain, so it is possible to construct&lt;br/&gt;covenants in Elements Alpha today.  I have detailed how the construction&lt;br/&gt;works in a blog post at &amp;lt;&lt;br/&gt;&lt;a href=&#34;https://blockstream.com/2016/11/02/covenants-in-elements-alpha.html&amp;gt&#34;&gt;https://blockstream.com/2016/11/02/covenants-in-elements-alpha.html&amp;gt&lt;/a&gt;;.  As&lt;br/&gt;an example, I&amp;#39;ve constructed scripts for the Moeser-Eyal-Sirer vault.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m interested in collecting and implementing other useful covenants, so if&lt;br/&gt;people have ideas, please post them.&lt;br/&gt;&lt;br/&gt;If there are any questions, I&amp;#39;d be happy to answer.&lt;br/&gt;&lt;br/&gt;-- &lt;br/&gt;Russell O&amp;#39;Connor&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/20161102/7ccba370/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20161102/7ccba370/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T19:54:13&#43;02:00</updated>
  </entry>

</feed>