This section constructs the in-band delivery of a created note: its plaintext, its encryption to the recipient by one-shot Diffie–Hellman on the diversified base, the outgoing ciphertext keyed from ovk and the Action’s own public fields, and the trial decryption and acceptance checks by which a recipient obtains a note consistent with the published cmx . It states the two assumptions that note encryption adds, proves decryption correctness, confidentiality and key privacy of the encryption to the recipient, confidentiality of the outgoing ciphertext, and the consistency of accepted notes, and states what each key tier can decrypt.
Every Action carries, beside the extracted commitment cmx of its created note, a note ciphertext (epk ⋆, C enc, C out) . The component C enc encrypts the plaintext of the created note so that the holder of the recipient’s incoming viewing key ivk recovers the note and its memo from the chain alone (protocol specification, §“In-band secret distribution (Sapling and Orchard)” and §“Action Descriptions”). The component C out lets the sender, or any party that holds the outgoing viewing key ovk under which it was formed, recover the same plaintext (§10.3). The fields epk ⋆ , C enc and C out are not inputs of the Action statement (Definition 9.2), which therefore does not constrain them; the checks that make a decrypted note consistent with cmx are made by the recipient (§10.4).
Let a created note have recipient address (d, pk d) and value
| leadByte ‖ LEBS2OSP 88 (d) ‖ I2LEOSP 64 (v) ‖ rseed ‖ memo, |
where leadByte is one byte, the format version of “The note
seed” (§4.3), equal to 0x03 for an
Ironwood-pool output; d is the 88 -bit diversifier of the address
( 11 bytes); v occupies 8 bytes; rseed is the 32 -byte note
seed; and memo is a 512 -byte string chosen by the sender, whose
use is by agreement between sender and recipient (protocol specification,
§“Note Plaintexts and Memo Fields” and §“Encodings of Note Plaintexts
and Memo Fields”). The encoding has the fixed length
The plaintext omits pk d , ρ , ψ and rcm . The recipient
computes
For each output the sender draws rseed uniformly from the 32 -byte strings, independently of every other output. The ephemeral secret key of this section is
| esk = ToScalar (PRFexpand rseed ([0x04] ∥ I2LEOSP 256 (nf old))), |
derived in “The note seed” (§4.3) together with ψ
and rcm . The sender redraws rseed when
Let (d, pk d) be the recipient’s address,
| epk | := [esk] g d, s := [esk] pk d, | ||
| K enc | := KDF (s, epk) := BLAKE2b - 256 (Zcash_OrchardKDF, s ⋆ ∥ epk ⋆), |
with BLAKE2b - 256 (P, x) unkeyed BLAKE2b with a 32 -byte
output and the 16 -byte personalisation P , and the ciphertext
The key agreement is Diffie–Hellman on Pallas: public keys are non-identity points, private keys lie in F p Vesta ∗ , and both the derivation of a public key from a base and the agreement are scalar multiplication (protocol specification, §“Orchard Key Agreement”). A consensus rule requires epk ⋆ to be the canonical encoding of a non-identity Pallas point (protocol specification, §“Action Descriptions”). The fixed nonce is safe because every key encrypts once: K enc depends on the fresh esk of its output, and the key of C out is derived separately (§10.3). The scheme is the Crypto Guide’s Construction “DH-based hybrid public-key encryption” (§“Hybrid public-key encryption”) over the per-address base g d in place of a fixed generator, as the same volume records for deployed note delivery (§“Shielded-note delivery as deployed hybrid encryption”).
Let (d, pk d) be an address of the incoming viewing key ivk , so
| [ivk] epk = [esk] pk d = s . |
Hence the holder of ivk computes
In the cyclic Pallas group
In security arguments the key-derivation function KDF (BLAKE2b-256 personalised Zcash_OrchardKDF), the function PRF ock (BLAKE2b-256 personalised Zcash_Orchardock, constructed in §10.3), and PRFexpand on inputs with leading byte 0x04 , the derivation of esk from rseed , are modelled as independent random oracles (Crypto Guide, §“The random oracle model”, Definition “Random oracle”). The PRF assumption (Assumption 2.12) does not suffice for the last: it requires a key unknown to the adversary, whereas the plaintext that K enc encrypts contains rseed , the key from which esk , and hence K enc , is derived. On its other inputs PRFexpand is used only under Assumption 2.12. The assumption is a heuristic about BLAKE2b, not a theorem; every result that uses KDF , PRF ock or the derivation of esk names it.
For a uniform 256 -bit key that encrypts a single plaintext, ChaCha20-Poly1305 with the all-zero nonce and empty associated data is
confidential: the encryptions of any two plaintexts of equal length are computationally indistinguishable; and
integral: no efficient adversary without the key outputs a ciphertext, other than one it was given, that decrypts to a value other than ⊥ .
The Crypto Guide’s Theorem “Security of ChaCha20-Poly1305” (§“The ChaCha20-Poly1305 AEAD”) derives both, with explicit bounds, from the pseudorandomness of ChaCha20. The protocol specification requires one-time INT-CTXT and IND-CPA security of the scheme, properties (b) and (a) above (Crypto Guide, Definitions “Ciphertext integrity, INT-CTXT” and “CPA security”, §“Authenticated encryption with associated data” and §“Chosen-plaintext security”; protocol specification, §“Symmetric Encryption”). The scheme is not key-committing: a party that chooses two keys can construct one ciphertext that decrypts validly under both (Crypto Guide, §“The ChaCha20-Poly1305 AEAD”, Remark “Wrong-key rejection and key commitment”). No result of this volume relies on the tag against a sender who chooses the key.
Let a key be generated honestly with
Since E and C ′ are computed from neither the plaintext nor the address, the pair (epk ⋆, C enc) reveals neither the plaintext, rseed included, nor the recipient’s address: given two addresses of independent keys, the data z may contain the second, and the ciphertext is indistinguishable from one independent of both. The value cmx is included so that the result applies within an Action. Of the hypotheses only Assumption 3.16, used through the computational Diffie–Hellman problem that it implies, concerns the one-shot key agreement between esk and pk d ; Assumptions 10.4 and 10.5 concern the hash functions and the cipher. The adversary is passive: the volume does not claim indistinguishability of encryptions against an adversary that may also obtain decryptions of ciphertexts of its choice other than the challenge, before and after receiving it (IND-CCA2), which the protocol specification, §“Key Derivation”, requires of the scheme.
The proof is a sequence of games (Crypto Guide, §“Security as a game”, Remark “Game-hopping”); each reduction below runs the adversary and the rest of the game. Let Q be the event that the adversary queries the oracle of Assumption 10.4 for PRFexpand at an input keyed by rseed .
Preliminary step. As in the proof of
Proposition 3.18, the key is replaced by a single draw
without rejection and its triple (ask, nk, r ivk) by independent
uniform elements (Lemma 2.15,
Assumption 2.12; Lemma “Rejection in key generation”,
§3.2, Assumptions 2.22
and 2.8). Then (ivk, dk) is replaced by
(Commit r ivk ′ ivk (ak, nk), u 1)
(Assumption 3.13; the reduction draws ask and nk
itself). Now
(1) By Assumption 10.4, esk is ToScalar of a random-oracle output at an input keyed by rseed . It is replaced by an independent uniform element of F p Vesta ∗ . The oracle’s value at that input is used nowhere else, so the games are identical until Q occurs; they differ by at most Pr [Q] in the new game plus the reduction distance of ToScalar , below 2 − 257 , and 1 / p Vesta for the value 0 (Crypto Guide, §“Security as a game”, Remark “Game-hopping”; §2.3).
(2) The key K enc is replaced by an independent uniform key.
The games differ only on the event C that the adversary queries the
KDF oracle at s ⋆ ∥ epk ⋆ , and
(3) Now
(4) In the last game rseed enters the view only through cmx ,
that is through PRFexpand rseed under the leading bytes
0x09 and 0x0B . A distinguisher with oracle access to
PRFexpand rseed or to a random function computes cmx
from its oracle, runs the adversary, and outputs 1 when some key k of a
query at a leading byte 0x04 satisfies
PRFexpand k ([0x09] ∥ I2LEOSP 256 (ρ))
equal to its oracle’s answer at that input. It outputs 1 with probability
at least Pr [Q] in the first case. In the second the view depends on that
answer only through cmx , and the trapdoor rcm , ToScalar of
the independent answer at the 0x0B input, is within 2 − 257 of
uniform; by Proposition 4.5(a), cmx is therefore independent of
that answer up to
The DDH hybrid of the Crypto Guide’s Theorem “ElGamal is key-private under DDH” (§“Key privacy”) is not used: as stated it embeds a uniform exponent of F p Vesta as the recipient’s key, whereas ivk is not uniform on F p Vesta ; and the factor- 2 argument above transfers a search problem such as computational Diffie–Hellman, not a decision problem, since on instances outside X Pallas a distinguisher’s output is unconstrained. □
The sender chooses an outgoing viewing key ovk of its own, such as that of
the address whose note the Action consumes (“Viewing keys”,
§3.2), or
| ock | := PRF ovk ock (cv net, cmx, epk) | ||
| := BLAKE2b - 256 (Zcash_Orchardock, ovk ‖ (cv net) ⋆ ‖ I2LEOSP 256 (cmx) ∥ epk ⋆), |
where cv net is the Action’s net value commitment
(Definition 8.2) and cmx its extracted note commitment
(Definition 4.4), and the outgoing plaintext is the
For an Ironwood-pool output, the holder of ovk
computes ock from ovk and the Action’s public cv net , cmx and epk ⋆ , and decrypts C out under ock to the outgoing plaintext op , rejecting ⊥ ;
parses op as a 32 -byte string b 1 followed by a
32 -byte string b 2 , and reads esk as the integer
LEOS2IP 256 (b 2) , rejecting
computes
rejects unless
with
| esk = ToScalar (PRFexpand rseed ([0x04] ∥ I2LEOSP 256 (ρ))) ; |
computes
rejects if the note commitment of ((d, pk d), v, ρ, ψ, rcm)
(Definition 4.4) is ⊥ or its x -coordinate differs
from cmx , or if
otherwise returns the note ((d, pk d), v, ρ, ψ, rcm) and memo .
The order g d and pk d , then ψ , then rcm is forced because rcm depends on all three. The specification’s decryption sections still use the legacy derivation of rcm ; ZIP 2005 specifies the reordered procedure (protocol specification, §“Decryption using an Outgoing Viewing Key (Sapling and Orchard)”; ZIP 2005, “Changes to the Protocol Specification”, §4.20.2 and §4.20.3). The specification’s further check that b 1 re-encodes pk d holds for every string that abst P decodes, the star encoding being canonical (§2.1). For pk d the specification’s procedure rejects only ⊥ ; the rejection of O in step (ii) makes the returned pk d a transmission key of Definition “Note” (§4.1).
The key ock is a function of the Action’s own cv net , cmx and epk . A ciphertext C out that a party without ovk copies into an Action whose (cv net, cmx, epk) differ is decrypted by the holder of ovk under a key that, by Assumption 10.4, is uniform and independent of the copied ciphertext; by Assumption 10.5(b) that decryption returns ⊥ except with negligible probability. A copied C out is therefore rejected, not attributed to the other Action.
Let the sending key be generated honestly with
As in the preliminary step of the proof of
Proposition 10.6, the key is replaced by a single draw
without rejection and its triple (ask, nk, r ivk) by independent
uniform elements (Lemma 2.15,
Assumption 2.12; Lemma “Rejection in key generation”,
§3.2, Assumptions 2.22
and 2.8). After this step, Assumption 3.13
makes ovk indistinguishable from a
uniform 32 -byte string independent of ivk and dk ; the reduction
draws ask and nk itself, obtains (ivk, dk, ovk) from
its challenger, computes every other field, and simulates the Action proof,
whose witness contains r ivk , under Assumption 9.15. Then
ock is a random-oracle output (Assumption 10.4) at an
input that the party queries with negligible probability, hence uniform, and
distinct Actions give distinct inputs, their epk differing except
with negligible probability, so each ock encrypts once;
Assumption 10.5(a) then applies. With
A holder of ovk recovers, for every output sent under that ovk , the
pair (pk d, esk) , hence the shared secret [esk] pk d
(Proposition 10.3), K enc , the note plaintext
and the recipient’s address (d, pk d) ; in this way the sender, or a party
to whom the sender discloses ovk , reads outgoing notes (protocol
specification, §“Decryption using an Outgoing Viewing Key (Sapling and
Orchard)”). By this route it reads only outputs sent under that ovk .
Detecting the notes sent to the key’s own addresses by trial decryption
requires ivk (§10.4), and ovk yields no ivk
(Proposition 3.18, “Capability separation”, part (c),
for keys generated with
No public field of an Action names its recipient, so the holder of an
incoming viewing key attempts every output: it computes
The same ivk serves the outputs of both pools, since keys and addresses are defined for the Orchard protocol, not for a pool (§3.4), and an address does not name a pool (ZIP 326, “Scanning for Ironwood-pool and Orchard-pool notes”); the pool of an output is that of the bundle that carries it. For an honestly produced ciphertext under a key independent of the trial key, decryption returns ⊥ except with negligible probability (Assumption 10.5(b); Crypto Guide, §“The ChaCha20-Poly1305 AEAD”, Remark “Wrong-key rejection and key commitment”); against a sender who chooses the keys the tag gives no such guarantee.
Given a candidate
with
| g d | := DiversifyHash (d), pk d := [ivk] g d, | ||
| ψ | := ToBase (PRFexpand rseed ([0x09] ∥ ρ ̄)), | ||
| rcm | := ToScalar (PRFexpand rseed (pre _ rcm)), |
with the 137 -byte string pre _ rcm of §4.3 formed from g d , pk d , v , ρ and ψ ;
| esk := ToScalar (PRFexpand rseed ([0x04] ∥ ρ ̄)), |
a check that ZIP 2005 places directly after the computation of g d ;
the note commitment cm ′ of the re-derived note
(Definition 4.4) is not ⊥ and
The accepted note is
The order in (ii) is forced because rcm depends on g d , pk d and
ψ ; the recovery with ovk of §10.3 follows the same
order. The specification’s decryption sections still use the legacy
derivation of rcm ; ZIP 2005 specifies both reordered procedures. The
specification’s check
The Action statement (Definition 9.2) does not constrain epk . Check (iii) makes the recipient accept only an epk formed on the base g d of the diversifier in the plaintext. Without it a sender could agree the key with one address of a recipient while naming the diversifier of another, and link the two addresses by observing whether the recipient accepts (ZIP 212, “Motivation”).
The Action statement takes ψ and rcm as witnesses and does not check their derivation from rseed (Definition 9.2). An accepted Ironwood-pool note has, by checks (i), (ii) and (iv), ψ and rcm derived under 0x03 and the commitment cmx . For a coinbase output, consensus runs the recovery with ovk of §10.3 under the all-zero ovk (“Chain state and pool rules”, §11.4), which checks the lead byte and the whole 0x03 derivation. For every other output, these recipient checks are the only check of the 0x03 note format.
Orchard-pool outputs carry lead byte 0x02 and use the legacy trapdoor derivation of the protocol specification, §“Sending Notes (Orchard)”; the recipient decrypts them with the same ivk under that byte and derivation (§“Note Plaintexts and Memo Fields”), on which this volume does not rely.
Let the acceptance procedure accept an Ironwood-pool output with note
The note n is addressed to (d, [ivk] g d) , an address of the
recipient’s key; it has
The extracted commitment of n satisfies
| Extract P (NoteCommit rcm (M (n))) = cmx . |
For every efficient sender, which may choose
epk ⋆ , C enc , C out and the
keys under which they are formed, the probability that the recipient
accepts n while the sender outputs a note
Parts (a) and (b) hold by construction: acceptance requires checks (i), (ii) and (iv), and check (iv) recomputes the commitment of n deterministically and compares its x -coordinate with cmx , whatever the ciphertext and whichever key decrypted it. The address (d, [ivk] g d) is an address of the key because FF1 - AES256 dk is a permutation of the 88 -bit strings, so every d is the diversifier of one index (§3.3).
(c) Consider the algorithm that generates the recipient’s key, runs the
sender, runs the acceptance procedure on its output, and outputs n and the
sender’s n ′ . When the recipient accepts, n opens
On acceptance the recipient records n with its note position, the index of cmx among the leaves of the note commitment tree of the output’s pool, fixed by the order in which the chain appends extracted commitments (“The Merkle hash and the tree”, §5.1; protocol specification, §“Note Commitment Trees”). The position determines the authentication path, which the recipient computes from public data (Lemma 5.16) and which, with the opening n of the leaf cmx (Proposition 10.15), a later Action consuming n requires (conditions A1 and A3 of Definition 9.2).
The key tiers of Proposition 3.18 (“Capability
separation”) have the following powers over note ciphertexts, for keys
generated with
Incoming tier. A holder of the incoming viewing key (dk, ivk) , of which trial decryption and acceptance use only ivk , detects and reads every note sent to any address of the key, value and memo included. The key (dk, ivk) yields neither nk nor ask (Proposition 3.18(b)). For notes with pairwise distinct ρ , its holder can neither compute the nullifier of one of the key’s notes nor link a published nullifier to one of them (Proposition 6.10), so the nullifier sets alone do not show it which are consumed. It cannot authorise the consumption of a note of the key: Theorem 12.10, in “Authorisation of spends”, excludes this even for a holder of the full viewing key, from which (dk, ivk) is derived.
Full-viewing tier. A holder of the full viewing key
(ak, nk, r ivk) derives (dk, ivk) and ovk (“Viewing keys”,
§3.2). It detects and reads incoming notes as above, and
reads the outputs sent under its ovk (§10.3), not those sent
under
Table 7 collects these powers with those of the other tiers, from the most to the least key material.
| Key material | Its holder can | Its holder cannot |
|---|---|---|
| spending key sk , or ask with the full viewing key | everything below, and authorise the consumption of a note of the key, signing under rsk = ask + α (§7.2) | — |
| full viewing key (ak, nk, r ivk) | derive (dk, ivk) and ovk (§3.2), with the powers of the rows below; compute the nullifier of each accepted note and detect its consumption (§6.2) | authorise a consumption (Theorem 12.10); it yields no ask (Proposition 3.18(a)) |
| incoming viewing key (dk, ivk) | derive the 2 88 addresses of the key (§3.3); detect and read every note sent to them, value and memo included (§10.4) | compute nk or ask (Proposition 3.18(b)); compute the nullifier of one of its notes, or link a published nullifier to one of them, for notes with pairwise distinct ρ (Proposition 6.10) |
| outgoing viewing key ovk | read every output sent under this ovk : the recipient’s address, the value and the memo (§10.3) | learn anything from the outgoing ciphertext of an output sent under ovk = ⊥ or under another key’s ovk (Proposition “Confidentiality of the outgoing ciphertext”, §10.3); detect, by trial decryption, the notes sent to the key’s addresses, which needs ivk (Proposition 3.18(c)) |
| address (d, pk d) , public | receive notes: any party creates a note to it (§10.2) | compute ivk (Proposition 3.18(d)) |
A party that holds nk alone computes, for a note whose ρ , ψ and commitment cm it is given, the nullifier DeriveNullifier nk (ρ, ψ, cm) (Definition 6.3), and so tests whether that note has been consumed, by the membership of the nullifier in its pool’s nullifier set. It finds no note by this means: the key nk enters neither trial decryption, whose key is ivk , nor acceptance. Within the full viewing key, nk is thus the component that tells which notes are consumed: the incoming tier finds notes without it and yields no nk (Proposition 3.18(b)), the nullifier sets alone do not show it which of its notes are consumed (Proposition 6.10), and the full-viewing tier adds nk to tell exactly that.