Zcash in Simplified Technical English

This page is the Simplified Technical English version of ZIP 224. The source ZIP is the normative text. Read the writing rules to understand the marked words.

ZIP 224: Orchard Shielded Protocol

ZIP: 224
Title: Orchard Shielded Protocol
Owners: Daira-Emma Hopwood <daira@jacaranda.org>
        Jack Grigg <thestr4d@gmail.com>
        Sean Bowe <ewillbefull@gmail.com>
        Kris Nuttycombe <kris@nutty.land>
Original-Authors: Ying Tong Lai
Status: Final
Category: Consensus
Created: 2021-02-27
License: MIT
Discussions-To: <https://github.com/zcash/zips/issues/435>

Terminology

On this page, STE words are in the place of the BCP 14 key words of the source. Refer to the key word table.

The terms "Testnet" and "Mainnet" have the meaning in Section 3.12 of the Zcash Protocol Specification [protocol-networks].

Abstract

In this document, we propose the Orchard shielded protocol. The definition of a new shielded pool is in this protocol. The pool has spending keys and payment addresses that are suitable for future scalability improvements.

Motivation

At this time, Zcash has two active shielded protocols and associated shielded pools:

Both of these shielded protocols have two issues:

Thus we want to deploy a new shielded protocol. The protocol has a design around a curve cycle. Its proving system is suitable for recursion, and an SRS is not necessary.

Specification

The Orchard protocol must be implemented as specified in the Zcash Protocol Specification [protocol-orchard].

The design of the Orchard protocol is largely the same as the design of the Sapling protocol. Thus we give here a list of differences. The list has references to their normative specifications and to the associated design rationale.

Curves

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

  • Pallas is the "application curve". The Orchard protocol itself is implemented on this curve (compare Jubjub).
  • Vesta is the "circuit curve". Its scalar field is the base field of Pallas. This field is the "word" type. The circuit is implemented over this type (compare BLS12-381).

We use the "simplified SWU" algorithm to define an infallible \(\mathsf{GroupHash}\). This is in the place of the fallible BLAKE2s-based mechanism of Sapling. The intention is to follow (version 10 of) the IETF hash-to-curve Internet Draft [ietf-hash-to-curve]. But the protocol specification has precedence if a discrepancy exists.

The curve cycle is an explicit design choice. In this ZIP, only half of the cycle is in use (Pallas is an embedded curve of Vesta). Future protocol updates are expected to use the full cycle.

Proving system

The proving system of Orchard is Halo 2 [halo2-proving-system], with the PLONKish arithmetization [halo2-arithmetization]. These are in the place of Groth16 and R1CS.

The support of Halo 2 for recursive proofs is not used in this ZIP. Future protocol updates are expected to use this support.

Circuit

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

An Orchard transaction contains a "bundle" of actions, and a single Halo 2 proof. This proof applies to all of the actions in the bundle.

Commitments

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

Commitment tree

Orchard has a commitment tree structure that is identical to Sapling, except that we instantiate it with Sinsemilla instead of a Bowe–Hopwood Pedersen hash.

Keys and addresses

Orchard keys and payment addresses are structurally similar to Sapling, with these changes:

  • The proof authorizing key is removed, and \(\mathsf{nk}\) is now a field element.
  • \(\mathsf{ivk}\) is calculated as a Sinsemilla commitment instead of a BLAKE2s output. The full viewing key has an additional component, \(\mathsf{rivk}\). This component is the randomizer for this commitment.
  • \(\mathsf{ovk}\) is derived from \(\mathsf{fvk}\), instead of being a component of the spending key.
  • Now, the result of each diversifier is a valid payment address.

No Bech32 encoding is defined for an individual Orchard item of these types:

  • A shielded payment address.
  • An incoming viewing key.
  • A full viewing key.

Instead we define unified payment addresses and viewing keys in [zip-0316]. Orchard spending keys are encoded with Bech32m as specified in [protocol-orchardspendingkeyencoding].

Orchard keys can 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

Orchard notes have the structure \((addr, v, \text{ρ}, \text{φ}, \mathsf{rcm})\). \(\text{ρ}\) is set to the nullifier of the spent note in the same action. Thus \(\text{ρ}\) is unique. \(\text{φ}\) and \(\mathsf{rcm}\) are derived from a random seed (as with Sapling after ZIP 212 [zip-0212]).

Nullifiers

Nullifiers for Orchard notes are calculated as:

\(\mathsf{nf} = [F_{\mathsf{nk}}(\text{ρ}) + \text{φ} \pmod{p}] \,\mathcal{G} + \mathsf{cm}\)

In this expression, \(F\) is instantiated with Poseidon, and \(\mathcal{G}\) is a fixed independent base.

Signatures

The signature scheme of Orchard is RedPallas (RedDSA instantiated with the Pallas curve). It is in the place of RedJubjub of Sapling (RedDSA instantiated with the Jubjub curve).

Additional Rationale

The primary motivator for the proposal of a new shielded protocol and pool is the necessity to migrate spend authority to a recursion-friendly curve. Spend authority in the Sapling shielded pool is rooted in the Jubjub curve. But no known way exists to construct an efficient curve cycle (or a path to one) from either Jubjub or BLS12-381.

Recursion-friendliness is a design goal, but we do not propose a recursive protocol in this ZIP. To deploy an entire scaling solution in a single network upgrade is a risky endeavour with a lot of moving parts. We focus only on the components that make a recursive protocol possible (namely the curve cycle and the proving system). Thus we can start the migration of value to a scalable protocol before we deploy the scalable protocol itself.

The remainder of the changes that we make relative to Sapling have two motivations. The first is to simplify the Sapling protocol (and fix deficiencies). The second is to use protocol primitives that are more efficient in the UltraPLONK arithmetization.

Security and Privacy Considerations

In this ZIP, we define a new shielded pool. As with Sapling, in the Orchard protocol only Orchard notes can be spent. The movement of ZEC into or out of the Orchard pool occurs through the \(\mathsf{valueBalanceOrchard}\) transaction field. This has the following considerations:

Test Vectors

Reference Implementation

Deployment

This ZIP is proposed to activate with Network Upgrade 5.

References

[BCP14]
Information on BCP 14 — "RFC 2119: Key words for use in RFCs to Indicate Requirement Levels" and "RFC 8174: Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"
[zcash-paramgen]
Parameter Generation
[bctv14-vuln]
Zcash Counterfeiting Vulnerability Successfully Remediated
[protocol-orchard]
Zcash Protocol Specification, Version 2021.2.16 or later [NU5 proposal]
[protocol-networks]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 3.12: Mainnet and Testnet
[protocol-addressesandkeys]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 3.1: Payment Addresses and Keys
[protocol-notes]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 3.2: Notes
[protocol-actions]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 3.7: Action Transfers and their Descriptions
[protocol-actionstatement]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 4.17.4: Action Statement (Orchard)
[protocol-orchardkeycomponents]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 4.2.3: Orchard Key Components
[protocol-concretesinsemillahash]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 5.4.1.9: Sinsemilla Hash Function
[protocol-poseidonhash]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 5.4.1.10: PoseidonHash Function
[protocol-concretereddsa]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 5.4.7: RedDSA, RedJubjub, and RedPallas
[protocol-concretesinsemillacommit]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 5.4.8.4: Sinsemilla commitments
[protocol-pallasandvesta]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 5.4.9.6: Pallas and Vesta
[protocol-concretegrouphashpallasandvesta]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 5.4.9.8: Group Hash into Pallas and Vesta
[protocol-orchardpaymentaddrencoding]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 5.6.4.2: Orchard Raw Payment Addresses
[protocol-orchardinviewingkeyencoding]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 5.6.4.3: Orchard Raw Incoming Viewing Keys
[protocol-orchardfullviewingkeyencoding]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 5.6.4.4: Orchard Raw Full Viewing Keys
[protocol-orchardspendingkeyencoding]
Zcash Protocol Specification, Version 2021.2.16 [NU5 proposal]. Section 5.6.4.5: Orchard Spending Keys
[protocol-differences]
Zcash Protocol Specification, Version 2021.2.16. Section 8: Differences from the Zerocash paper
[halo2-arithmetization]
The halo2 Book: 1.2 PLONKish Arithmetization
[halo2-proving-system]
The halo2 Book: 3.1. Proving system
[orchard-keys]
The Orchard Book: 3.1. Keys and addresses
[orchard-actions]
The Orchard Book: 3.2. Actions
[orchard-commitments]
The Orchard Book: 3.3. Commitments
[orchard-tree]
The Orchard Book: 3.4. Commitment tree
[orchard-nullifiers]
The Orchard Book: 3.5. Nullifiers
[zip-0032]
ZIP 32: Shielded Hierarchical Deterministic Wallets
[zip-0212]
ZIP 212: Allow Recipient to Derive Sapling Ephemeral Secret from Note Plaintext
[zip-0315]
ZIP 315: Best Practices for Wallet Handling of Multiple Pools
[zip-0316]
ZIP 316: Unified Addresses and Unified Viewing Keys
[ietf-hash-to-curve]
draft-irtf-cfrg-hash-to-curve-10: Hashing to Elliptic Curves
[pasta-evidence]
Pallas/Vesta supporting evidence