diff --git a/zip-0215.html b/zip-0215.html index 56b08782..edd04100 100644 --- a/zip-0215.html +++ b/zip-0215.html @@ -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 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.

+

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 validity from an obsolete version of libsodium. Instead, this ZIP settles the situation by explicitly defining the Ed25519 validity criteria and changing them to be compatible with batch validation.

Motivation

-

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.

+

The lack of clear validity criteria for Ed25519 signatures poses a maintenance burden. The initial implementation of Zcash consensus in zcashd inherited validity 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 validity 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 validity 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 validity 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 diff --git a/zip-0215.rst b/zip-0215.rst index 11da41a4..246f716b 100644 --- a/zip-0215.rst +++ b/zip-0215.rst @@ -22,30 +22,30 @@ 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 validation from an obsolete version of +inherits criteria for signature validity 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 +Ed25519 validity criteria and changing them to be compatible with batch validation. Motivation ========== -The lack of clear validation criteria for Ed25519 signatures poses a +The lack of clear validity 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). +inherited validity 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 [#protocol]_ (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 +guaranteed stable validity 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. +eventually patching a newer version to have consistent validity 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 +In addition, the validity 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.