diff --git a/zip-0224.html b/zip-0224.html index 863380d0..469f019f 100644 --- a/zip-0224.html +++ b/zip-0224.html @@ -24,10 +24,20 @@ Discussions-To: <https://g

This document proposes the Orchard shielded protocol, which defines a new shielded pool with spending keys and payment addresses that are amenable to future scalability improvements.

Motivation

-

TBD

+

Zcash currently has two active shielded protocols and associated shielded pools:

+ +

Both of these shielded protocols suffer from two issues:

+ +

We are thus motivated to deploy a new shielded protocol designed around a curve cycle, using a proving system that is both amenable to recursion and does not require an SRS.

Specification

-

The Orchard protocol MUST be implemented as specified in the Zcash Protocol Specification 2.

+

The Orchard protocol MUST be implemented as specified in the Zcash Protocol Specification 5.

Given that the Orchard protocol largely follows the design of the Sapling protocol, we provide here a list of differences, with references to their normative specifications and associated design rationale.

Curves

The Orchard protocol uses the Pallas / Vesta curve cycle, in place of BLS12-381 and its embedded curve Jubjub:

@@ -37,14 +47,14 @@ Discussions-To: <https://g

We use the "simplified SWU" algorithm to define an infallible \(\mathsf{GroupHash}\) - , instead of the fallible BLAKE2s-based mechanism used for Sapling. It is intended to follow (version 10 of) the IETF hash-to-curve Internet Draft 27 (but the protocol specification takes precedence in the case of any discrepancy).

+ , instead of the fallible BLAKE2s-based mechanism used for Sapling. It is intended to follow (version 10 of) the IETF hash-to-curve Internet Draft 30 (but the protocol specification takes precedence in the case of any discrepancy).

The presence of the curve cycle is an explicit design choice. This ZIP only uses half of the cycle (Pallas being an embedded curve of Vesta); the full cycle is expected to be leveraged by future ZIPs.

Proving system

@@ -52,31 +62,31 @@ Discussions-To: <https://g

This ZIP does not make use of Halo 2's support for recursive proofs, but this is expected to be leveraged by future ZIPs.

Circuit

Orchard uses a single circuit for both spends and outputs, similar to Sprout. An "action" contains both a single (possibly dummy) note being spent, and a single (possibly dummy) note being created.

An Orchard transaction contains a "bundle" of actions, and a single Halo 2 proof that covers all of the actions in the bundle.

Commitments

The Orchard protocol has equivalent commitment schemes to Sapling. For non-homomorphic commitments, Orchard uses the UPA-efficient Sinsemilla in place of Bowe--Hopwood Pedersen hashes.

Commitment tree

Orchard uses an identical commitment tree structure to Sapling, except that we instantiate it with Sinsemilla instead of a Bowe-Hopwood Pedersen hash.

Keys and addresses

@@ -98,11 +108,11 @@ Discussions-To: <https://g

Keys and addresses are encoded using Bech32. Orchard addresses used with the Zcash mainnet have the prefix "zo" (compared to "zc" for Sprout and "zs" for Sapling).

Orchard keys may be derived in a hierarchical deterministic (HD) manner. We do not adapt the Sapling HD mechanism from ZIP 32 to Orchard; instead, we define a hardened-only derivation mechanism (similar to Sprout).

Notes

@@ -113,9 +123,9 @@ Discussions-To: <https://g \(\psi\) and \(\mathsf{rcm}\) - are derived from a random seed (as with Sapling after ZIP 212 25).

+ are derived from a random seed (as with Sapling after ZIP 212 28).

Nullifiers

@@ -130,13 +140,13 @@ Discussions-To: <https://g is a fixed independent base.

Signatures

Orchard uses RedPallas (RedDSA instantiated with the Pallas curve) as its signature scheme in place of Sapling's RedJubjub (RedDSA instantiated with the Jubjub curve).

@@ -156,7 +166,7 @@ Discussions-To: <https://g field, combined with the consensus checks that each pool's balance cannot be negative, together enforce that any potential counterfeiting bugs in the Orchard protocol or implementation are contained within the Orchard pool, and similarly any potential counterfeiting bugs in existing shielded pools cannot cause inflation of the Orchard pool.
  • Spending funds residing in the Orchard pool to a non-Orchard address will reveal the value of the transaction. This is a necessary side-effect of the transparent turnstile, but can be mitigated by migrating the majority of shielded activity to the Orchard pool and making these transactions a minority. Wallets should convey within their transaction creation UX that amounts are revealed in these situations.
  • @@ -184,10 +194,34 @@ Discussions-To: <https://g - +
    + + + +
    2Zcash Protocol Specification, Version 2021.1.16. Section 8: Differences from the Zerocash paper
    + + + + + + + +
    3Parameter Generation
    + + + + + + + +
    4Zcash Counterfeiting Vulnerability Successfully Remediated
    + + + + @@ -195,7 +229,7 @@ Discussions-To: <https://g
    5 Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]
    - + @@ -203,7 +237,7 @@ Discussions-To: <https://g
    36 Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. Section 3.1: Payment Addresses and Keys
    - + @@ -211,7 +245,7 @@ Discussions-To: <https://g
    47 Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. Section 3.2: Notes
    - + @@ -219,7 +253,7 @@ Discussions-To: <https://g
    58 Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. Section 3.7: Action Transfers and their Descriptions
    - + @@ -227,7 +261,7 @@ Discussions-To: <https://g
    69 Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. 4.17.4: Action Statement (Orchard)
    - + @@ -235,7 +269,7 @@ Discussions-To: <https://g
    710 Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. Section 4.2.3: Orchard Key Components
    - + @@ -243,7 +277,7 @@ Discussions-To: <https://g
    811 Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. Section 5.4.1.9: Sinsemilla Hash Function
    - + @@ -251,7 +285,7 @@ Discussions-To: <https://g
    912 Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. Section 5.4.6: RedDSA, RedJubjub, and RedPallas
    - + @@ -259,7 +293,7 @@ Discussions-To: <https://g
    1013 Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. Section 5.4.7.4: Sinsemilla commitments
    - + @@ -267,7 +301,7 @@ Discussions-To: <https://g
    1114 Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. Section 5.4.8.6: Pallas and Vesta
    - + @@ -275,7 +309,7 @@ Discussions-To: <https://g
    1215 Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. Section 5.4.8.8: Group Hash into Pallas and Vesta
    - + @@ -283,7 +317,7 @@ Discussions-To: <https://g
    1316 Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. Section 5.6.5: Orchard Payment Address
    - + @@ -291,7 +325,7 @@ Discussions-To: <https://g
    1417 Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. Section 5.6.8: Orchard Incoming Viewing Keys
    - + @@ -299,7 +333,7 @@ Discussions-To: <https://g
    1518 TODO
    - + @@ -307,7 +341,7 @@ Discussions-To: <https://g
    1619 TODO
    - + @@ -315,7 +349,7 @@ Discussions-To: <https://g
    1720 The halo2 Book: 1.2 UltraPLONK Arithmetization
    - + @@ -323,7 +357,7 @@ Discussions-To: <https://g
    1821 The halo2 Book: 3.1. Proving system
    - + @@ -331,7 +365,7 @@ Discussions-To: <https://g
    1922 The Orchard Book: 3.1. Keys and addresses
    - + @@ -339,7 +373,7 @@ Discussions-To: <https://g
    2023 The Orchard Book: 3.2. Actions
    - + @@ -347,7 +381,7 @@ Discussions-To: <https://g
    2124 The Orchard Book: 3.3. Commitments
    - + @@ -355,7 +389,7 @@ Discussions-To: <https://g
    2225 The Orchard Book: 3.4. Commitment tree
    - + @@ -363,7 +397,7 @@ Discussions-To: <https://g
    2326 The Orchard Book: 3.5. Nullifiers
    - + @@ -371,7 +405,7 @@ Discussions-To: <https://g
    2427 ZIP 32: Shielded Hierarchical Deterministic Wallets
    - + @@ -379,7 +413,7 @@ Discussions-To: <https://g
    2528 ZIP 212: Allow Recipient to Derive Sapling Ephemeral Secret from Note Plaintext
    - + @@ -387,7 +421,7 @@ Discussions-To: <https://g
    2629 ZIP 315: Best Practices for Wallet Handling of Multiple Pools
    - + @@ -395,7 +429,7 @@ Discussions-To: <https://g
    2730 draft-irtf-cfrg-hash-to-curve-10: Hashing to Elliptic Curves
    - + diff --git a/zip-0224.rst b/zip-0224.rst index d3cde133..abe3f686 100644 --- a/zip-0224.rst +++ b/zip-0224.rst @@ -29,7 +29,40 @@ improvements. Motivation ========== -TBD +Zcash currently has two active shielded protocols and associated shielded pools: + +- The Sprout shielded protocol (based on the Zerocash paper with improvements and security + fixes [#zerocash-differences]_), which as of February 2021 is a "closing" shielded pool + into which no new ZEC can be sent. +- The Sapling shielded protocol, which consisted of numerous improvements to functionality + and improved performance by orders of magnitude, and as of Feburary 2021 is the "active" + shielded pool. + +Both of these shielded protocols suffer from two issues: + +- Neither Sprout nor Sapling are compatible with known efficient scalability techniques. + Recursive zero-knowledge proofs (where a proof verifies an earlier instance of itself + along with new state) that are suitable for deployment in a block chain like Zcash + require a cycle of elliptic curves. The Sprout protocol does not use elliptic curves + and thus is an inherently inefficient protocol to implement inside a circuit, while the + Sapling protocol uses curves for which there is no known way to construct an efficient + curve cycle (or path to one). + +- The Sprout and Sapling circuits are implemented using a proving system (Groth16) that + requires a "trusted setup": the circuit parameters are a Structured Reference String + (SRS) with hidden structure, that if known could be used to create fake proofs and + thus counterfeit funds. The parameters are in practice generated using a multiparty + computation (MPC), where as long as at least one participant was honest and not + compromised, the hidden structure is unrecoverable. The MPCs themselves have improved + over the years (Zcash had 6 participants in the Sprout MPC, and around 90 per round in + the Sapling MPC two years later [#zcash-paramgen]_), but it remains the case that + generating these parameters is a point of risk within the protocol. For example, the + original proving system used for the Sprout circuit (BCTV14) had a bug that made the + Sprout shielded protocol vulnerable to counterfeiting, [#bctv14-vuln]_ which needed to + be resolved by changing the proving system and running a new MPC. + +We are thus motivated to deploy a new shielded protocol designed around a curve cycle, +using a proving system that is both amenable to recursion and does not require an SRS. Specification @@ -241,6 +274,9 @@ References ========== .. [#RFC2119] `RFC 2119: Key words for use in RFCs to Indicate Requirement Levels `_ +.. [#zerocash-differences] `Zcash Protocol Specification, Version 2021.1.16. Section 8: Differences from the Zerocash paper `_ +.. [#zcash-paramgen] `Parameter Generation `_ +.. [#bctv14-vuln] `Zcash Counterfeiting Vulnerability Successfully Remediated `_ .. [#orchard-spec] `Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal] `_ .. [#spec-addrs-keys] `Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. Section 3.1: Payment Addresses and Keys `_ .. [#spec-notes] `Zcash Protocol Specification, Version 2021.1.16-gc8c7dd [Orchard proposal]. Section 3.2: Notes `_
    2831 Pallas/Vesta supporting evidence