From cf70811274eaf125fc6fd2ca65a3b3571b675592 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Tue, 9 Jun 2020 12:56:33 +0100 Subject: [PATCH] Use "validate" rather than "verify" for signature validation in ZIPs. "Validate" is also used for blocks and transactions, but not for proofs, commitments, or Merkle paths. The same change will be made to the protocol specification in the next version. Signed-off-by: Daira Hopwood --- README.rst | 6 +++--- index.html | 6 +++--- zip-0143.html | 12 ++++++------ zip-0143.rst | 18 +++++++++--------- zip-0202.html | 6 +++--- zip-0202.rst | 6 +++--- zip-0208.html | 2 +- zip-0208.rst | 2 +- zip-0215.html | 16 ++++++++-------- zip-0215.rst | 24 ++++++++++++------------ zip-0243.html | 10 +++++----- zip-0243.rst | 8 ++++---- zip-0251.html | 4 ++-- zip-0251.rst | 4 ++-- 14 files changed, 62 insertions(+), 62 deletions(-) diff --git a/README.rst b/README.rst index 9ff53875..989cfb6e 100644 --- a/README.rst +++ b/README.rst @@ -66,7 +66,7 @@ Index of ZIPs ZIP Title Status 0 ZIP Process Active 32 Shielded Hierarchical Deterministic Wallets Final - 143 Transaction Signature Verification for Overwinter Final + 143 Transaction Signature Validation for Overwinter Final 173 Bech32 Format Final 200 Network Upgrade Mechanism Final 201 Network Peer Management for Overwinter Final @@ -82,9 +82,9 @@ Index of ZIPs 212 Allow Recipient to Derive Sapling Ephemeral Secret from Note Plaintext Proposed 213 Shielded Coinbase Implemented (zcashd) 214 Consensus rules for a Zcash Development Fund Proposed - 215 Explicitly define Ed25519 validation rules Proposed + 215 Explicitly Defining and Modifying Ed25519 Validation Rules Proposed 221 FlyClient - Consensus-Layer Changes Implemented (zcashd) - 243 Transaction Signature Verification for Sapling Final + 243 Transaction Signature Validation for Sapling Final 250 Deployment of the Heartwood Network Upgrade Implemented (zcashd) 251 Deployment of the Canopy Network Upgrade Proposed 308 Sprout to Sapling Migration Final diff --git a/index.html b/index.html index 376febea..0db49429 100644 --- a/index.html +++ b/index.html @@ -39,7 +39,7 @@ ZIP Title Status 0 ZIP Process Active 32 Shielded Hierarchical Deterministic Wallets Final - 143 Transaction Signature Verification for Overwinter Final + 143 Transaction Signature Validation for Overwinter Final 173 Bech32 Format Final 200 Network Upgrade Mechanism Final 201 Network Peer Management for Overwinter Final @@ -55,9 +55,9 @@ 212 Allow Recipient to Derive Sapling Ephemeral Secret from Note Plaintext Proposed 213 Shielded Coinbase Implemented (zcashd) 214 Consensus rules for a Zcash Development Fund Proposed - 215 Explicitly define Ed25519 validation rules Proposed + 215 Explicitly Defining and Modifying Ed25519 Validation Rules Proposed 221 FlyClient - Consensus-Layer Changes Implemented (zcashd) - 243 Transaction Signature Verification for Sapling Final + 243 Transaction Signature Validation for Sapling Final 250 Deployment of the Heartwood Network Upgrade Implemented (zcashd) 251 Deployment of the Canopy Network Upgrade Proposed 308 Sprout to Sapling Migration Final diff --git a/zip-0143.html b/zip-0143.html index fe082a19..dd613bfe 100644 --- a/zip-0143.html +++ b/zip-0143.html @@ -1,13 +1,13 @@ - ZIP 143: Transaction Signature Verification for Overwinter + ZIP 143: Transaction Signature Validation for Overwinter
ZIP: 143
-Title: Transaction Signature Verification for Overwinter
+Title: Transaction Signature Validation for Overwinter
 Owners: Jack Grigg <str4d@electriccoin.co>
         Daira Hopwood <daira@electriccoin.co>
 Credits: Johnson Lau
@@ -23,13 +23,13 @@ License: MIT

The term "Overwinter" in this document is to be interpreted as described in ZIP 201. 11

Abstract

-

This proposal defines a new transaction digest algorithm for signature verification from the Overwinter network upgrade, in order to minimize redundant data hashing in verification, and to cover the input value by the signature.

+

This proposal defines a new transaction digest algorithm for signature validation from the Overwinter network upgrade, in order to minimize redundant data hashing in validation, and to cover the input value by the signature.

Motivation

-

There are 4 ECDSA signature verification codes in the original Zcash script system: CHECKSIG, CHECKSIGVERIFY, CHECKMULTISIG, CHECKMULTISIGVERIFY ("sigops"). According to the sighash type (ALL, NONE, or SINGLE, possibly modified by ANYONECANPAY), a transaction digest is generated with a double SHA256 of a serialized subset of the transaction, and the signature is verified against this digest with a given public key. The detailed procedure is described in a Bitcoin Wiki article. 2 The transaction digest is additionally used for the JoinSplit signature (solely with sighash type ALL). 3

+

There are 4 ECDSA signature validation operations in the original Zcash script system: CHECKSIG, CHECKSIGVERIFY, CHECKMULTISIG, CHECKMULTISIGVERIFY ("sigops"). According to the sighash type (ALL, NONE, or SINGLE, possibly modified by ANYONECANPAY), a transaction digest is generated with a double SHA256 of a serialized subset of the transaction, and the signature is validated against this digest with a given public key. The detailed procedure is described in a Bitcoin Wiki article. 2 The transaction digest is additionally used for the JoinSplit signature (solely with sighash type ALL). 3

Unfortunately, there are at least 2 weaknesses in the original SignatureHash transaction digest algorithm:

    -
  • For the verification of each signature, the amount of data hashing is proportional to the size of the transaction. Therefore, data hashing grows in O(n2) as the number of sigops in a transaction increases. While a 1 MB block would normally take 2 seconds to verify with an average computer in 2015, a 1MB transaction with 5569 sigops may take 25 seconds to verify. This could be fixed by optimizing the digest algorithm by introducing some reusable "midstate", so the time complexity becomes O(n). 4
  • +
  • For the validation of each signature, the amount of data hashing is proportional to the size of the transaction. Therefore, data hashing grows in O(n2) as the number of sigops in a transaction increases. While a 1 MB block would normally take 2 seconds to validate with an average computer in 2015, a 1MB transaction with 5569 sigops may take 25 seconds to validate. This could be fixed by optimizing the digest algorithm by introducing some reusable "midstate", so the time complexity becomes O(n). 4
  • The algorithm does not involve the value being spent by the input. This is usually not a problem for online network nodes as they could request for the specified transaction to acquire the output value. For an offline transaction signing device ("cold wallet"), however, the lack of knowledge of input amount makes it impossible to calculate the exact amount being spent and the transaction fee. To cope with this problem a cold wallet must also acquire the full transaction being spent, which could be a big obstacle in the implementation of a lightweight, air-gapped wallet. By including the input value of part of the transaction digest, a cold wallet may safely sign a transaction by learning the value from an untrusted source. In the case that a wrong value is provided and signed, the signature would be invalid and no funds would be lost. 5

Deploying the aforementioned fixes in the original script system is not a simple task.

@@ -126,7 +126,7 @@ License: MIT

Notes

-

The hashPrevouts, hashSequence, hashOutputs, and hashJoinSplits calculated in an earlier verification can be reused in other inputs of the same transaction, so that the time complexity of the whole hashing process reduces from O(n2) to O(n).

+

The hashPrevouts, hashSequence, hashOutputs, and hashJoinSplits calculated in an earlier validation can be reused in other inputs of the same transaction, so that the time complexity of the whole hashing process reduces from O(n2) to O(n).

Refer to the reference implementation, reproduced below, for the precise algorithm:

const unsigned char ZCASH_PREVOUTS_HASH_PERSONALIZATION[16] =
     {'Z','c','a','s','h','P','r','e','v','o','u','t','H','a','s','h'};
diff --git a/zip-0143.rst b/zip-0143.rst
index fe666931..1365bcf6 100644
--- a/zip-0143.rst
+++ b/zip-0143.rst
@@ -1,7 +1,7 @@
 ::
 
   ZIP: 143
-  Title: Transaction Signature Verification for Overwinter
+  Title: Transaction Signature Validation for Overwinter
   Owners: Jack Grigg 
           Daira Hopwood 
   Credits: Johnson Lau
@@ -27,28 +27,28 @@ The term "Overwinter" in this document is to be interpreted as described in ZIP
 Abstract
 ========
 
-This proposal defines a new transaction digest algorithm for signature verification from the Overwinter
-network upgrade, in order to minimize redundant data hashing in verification, and to cover the input value by
+This proposal defines a new transaction digest algorithm for signature validation from the Overwinter
+network upgrade, in order to minimize redundant data hashing in validation, and to cover the input value by
 the signature.
 
 
 Motivation
 ==========
 
-There are 4 ECDSA signature verification codes in the original Zcash script system: ``CHECKSIG``,
+There are 4 ECDSA signature validation operations in the original Zcash script system: ``CHECKSIG``,
 ``CHECKSIGVERIFY``, ``CHECKMULTISIG``, ``CHECKMULTISIGVERIFY`` ("sigops"). According to the sighash type
 (``ALL``, ``NONE``, or ``SINGLE``, possibly modified by ``ANYONECANPAY``), a transaction digest is generated
-with a double SHA256 of a serialized subset of the transaction, and the signature is verified against this
+with a double SHA256 of a serialized subset of the transaction, and the signature is validated against this
 digest with a given public key. The detailed procedure is described in a Bitcoin Wiki article. [#wiki-checksig]_
 The transaction digest is additionally used for the JoinSplit signature (solely with sighash type ``ALL``).
 [#zcash-protocol]_
 
 Unfortunately, there are at least 2 weaknesses in the original SignatureHash transaction digest algorithm:
 
-* For the verification of each signature, the amount of data hashing is proportional to the size of the
+* For the validation of each signature, the amount of data hashing is proportional to the size of the
   transaction. Therefore, data hashing grows in O(n\ :sup:`2`) as the number of sigops in a transaction
-  increases. While a 1 MB block would normally take 2 seconds to verify with an average computer in 2015, a
-  1MB transaction with 5569 sigops may take 25 seconds to verify. This could be fixed by optimizing the digest
+  increases. While a 1 MB block would normally take 2 seconds to validate with an average computer in 2015, a
+  1MB transaction with 5569 sigops may take 25 seconds to validate. This could be fixed by optimizing the digest
   algorithm by introducing some reusable "midstate", so the time complexity becomes O(n). [#quadratic]_
 
 * The algorithm does not involve the value being spent by the input. This is usually not a problem for online
@@ -197,7 +197,7 @@ Notes
 -----
 
 The ``hashPrevouts``, ``hashSequence``, ``hashOutputs``, and ``hashJoinSplits`` calculated in an earlier
-verification can be reused in other inputs of the same transaction, so that the time complexity of the whole
+validation can be reused in other inputs of the same transaction, so that the time complexity of the whole
 hashing process reduces from O(n\ :sup:`2`) to O(n).
 
 Refer to the reference implementation, reproduced below, for the precise algorithm:
diff --git a/zip-0202.html b/zip-0202.html
index 2657d2c5..15cbdf50 100644
--- a/zip-0202.html
+++ b/zip-0202.html
@@ -284,7 +284,7 @@ License: MIT
  • the version group ID is unknown; or
  • the version number is unknown.
  • -

    Validation of version 3 transactions MUST use the signature verification process detailed in the Transaction Signature Verification for Overwinter ZIP 2.

    +

    Validation of version 3 transactions MUST use the signature validation process detailed in the Transaction Signature Validation for Overwinter ZIP 2.

    Implementation

    The comments and code samples in this section apply to the reference C++ implementation of Zcash. Other implementations may vary.

    @@ -317,7 +317,7 @@ License: MIT }

    It is expected that this test involving nVersionGroupId is only required when a transaction is being constructed or deserialized e.g. when an external transaction enters the system.

    However, it's possible that a clone of Zcash is using the same version group ID and passes the conditional.

    -

    Ultimately, a client can determine if a transaction is truly intended for the client's chain or not by following the signature verification process detailed in the Transaction Signature Verification for Overwinter ZIP 2.

    +

    Ultimately, a client can determine if a transaction is truly intended for the client's chain or not by following the signature validation process detailed in the Transaction Signature Validation for Overwinter ZIP 2.

    Deployment

    @@ -343,7 +343,7 @@ License: MIT 2 - ZIP 143: Transaction Signature Verification for Overwinter + ZIP 143: Transaction Signature Validation for Overwinter diff --git a/zip-0202.rst b/zip-0202.rst index 13e0f87c..c1795581 100644 --- a/zip-0202.rst +++ b/zip-0202.rst @@ -190,7 +190,7 @@ Overwinter validators MUST reject transactions for violating consensus rules if: - the version group ID is unknown; or - the version number is unknown. -Validation of version 3 transactions MUST use the signature verification process detailed in the Transaction Signature Verification for Overwinter ZIP [#zip-0143]_. +Validation of version 3 transactions MUST use the signature validation process detailed in the Transaction Signature Validation for Overwinter ZIP [#zip-0143]_. Implementation ============== @@ -246,7 +246,7 @@ It is expected that this test involving ``nVersionGroupId`` is only required whe However, it's possible that a clone of Zcash is using the same version group ID and passes the conditional. -Ultimately, a client can determine if a transaction is truly intended for the client's chain or not by following the signature verification process detailed in the Transaction Signature Verification for Overwinter ZIP [#zip-0143]_. +Ultimately, a client can determine if a transaction is truly intended for the client's chain or not by following the signature validation process detailed in the Transaction Signature Validation for Overwinter ZIP [#zip-0143]_. Deployment ========== @@ -276,7 +276,7 @@ References ========== .. [#RFC2119] `Key words for use in RFCs to Indicate Requirement Levels `_ -.. [#zip-0143] `ZIP 143: Transaction Signature Verification for Overwinter `_ +.. [#zip-0143] `ZIP 143: Transaction Signature Validation for Overwinter `_ .. [#zip-0200] `ZIP 200: Network Upgrade Activation Mechanism `_ .. [#zip-0201] `ZIP 201: Network Handshaking for Overwinter `_ .. [#zip-0203] `ZIP 203: Transaction Expiry `_ diff --git a/zip-0208.html b/zip-0208.html index 87b3563a..e41f734b 100644 --- a/zip-0208.html +++ b/zip-0208.html @@ -31,7 +31,7 @@ License: MIT
  • Greater throughput of transactions in unit time.
  • The latter goal could alternatively be achieved by increasing the block size limit, but that would not also achieve the former goal.

    -

    Note that, for a given security requirement (in terms of the expected cost distribution of a rollback attack), the number of confirmations needed increases more slowly than the decrease in block time, and so, up to a point, decreasing the block target spacing can provide a better trade-off between latency and security. This argument assumes that the verification and propagation time for a block remain small compared to the block target spacing. See 8 for further analysis in various attack models.

    +

    Note that, for a given security requirement (in terms of the expected cost distribution of a rollback attack), the number of confirmations needed increases more slowly than the decrease in block time, and so, up to a point, decreasing the block target spacing can provide a better trade-off between latency and security. This argument assumes that the validation and propagation time for a block remain small compared to the block target spacing. See 8 for further analysis in various attack models.

    Specification

    The changes described in this section are to be made in 1, relative to the pre-Blossom specification in [#preblossom-protocol].

    diff --git a/zip-0208.rst b/zip-0208.rst index 18df47bf..140c0c03 100644 --- a/zip-0208.rst +++ b/zip-0208.rst @@ -52,7 +52,7 @@ Note that, for a given security requirement (in terms of the expected cost distribution of a rollback attack), the number of confirmations needed increases more slowly than the decrease in block time, and so, up to a point, decreasing the block target spacing can provide a better trade-off between -latency and security. This argument assumes that the verification and +latency and security. This argument assumes that the validation and propagation time for a block remain small compared to the block target spacing. See [#slowfastblocks]_ for further analysis in various attack models. diff --git a/zip-0215.html b/zip-0215.html index 94dfcc8c..56b08782 100644 --- a/zip-0215.html +++ b/zip-0215.html @@ -1,14 +1,14 @@ - ZIP 215: Explicitly define Ed25519 validation rules + ZIP 215: Explicitly Defining and Modifying Ed25519 Validation Rules
    ZIP: 215
    -Title: Explicitly define Ed25519 validation rules
    +Title: Explicitly Defining and Modifying Ed25519 Validation Rules
     Owners: Henry de Valence <hdevalence@zfnd.org>
     Status: Proposed
     Category: Consensus
    @@ -18,11 +18,11 @@ License: BSD-2-Clause

    The key words "MUST" and "MUST NOT" in this document is to be interpreted as described in RFC 2119. 1

    Abstract

    -

    Zcash uses Ed25519 signatures as part of Sprout transactions. However, Ed25519 does not clearly define criteria for signature validity, and implementations conformant to RFC 8032 2 need not agree on whether signatures are valid. This is unacceptable for a consensus-critical application like Zcash. Currently, Zcash inherits criteria for signature verification from an obsolete version of libsodium. Instead, this ZIP settles the situation by explicitly defining the Ed25519 verification criteria and changing them to be compatible with batch verification.

    +

    Zcash uses Ed25519 signatures as part of Sprout transactions. However, Ed25519 does not clearly define criteria for signature validity, and implementations conformant to RFC 8032 2 need not agree on whether signatures are valid. This is unacceptable for a consensus-critical application like Zcash. Currently, Zcash inherits criteria for signature validation from an obsolete version of libsodium. Instead, this ZIP settles the situation by explicitly defining the Ed25519 validation criteria and changing them to be compatible with batch validation.

    Motivation

    -

    The lack of clear verification criteria for Ed25519 signatures poses a maintenance burden. The initial implementation of Zcash consensus in zcashd inherited validation criteria from a then-current version of libsodium (1.0.15). Due to a bug in libsodium, this was different from the intended criteria documented in the Zcash protocol specification 3 (before the specification was changed to match libsodium 1.0.15 in specification version 2020.1.2). Also, libsodium never guaranteed stable validation criteria, and changed behavior in a later point release. This forced zcashd to use an older version of the library before eventually patching a newer version to have consistent validation criteria. To be compatible, Zebra had to implement a special library, ed25519-zebra to provide Zcash-flavored Ed25519, attempting to match libsodium 1.0.15 exactly. And the initial attempt to implement ed25519-zebra was also incompatible, because it precisely matched the wrong compile-time configuration of libsodium.

    -

    In addition, the validation criteria used by Zcash preclude the use of batch verification of Ed25519 signatures. While signature verification is not the primary bottleneck for Zcash, it would be nice to be able to batch-verify signatures, as is the case for RedJubJub.

    +

    The lack of clear validation criteria for Ed25519 signatures poses a maintenance burden. The initial implementation of Zcash consensus in zcashd inherited validation criteria from a then-current version of libsodium (1.0.15). Due to a bug in libsodium, this was different from the intended criteria documented in the Zcash protocol specification 3 (before the specification was changed to match libsodium 1.0.15 in specification version 2020.1.2). Also, libsodium never guaranteed stable validation criteria, and changed behavior in a later point release. This forced zcashd to use an older version of the library before eventually patching a newer version to have consistent validation criteria. To be compatible, Zebra had to implement a special library, ed25519-zebra to provide Zcash-flavored Ed25519, attempting to match libsodium 1.0.15 exactly. And the initial attempt to implement ed25519-zebra was also incompatible, because it precisely matched the wrong compile-time configuration of libsodium.

    +

    In addition, the validation criteria used by Zcash preclude the use of batch validation of Ed25519 signatures. While signature validation is not the primary bottleneck for Zcash, it would be nice to be able to batch-validate signatures, as is the case for RedJubjub.

    Specification

    After activation of this ZIP, the @@ -65,13 +65,13 @@ License: BSD-2-Clause -coordinate of the points may be unreduced modulo \(2^{255}-19\) .

    -

    Note: the alternate verification equation +

    Note: the alternate validation equation \([S]B = R + [k]A\) , allowed by RFC 8032, MUST NOT be used.

    Rationale

    -

    This change simplifies the Ed25519 validation logic and reduces future maintenance burden. Because multiplication by the cofactor admits more solutions to the verification equation, not fewer, it is compatible with all existing Ed25519 signatures on the chain.

    -

    It also allows the use of batch verification, which requires multiplication by the cofactor in the verification equation.

    +

    This change simplifies the Ed25519 validation logic and reduces future maintenance burden. Because multiplication by the cofactor admits more solutions to the validation equation, not fewer, it is compatible with all existing Ed25519 signatures on the chain.

    +

    It also allows the use of batch validation, which requires multiplication by the cofactor in the validation equation.

    Security and Privacy Considerations

    This change has no effect on honestly-generated signatures. Unlike the current validation rules, it makes it possible for a user to generate weak signing keys or to generate signing keys with nonzero torsion component and submit them to the blockchain. However, doing so provides them with no advantage, only compromise to their own security. Moreover, these cases are not a failure mode of any deployed implementation.

    diff --git a/zip-0215.rst b/zip-0215.rst index e8ec3b38..11da41a4 100644 --- a/zip-0215.rst +++ b/zip-0215.rst @@ -1,7 +1,7 @@ :: ZIP: 215 - Title: Explicitly define Ed25519 validation rules + Title: Explicitly Defining and Modifying Ed25519 Validation Rules Owners: Henry de Valence Status: Proposed Category: Consensus @@ -22,15 +22,15 @@ Zcash uses Ed25519 signatures as part of Sprout transactions. However, Ed25519 does not clearly define criteria for signature validity, and implementations conformant to RFC 8032 [#RFC8032]_ need not agree on whether signatures are valid. This is unacceptable for a consensus-critical application like Zcash. Currently, Zcash -inherits criteria for signature verification from an obsolete version of +inherits criteria for signature validation from an obsolete version of `libsodium`. Instead, this ZIP settles the situation by explicitly defining the -Ed25519 verification criteria and changing them to be compatible with batch -verification. +Ed25519 validation criteria and changing them to be compatible with batch +validation. Motivation ========== -The lack of clear verification criteria for Ed25519 signatures poses a +The lack of clear validation criteria for Ed25519 signatures poses a maintenance burden. The initial implementation of Zcash consensus in `zcashd` inherited validation criteria from a then-current version of `libsodium` (1.0.15). Due to `a bug in libsodium `_, @@ -46,9 +46,9 @@ the initial attempt to implement `ed25519-zebra` was also incompatible, because it precisely matched the wrong compile-time configuration of `libsodium`. In addition, the validation criteria used by Zcash preclude the use of batch -verification of Ed25519 signatures. While signature verification is not the -primary bottleneck for Zcash, it would be nice to be able to batch-verify -signatures, as is the case for RedJubJub. +validation of Ed25519 signatures. While signature validation is not the +primary bottleneck for Zcash, it would be nice to be able to batch-validate +signatures, as is the case for RedJubjub. Specification ============= @@ -70,7 +70,7 @@ It is *not* required that :math:`\underline{A}` and :math:`\underline{R}` are canonical encodings; in other words, the integer encoding the :math:`y`-coordinate of the points may be unreduced modulo :math:`2^{255}-19`. -Note: the alternate verification equation :math:`[S]B = R + [k]A`, allowed +Note: the alternate validation equation :math:`[S]B = R + [k]A`, allowed by RFC 8032, MUST NOT be used. Rationale @@ -78,11 +78,11 @@ Rationale This change simplifies the Ed25519 validation logic and reduces future maintenance burden. Because multiplication by the cofactor admits more -solutions to the verification equation, not fewer, it is compatible with all +solutions to the validation equation, not fewer, it is compatible with all existing Ed25519 signatures on the chain. -It also allows the use of batch verification, which requires multiplication -by the cofactor in the verification equation. +It also allows the use of batch validation, which requires multiplication +by the cofactor in the validation equation. Security and Privacy Considerations =================================== diff --git a/zip-0243.html b/zip-0243.html index 6caa9576..5accb73a 100644 --- a/zip-0243.html +++ b/zip-0243.html @@ -1,13 +1,13 @@ - ZIP 243: Transaction Signature Verification for Sapling + ZIP 243: Transaction Signature Validation for Sapling
    ZIP: 243
    -Title: Transaction Signature Verification for Sapling
    +Title: Transaction Signature Validation for Sapling
     Owners: Jack Grigg <str4d@electriccoin.co>
             Daira Hopwood <daira@electriccoin.co>
     Credits: Simon Liu
    @@ -21,7 +21,7 @@ License: MIT

    The term "Sapling" in this document is to be interpreted as described in ZIP 205. 6

    Abstract

    -

    This proposal defines a new transaction digest algorithm for signature verification from the Sapling network upgrade, to account for the presence of Sapling shielded inputs and outputs in transactions.

    +

    This proposal defines a new transaction digest algorithm for signature validation from the Sapling network upgrade, to account for the presence of Sapling shielded inputs and outputs in transactions.

    Motivation

    The Sapling network upgrade introduced new shielded inputs and outputs. We want these to be covered by the transaction digest algorithm used for signatures, in order to ensure they are correctly bound.

    @@ -95,7 +95,7 @@ License: MIT

    Notes

    -

    The hashPrevouts, hashSequence, hashOutputs, hashJoinSplits, hashShieldedSpends, and hashShieldedOutputs calculated in an earlier verification can be reused in other inputs of the same transaction, so that the time complexity of the whole hashing process reduces from O(n2) to O(n).

    +

    The hashPrevouts, hashSequence, hashOutputs, hashJoinSplits, hashShieldedSpends, and hashShieldedOutputs calculated in an earlier validation can be reused in other inputs of the same transaction, so that the time complexity of the whole hashing process reduces from O(n2) to O(n).

    Refer to the reference implementation, reproduced below, for the precise algorithm:

    const unsigned char ZCASH_PREVOUTS_HASH_PERSONALIZATION[16] =
         {'Z','c','a','s','h','P','r','e','v','o','u','t','H','a','s','h'};
    @@ -471,7 +471,7 @@ vJoinSplit:      00
    4 - ZIP 143: Transaction Signature Verification for Overwinter + ZIP 143: Transaction Signature Validation for Overwinter diff --git a/zip-0243.rst b/zip-0243.rst index 58249713..c71a1209 100644 --- a/zip-0243.rst +++ b/zip-0243.rst @@ -1,7 +1,7 @@ :: ZIP: 243 - Title: Transaction Signature Verification for Sapling + Title: Transaction Signature Validation for Sapling Owners: Jack Grigg Daira Hopwood Credits: Simon Liu @@ -25,7 +25,7 @@ The term "Sapling" in this document is to be interpreted as described in ZIP 205 Abstract ======== -This proposal defines a new transaction digest algorithm for signature verification from the Sapling network +This proposal defines a new transaction digest algorithm for signature validation from the Sapling network upgrade, to account for the presence of Sapling shielded inputs and outputs in transactions. @@ -136,7 +136,7 @@ Notes ----- The ``hashPrevouts``, ``hashSequence``, ``hashOutputs``, ``hashJoinSplits``, ``hashShieldedSpends``, and -``hashShieldedOutputs`` calculated in an earlier verification can be reused in other inputs of the same +``hashShieldedOutputs`` calculated in an earlier validation can be reused in other inputs of the same transaction, so that the time complexity of the whole hashing process reduces from O(n\ :sup:`2`) to O(n). Refer to the reference implementation, reproduced below, for the precise algorithm: @@ -529,7 +529,7 @@ References .. [#RFC2119] `Key words for use in RFCs to Indicate Requirement Levels `_ .. [#protocol] `Zcash Protocol Specification [Overwinter+Sapling] `_ .. [#BLAKE2-personalization] `"BLAKE2: simpler, smaller, fast as MD5", Section 2.8 `_ -.. [#zip-0143] `ZIP 143: Transaction Signature Verification for Overwinter `_ +.. [#zip-0143] `ZIP 143: Transaction Signature Validation for Overwinter `_ .. [#zip-0200] `ZIP 200: Network Upgrade Mechanism `_ .. [#zip-0205] `ZIP 205: Deployment of the Sapling Network Upgrade `_ .. [#test-vectors] `ZIP 243 Test Vectors `_ diff --git a/zip-0251.html b/zip-0251.html index e184f582..898b49cf 100644 --- a/zip-0251.html +++ b/zip-0251.html @@ -39,7 +39,7 @@ License: MIT
  • ZIP 211: Disabling Addition of New Value to the Sprout Value Pool 6
  • ZIP 212: Allow Recipient to Derive Sapling Ephemeral Secret from Note Plaintext 7
  • ZIP 214: Consensus rules for a Zcash Development Fund 8
  • -
  • ZIP 215: Modifying Ed25519 validation rules to allow batch verification 9
  • +
  • ZIP 215: Explicitly Defining and Modifying Ed25519 Validation Rules 9
  • ZIP 1014: Establishing a Dev Fund for ECC, ZF, and Major Grants 11.
  • The network handshake and peer management mechanisms defined in ZIP 201 4 also apply to this upgrade.

    @@ -146,7 +146,7 @@ static const int NETWORK_UPGRADE_PEER_PREFERENCE_BLOCK_PERIOD = 1728; 9 - Draft ZIP 215: Modifying Ed25519 validation rules to allow batch verification + ZIP 215: Explicitly Defining and Modifying Ed25519 Validation Rules diff --git a/zip-0251.rst b/zip-0251.rst index 88e5cb55..57827a46 100644 --- a/zip-0251.rst +++ b/zip-0251.rst @@ -48,7 +48,7 @@ The primary sources of information about Canopy consensus protocol changes are: - ZIP 211: Disabling Addition of New Value to the Sprout Value Pool [#zip-0211]_ - ZIP 212: Allow Recipient to Derive Sapling Ephemeral Secret from Note Plaintext [#zip-0212]_ - ZIP 214: Consensus rules for a Zcash Development Fund [#zip-0214]_ -- ZIP 215: Modifying Ed25519 validation rules to allow batch verification [#zip-0215]_ +- ZIP 215: Explicitly Defining and Modifying Ed25519 Validation Rules [#zip-0215]_ - ZIP 1014: Establishing a Dev Fund for ECC, ZF, and Major Grants [#zip-1014]_. The network handshake and peer management mechanisms defined in ZIP 201 [#zip-0201]_ @@ -138,6 +138,6 @@ References .. [#zip-0211] `ZIP 211: Disabling Addition of New Value to the Sprout Value Pool `_ .. [#zip-0212] `ZIP 212: Allow Recipient to Derive Sapling Ephemeral Secret from Note Plaintext `_ .. [#zip-0214] `ZIP 214: Consensus rules for a Zcash Development Fund `_ -.. [#zip-0215] `Draft ZIP 215: Modifying Ed25519 validation rules to allow batch verification `_ +.. [#zip-0215] `ZIP 215: Explicitly Defining and Modifying Ed25519 Validation Rules `_ .. [#zip-0243] `ZIP 243: Transaction Signature Verification for Sapling `_ .. [#zip-1014] `ZIP 1014: Establishing a Dev Fund for ECC, ZF, and Major Grants `_