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 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 . 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 of its created note, a note ciphertext . The component encrypts the plaintext of the created note so that the holder of the recipient’s incoming viewing key recovers the note and its memo from the chain alone (protocol specification, §“In-band secret distribution (Sapling and Orchard)” and §“Action Descriptions”). The component lets the sender, or any party that holds the outgoing viewing key under which it was formed, recover the same plaintext (§10.3). The fields , and 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 are made by the recipient (§10.4).
Let a created note have recipient address and value
where is one byte, the format version of “The note
seed” (§4.3), equal to for an
Ironwood-pool output; is the -bit diversifier of the address
( bytes); occupies bytes; is the -byte note
seed; and is a -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 , , and . The recipient
computes
For each output the sender draws uniformly from the -byte strings, independently of every other output. The ephemeral secret key of this section is
derived in “The note seed” (§4.3) together with
and . The sender redraws when
Let be the recipient’s address,
with unkeyed BLAKE2b with a -byte
output and the -byte personalisation , and the ciphertext
The key agreement is Diffie–Hellman on Pallas: public keys are non-identity points, private keys lie in , 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 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: depends on the fresh of its output, and the key of 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 in place of a fixed generator, as the same volume records for deployed note delivery (§“Shielded-note delivery as deployed hybrid encryption”).
Let be an address of the incoming viewing key , so
Hence the holder of computes
In the cyclic Pallas group
In security arguments the key-derivation function (BLAKE2b-256 personalised Zcash_OrchardKDF), the function (BLAKE2b-256 personalised Zcash_Orchardock, constructed in §10.3), and on inputs with leading byte , the derivation of from , 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 encrypts contains , the key from which , and hence , is derived. On its other inputs is used only under Assumption 2.12. The assumption is a heuristic about BLAKE2b, not a theorem; every result that uses , or the derivation of names it.
For a uniform -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 and are computed from neither the plaintext nor the address, the pair reveals neither the plaintext, included, nor the recipient’s address: given two addresses of independent keys, the data may contain the second, and the ciphertext is indistinguishable from one independent of both. The value 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 and ; 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 be the event that the adversary queries the oracle of Assumption 10.4 for at an input keyed by .
Preliminary step. As in the proof of
Proposition 3.18, the key is replaced by a single draw
without rejection and its triple by independent
uniform elements (Lemma 2.15,
Assumption 2.12; Lemma “Rejection in key generation”,
§3.2, Assumptions 2.22
and 2.8). Then is replaced by
(Assumption 3.13; the reduction draws and
itself). Now
(1) By Assumption 10.4, is of a random-oracle output at an input keyed by . It is replaced by an independent uniform element of . The oracle’s value at that input is used nowhere else, so the games are identical until occurs; they differ by at most in the new game plus the reduction distance of , below , and for the value (Crypto Guide, §“Security as a game”, Remark “Game-hopping”; §2.3).
(2) The key is replaced by an independent uniform key.
The games differ only on the event that the adversary queries the
oracle at , and
(3) Now
(4) In the last game enters the view only through ,
that is through under the leading bytes
and . A distinguisher with oracle access to
or to a random function computes
from its oracle, runs the adversary, and outputs when some key of a
query at a leading byte satisfies
equal to its oracle’s answer at that input. It outputs with probability
at least in the first case. In the second the view depends on that
answer only through , and the trapdoor , of
the independent answer at the input, is within of
uniform; by Proposition 4.5(a), 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 as the recipient’s key, whereas is not uniform on ; and the factor- argument above transfers a search problem such as computational Diffie–Hellman, not a decision problem, since on instances outside a distinguisher’s output is unconstrained. □
The sender chooses an outgoing viewing key of its own, such as that of
the address whose note the Action consumes (“Viewing keys”,
§3.2), or
where is the Action’s net value commitment
(Definition 8.2) and its extracted note commitment
(Definition 4.4), and the outgoing plaintext is the
For an Ironwood-pool output, the holder of
computes from and the Action’s public , and , and decrypts under to the outgoing plaintext , rejecting ;
parses as a -byte string followed by a
-byte string , and reads as the integer
, rejecting
computes
rejects unless
with
computes
rejects if the note commitment of
(Definition 4.4) is or its -coordinate differs
from , or if
otherwise returns the note and .
The order and , then , then is forced because depends on all three. The specification’s decryption sections still use the legacy derivation of ; 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 re-encodes holds for every string that decodes, the star encoding being canonical (§2.1). For the specification’s procedure rejects only ; the rejection of in step (ii) makes the returned a transmission key of Definition “Note” (§4.1).
The key is a function of the Action’s own , and . A ciphertext that a party without copies into an Action whose differ is decrypted by the holder of 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 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 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 indistinguishable from a
uniform -byte string independent of and ; the reduction
draws and itself, obtains from
its challenger, computes every other field, and simulates the Action proof,
whose witness contains , under Assumption 9.15. Then
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 differing except
with negligible probability, so each encrypts once;
Assumption 10.5(a) then applies. With
A holder of recovers, for every output sent under that , the
pair , hence the shared secret
(Proposition 10.3), , the note plaintext
and the recipient’s address ; in this way the sender, or a party
to whom the sender discloses , reads outgoing notes (protocol
specification, §“Decryption using an Outgoing Viewing Key (Sapling and
Orchard)”). By this route it reads only outputs sent under that .
Detecting the notes sent to the key’s own addresses by trial decryption
requires (§10.4), and yields no
(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 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
with the -byte string of §4.3 formed from , , , and ;
the note commitment of the re-derived note
(Definition 4.4) is not and
The accepted note is
The order in (ii) is forced because depends on , and
; the recovery with of §10.3 follows the same
order. The specification’s decryption sections still use the legacy
derivation of ; ZIP 2005 specifies both reordered procedures. The
specification’s check
The Action statement (Definition 9.2) does not constrain . Check (iii) makes the recipient accept only an formed on the base 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 as witnesses and does not check their derivation from (Definition 9.2). An accepted Ironwood-pool note has, by checks (i), (ii) and (iv), and derived under and the commitment . For a coinbase output, consensus runs the recovery with of §10.3 under the all-zero (“Chain state and pool rules”, §11.4), which checks the lead byte and the whole derivation. For every other output, these recipient checks are the only check of the note format.
Orchard-pool outputs carry lead byte and use the legacy trapdoor derivation of the protocol specification, §“Sending Notes (Orchard)”; the recipient decrypts them with the same 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 is addressed to , an address of the
recipient’s key; it has
The extracted commitment of satisfies
For every efficient sender, which may choose
, , and the
keys under which they are formed, the probability that the recipient
accepts 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 deterministically and compares its -coordinate with , whatever the ciphertext and whichever key decrypted it. The address is an address of the key because is a permutation of the -bit strings, so every 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 and the
sender’s . When the recipient accepts, opens
On acceptance the recipient records with its note position, the index of 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 of the leaf (Proposition 10.15), a later Action consuming 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 , of which trial decryption and acceptance use only , detects and reads every note sent to any address of the key, value and memo included. The key yields neither nor (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 is derived.
Full-viewing tier. A holder of the full viewing key
derives and (“Viewing keys”,
§3.2). It detects and reads incoming notes as above, and
reads the outputs sent under its (§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 , or with the full viewing key | everything below, and authorise the consumption of a note of the key, signing under (§7.2) | — |
| full viewing key | derive and (§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 (Proposition 3.18(a)) |
| incoming viewing key | derive the addresses of the key (§3.3); detect and read every note sent to them, value and memo included (§10.4) | compute or (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 | read every output sent under this : the recipient’s address, the value and the memo (§10.3) | learn anything from the outgoing ciphertext of an output sent under or under another key’s (Proposition “Confidentiality of the outgoing ciphertext”, §10.3); detect, by trial decryption, the notes sent to the key’s addresses, which needs (Proposition 3.18(c)) |
| address , public | receive notes: any party creates a note to it (§10.2) | compute (Proposition 3.18(d)) |
A party that holds alone computes, for a note whose , and commitment it is given, the nullifier (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 enters neither trial decryption, whose key is , nor acceptance. Within the full viewing key, is thus the component that tells which notes are consumed: the incoming tier finds notes without it and yields no (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 to tell exactly that.