The Zcash ArboretumIronwood Guide PDF

3 Keys and addresses

This section constructs the key components of the protocol specification, §“Orchard Key Components”, from the instances of §2: the spending key and the spend-side secrets, the viewing keys, and the diversified addresses. It states each assumption that their security needs at its first use and proves, in Proposition 3.18, four one-way separations between key tiers.

3.1 The spending key and the spend-side secrets

Remark 3.1 (Scope of the key derivations).

Every derivation of this section is that of a key generated with 𝗎𝗌𝖾⁢_⁢𝗊𝗌𝗄=𝖿𝖺𝗅𝗌𝖾, where 𝗎𝗌𝖾⁢_⁢𝗊𝗌𝗄 is the Boolean key-generation flag of ZIP 2005. ZIP 2005, §“Changes to the Protocol Specification”, item §4.2.3, specifies, as a change to the specification’s §“Orchard Key Components” and not in that section itself, an alternative source of 𝖺𝗄ℙ and 𝗋𝗂𝗏𝗄, with 𝗇𝗄 derived as here; it yields components (𝖺𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄) of the same types, and 𝖺𝗄ℙ again of even y-coordinate. The volume does not construct the alternative and names none of its intermediate keys. Assumption 3.13, Propositions 3.18, 3.17, 6.10 and 10.6, Proposition “Confidentiality of the outgoing ciphertext” (§10.3), and the hypotheses on honest key generation of Theorems 12.9 and 12.12 are stated for 𝗎𝗌𝖾⁢_⁢𝗊𝗌𝗄=𝖿𝖺𝗅𝗌𝖾 only. For such keys every key component is a deterministic function of the spending key 𝗌𝗄.

Definition 3.2 (Spending key and key generation).

The spending key 𝗌𝗄 is a uniformly random 256-bit string, identified with a 32-byte string (protocol specification, §“Constants”). Key generation draws 𝗌𝗄, derives from it the components of this section, and discards 𝗌𝗄 and draws a new one when 𝖺𝗌𝗄=0 (below), when 𝗂𝗏𝗄∈{0,⊥} (§3.2), or on the one further condition of the protocol specification, §“Orchard Key Components”, which concerns the internal key of ZIP 32, a key this volume does not construct, and is stated in §3.2. A spending key that key generation does not discard is accepted; it determines every other component of a key generated with 𝗎𝗌𝖾⁢_⁢𝗊𝗌𝗄=𝖿𝖺𝗅𝗌𝖾.

Construction 3.3 (Spend-side secrets).

For a spending key 𝗌𝗄, the spend authorising key 𝖺𝗌𝗄, the nullifier deriving key 𝗇𝗄 and the trapdoor 𝗋𝗂𝗏𝗄 of 𝖢𝗈𝗆𝗆𝗂𝗍𝗂𝗏𝗄 are

𝖺𝗌𝗄 :=ToScalar⁢(𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽𝗌𝗄⁢([𝟶⁢𝚡⁢𝟶𝟼]))∈𝔽p𝖵𝖾𝗌𝗍𝖺,
𝗇𝗄 :=ToBase⁢(𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽𝗌𝗄⁢([𝟶⁢𝚡⁢𝟶𝟽]))∈𝔽p𝖯𝖺𝗅𝗅𝖺𝗌,
𝗋𝗂𝗏𝗄 :=ToScalar⁢(𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽𝗌𝗄⁢([𝟶⁢𝚡⁢𝟶𝟾]))∈𝔽p𝖵𝖾𝗌𝗍𝖺

(protocol specification, §“Orchard Key Components”). The three lead bytes are rows of Table 3. Key generation discards 𝗌𝗄 if 𝖺𝗌𝗄=0.

The scalars 𝖺𝗌𝗄 and 𝗋𝗂𝗏𝗄 lie in 𝔽p𝖵𝖾𝗌𝗍𝖺, the scalar field of the Pallas group, because each multiplies a Pallas point: 𝖺𝗌𝗄 the generator G𝖲𝗉𝖾𝗇𝖽𝖠𝗎𝗍𝗁 below, 𝗋𝗂𝗏𝗄 the blinding base of 𝖢𝗈𝗆𝗆𝗂𝗍𝗂𝗏𝗄 (§3.2). The key 𝗇𝗄 is an element of the base field 𝔽p𝖯𝖺𝗅𝗅𝖺𝗌.

The three inputs of 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽𝗌𝗄 have distinct lead bytes. By Lemma 2.15, under Assumption 2.12, the triple (𝖺𝗌𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄) computed from a uniform 𝗌𝗄, before rejection and before the normalisation below, is therefore computationally indistinguishable from independent uniform elements of 𝔽p𝖵𝖾𝗌𝗍𝖺, 𝔽p𝖯𝖺𝗅𝗅𝖺𝗌 and 𝔽p𝖵𝖾𝗌𝗍𝖺, up to an additional statistical distance of three reduction distances, each below 2−257 (§2.3).

Construction 3.4 (Spend validating key and sign normalisation).

Let G𝖲𝗉𝖾𝗇𝖽𝖠𝗎𝗍𝗁:=𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁⁢(z.cash:Orchard,G) (Table 2), the generator of the spend-authorisation signature scheme (protocol specification, §“Spend Authorization Signature (Sapling and Orchard)”). For 𝖺𝗌𝗄≠0:

  1. 1.

    compute the point P:=[𝖺𝗌𝗄]⁢G𝖲𝗉𝖾𝗇𝖽𝖠𝗎𝗍𝗁;

  2. 2.

    if its y-coordinate is odd, that is, if bit 255 of the star encoding P⋆ is 1, replace 𝖺𝗌𝗄 by −𝖺𝗌𝗄;

  3. 3.

    let 𝖺𝗄ℙ:=[𝖺𝗌𝗄]⁢G𝖲𝗉𝖾𝗇𝖽𝖠𝗎𝗍𝗁 for the updated 𝖺𝗌𝗄, and 𝖺𝗄:=𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(𝖺𝗄ℙ)∈𝔽p𝖯𝖺𝗅𝗅𝖺𝗌.

The spend validating key is the point 𝖺𝗄ℙ together with its x-coordinate 𝖺𝗄, a field element (protocol specification, §“Orchard Key Components”).

After step 2 the point 𝖺𝗄ℙ has even y-coordinate. The point P is not 𝒪, since 𝖺𝗌𝗄≠0 and G𝖲𝗉𝖾𝗇𝖽𝖠𝗎𝗍𝗁 generates a group of prime order, so P=(x,y) with y≠0 (§2.1, on the star encoding). Replacing 𝖺𝗌𝗄 by −𝖺𝗌𝗄 replaces P by −P=(x,−y), and the representatives y and p𝖯𝖺𝗅𝗅𝖺𝗌−y have opposite parities because p𝖯𝖺𝗅𝗅𝖺𝗌 is odd.

For an accepted key, 𝖺𝗄∈{1,…,p𝖯𝖺𝗅𝗅𝖺𝗌−1}, and 𝖺𝗄 determines 𝖺𝗄ℙ. Indeed 𝖺𝗄ℙ≠𝒪, so 𝖺𝗄≠0 by Lemma 2.3. By Lemma 2.4 the points with x-coordinate 𝖺𝗄 are 𝖺𝗄ℙ and −𝖺𝗄ℙ, whose y-coordinates have opposite parities; the point 𝖺𝗄ℙ is the one with even y-coordinate, that is, 𝖺𝗄ℙ=𝖺𝖻𝗌𝗍ℙ⁢(LE256⁢(𝖺𝗄)), the even-y lift of 𝖺𝗄. Theorem 12.9 cites this normalisation.

3.2 Viewing keys

Definition 3.5 (Full viewing key).

The full viewing key of an accepted key is the triple

𝖿𝗏𝗄:=(𝖺𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄)∈{1,…,p𝖯𝖺𝗅𝗅𝖺𝗌−1}×𝔽p𝖯𝖺𝗅𝗅𝖺𝗌×𝔽p𝖵𝖾𝗌𝗍𝖺,

with 𝖺𝗄 the field element of §3.1; the point 𝖺𝗄ℙ is recomputed from 𝖺𝗄 by the even-y lift.

Construction 3.6 (Incoming viewing key scalar).

With the key commitment of §2.4 and D:=z.cash:Orchard-CommitIvk,

𝗂𝗏𝗄:=𝖢𝗈𝗆𝗆𝗂𝗍𝗋𝗂𝗏𝗄𝗂𝗏𝗄⁢(𝖺𝗄,𝗇𝗄)=𝖲𝗁𝗈𝗋𝗍𝖢𝗈𝗆𝗆𝗂𝗍𝗋𝗂𝗏𝗄⁢(D,LE255⁢(𝖺𝗄)∥LE255⁢(𝗇𝗄))∈𝔽p𝖯𝖺𝗅𝗅𝖺𝗌∪{⊥}.

Explicitly, let M^ be the Sinsemilla hash point of the 510-bit message LE255⁢(𝖺𝗄)∥LE255⁢(𝗇𝗄) under the domain z.cash:Orchard-CommitIvk-M, and let

HD:=𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁⁢(z.cash:Orchard-CommitIvk-r,ε)

be the blinding base; then 𝗂𝗏𝗄=𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(M^+[𝗋𝗂𝗏𝗄]⁢HD) if M^≠⊥, and 𝗂𝗏𝗄=⊥ otherwise. Key generation discards 𝗌𝗄 when 𝗂𝗏𝗄∈{0,⊥}, so an accepted key has 𝗂𝗏𝗄∈{1,…,p𝖯𝖺𝗅𝗅𝖺𝗌−1}. Because p𝖯𝖺𝗅𝗅𝖺𝗌<p𝖵𝖾𝗌𝗍𝖺, this integer is a non-zero element of 𝔽p𝖵𝖾𝗌𝗍𝖺, the scalar that multiplies the diversified base in §3.3.

Let X𝖯𝖺𝗅𝗅𝖺𝗌:={𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(P):P∈ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌)∖{𝒪}}⊂{1,…,p𝖯𝖺𝗅𝗅𝖺𝗌−1}. The set X𝖯𝖺𝗅𝗅𝖺𝗌 has (p𝖵𝖾𝗌𝗍𝖺−1)/2 elements (§2.4, Definition “The key commitment”), and an accepted 𝗂𝗏𝗄 lies in it. The blinding base HD is not 𝒪: the protocol specification, §“Sinsemilla commitments”, states that the commitment is distributed as a uniform point for a uniform trapdoor, which holds only for a blinding base other than 𝒪.

Lemma 3.7 (Distribution of 𝗂𝗏𝗄).

Let 𝗋𝗂𝗏𝗄 be uniform on 𝔽p𝖵𝖾𝗌𝗍𝖺 and independent of (𝖺𝗄,𝗇𝗄), and let M^≠⊥. Then 𝖢𝗈𝗆𝗆𝗂𝗍𝗋𝗂𝗏𝗄𝗂𝗏𝗄⁢(𝖺𝗄,𝗇𝗄) is 0 with probability 1/p𝖵𝖾𝗌𝗍𝖺 and otherwise uniform on X𝖯𝖺𝗅𝗅𝖺𝗌, independently of (𝖺𝗄,𝗇𝗄).

Proof.

By Lemma 2.26(i) the point M^+[𝗋𝗂𝗏𝗄]⁢HD is uniform on ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌), whatever M^ is. It is 𝒪, of extracted coordinate 0, with probability 1/p𝖵𝖾𝗌𝗍𝖺; each x∈X𝖯𝖺𝗅𝗅𝖺𝗌 is the extracted coordinate of exactly the two points ±P with P≠−P (Lemma 2.4), and so has probability 2/p𝖵𝖾𝗌𝗍𝖺. □

In particular 𝗂𝗏𝗄 is not uniform on 𝔽p𝖵𝖾𝗌𝗍𝖺 (protocol specification, §“Orchard Key Components”, note).

The further rejection condition of key generation concerns the internal key of ZIP 32, §“Orchard internal key derivation”. That key has the same 𝖺𝗄 and 𝗇𝗄 and a trapdoor t∈𝔽p𝖵𝖾𝗌𝗍𝖺 that is an efficiently computable function of (𝖺𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄), and key generation discards 𝗌𝗄 when its incoming viewing key 𝖢𝗈𝗆𝗆𝗂𝗍t𝗂𝗏𝗄⁢(𝖺𝗄,𝗇𝗄) is 0 or ⊥ (protocol specification, §“Orchard Key Components”).

Lemma 3.8 (Rejection in key generation).

Under Assumptions 2.22 and 2.8, a single draw of key generation from independent uniform (𝖺𝗌𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄) is rejected with negligible probability. Under Assumptions 2.12, 2.22 and 2.8, the output of key generation is within negligible statistical distance of a single draw from a uniform 𝗌𝗄 without rejection.

Proof.

A single draw is rejected only if 𝖺𝗌𝗄=0, of probability 1/p𝖵𝖾𝗌𝗍𝖺; or M^=⊥; or 𝗂𝗏𝗄=0, of probability 1/p𝖵𝖾𝗌𝗍𝖺 by Lemma “Distribution of 𝗂𝗏𝗄”; or 𝖢𝗈𝗆𝗆𝗂𝗍t𝗂𝗏𝗄⁢(𝖺𝗄,𝗇𝗄)=0. The value 𝖢𝗈𝗆𝗆𝗂𝗍t𝗂𝗏𝗄⁢(𝖺𝗄,𝗇𝗄) commits to the message of 𝗂𝗏𝗄, so it is ⊥ exactly when M^=⊥. The event M^=⊥ has negligible probability under Assumptions 2.22 and 2.8: an algorithm that samples (𝖺𝗌𝗄,𝗇𝗄) and outputs the message LE255⁢(𝖺𝗄)∥LE255⁢(𝗇𝗄) finds a ⊥ input with that probability, which Proposition 2.24(iii) bounds. For M^≠⊥, 𝖢𝗈𝗆𝗆𝗂𝗍t𝗂𝗏𝗄⁢(𝖺𝗄,𝗇𝗄)=0 exactly when M^+[t]⁢HD=𝒪 (Lemma 2.3). By (1), with n=51 (Table 4), this is a relation among Q⁢(z.cash:Orchard-CommitIvk-M), the S⁢(j) and HD whose coefficient on the first is 251, non-zero modulo p𝖵𝖾𝗌𝗍𝖺. An algorithm that samples (𝖺𝗌𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄), computes t and outputs this relation succeeds with the probability of the event, which the lemma on relations among fixed generators (§2.4) bounds under the same assumptions. The rejection event is efficiently decidable from the three outputs of 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽𝗌𝗄, so by Lemma 2.15 a first draw from a uniform 𝗌𝗄 is also rejected with negligible probability. Key generation outputs its first draw whenever that draw is accepted; its output is therefore within that negligible probability, in statistical distance, of a single draw without rejection. □

The proofs of this section analyse a single draw and add the statistical distance bounded by this lemma, under Assumptions 2.12, 2.22 and 2.8.

Construction 3.9 (Diversifier key and outgoing viewing key).

Let K:=LE256⁢(𝗋𝗂𝗏𝗄) and

R:=𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽K⁢([𝟶⁢𝚡⁢𝟾𝟸]⁢‖𝖨𝟤𝖫𝖤𝖮𝖲𝖯256⁢(𝖺𝗄)‖⁢𝖨𝟤𝖫𝖤𝖮𝖲𝖯256⁢(𝗇𝗄)),

a 64-byte string, where 𝖨𝟤𝖫𝖤𝖮𝖲𝖯256 encodes the field elements 𝖺𝗄 and 𝗇𝗄 as 32-byte little-endian integers. The diversifier key 𝖽𝗄 is the first 32 bytes of R and the outgoing viewing key 𝗈𝗏𝗄 the last 32 bytes (protocol specification, §“Orchard Key Components”; row 𝟶⁢𝚡⁢𝟾𝟸 of Table 3). One output of 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽, keyed by the encoding of 𝗋𝗂𝗏𝗄, yields both.

Definition 3.10 (Incoming and outgoing viewing keys).

The incoming viewing key is the pair (𝖽𝗄,𝗂𝗏𝗄); the outgoing viewing key is 𝗈𝗏𝗄. The diversifier key 𝖽𝗄 derives diversifiers (§3.3). What the holders of 𝗂𝗏𝗄 and of 𝗈𝗏𝗄 can compute from note ciphertexts is stated in “Trial decryption and note acceptance” (§10.4) and “The outgoing ciphertext” (§10.3).

Proposition 3.11 (Binding of 𝗂𝗏𝗄 to (𝖺𝗄,𝗇𝗄)).

Under Assumptions 2.22 and 2.8, no efficient algorithm outputs, except with negligible probability, triples (𝖺𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄)≠(𝖺𝗄′,𝗇𝗄′,𝗋𝗂𝗏𝗄′) with 𝖢𝗈𝗆𝗆𝗂𝗍𝗋𝗂𝗏𝗄𝗂𝗏𝗄⁢(𝖺𝗄,𝗇𝗄)=𝖢𝗈𝗆𝗆𝗂𝗍𝗋𝗂𝗏𝗄′𝗂𝗏𝗄⁢(𝖺𝗄′,𝗇𝗄′)≠⊥.

Proof.

Equal extracted values come from commitment points C, C′ with C=±C′ (Lemma 2.4). If the messages differ, both cases are excluded by Proposition 2.24(ii), since LE255 is injective on integer representatives. If the messages agree, then 𝗋𝗂𝗏𝗄≠𝗋𝗂𝗏𝗄′, the case C=C′ gives [𝗋𝗂𝗏𝗄−𝗋𝗂𝗏𝗄′]⁢HD=𝒪, impossible for HD≠𝒪 in a group of prime order, and the case C=−C′ is excluded by the same proposition. □

Hence 𝗂𝗏𝗄 is bound to the pair (𝖺𝗄,𝗇𝗄), and so is every address of the key (§3.3): its transmission key 𝗉𝗄𝖽=[𝗂𝗏𝗄]⁢𝗀𝖽 with 𝗀𝖽≠𝒪 determines 𝗂𝗏𝗄, an integer below p𝖵𝖾𝗌𝗍𝖺. The binding is used in Lemma 12.5 (“Double-spend resistance”, §12.2) and Theorem 12.9 (“Authorisation of spends”, §12.3). Binding alone would follow from any collision-resistant hash of (𝖺𝗄,𝗇𝗄); the trapdoor 𝗋𝗂𝗏𝗄 adds hiding.

Remark 3.12 (Hiding of 𝗂𝗏𝗄 and the double use of 𝗋𝗂𝗏𝗄).

For 𝗋𝗂𝗏𝗄 uniform and independent of every other quantity, 𝗂𝗏𝗄 is independent of (𝖺𝗄,𝗇𝗄) by Lemma “Distribution of 𝗂𝗏𝗄”. The derivation of (𝖽𝗄,𝗈𝗏𝗄) is keyed by the same 𝗋𝗂𝗏𝗄, so once 𝖽𝗄 or 𝗈𝗏𝗄 is known that argument no longer applies, and modelling 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽 only as a PRF does not restore it: the key of row 𝟶⁢𝚡⁢𝟾𝟸 is also the trapdoor of 𝖢𝗈𝗆𝗆𝗂𝗍𝗂𝗏𝗄, outside the hypothesis of Lemma 2.15 (§2.3; protocol specification, §“Orchard Key Components”, note on the use of 𝗋𝗂𝗏𝗄 as both trapdoor and key). The volume states the joint assumption on Pallas scalar multiplication and 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽 that the specification proposes as Assumption 3.13.

Assumption 3.13 (Joint hiding of the viewing keys).

For keys with 𝗎𝗌𝖾⁢_⁢𝗊𝗌𝗄=𝖿𝖺𝗅𝗌𝖾: for every (𝖺𝗄,𝗇𝗄)∈{1,…,p𝖯𝖺𝗅𝗅𝖺𝗌−1}×𝔽p𝖯𝖺𝗅𝗅𝖺𝗌, given to the distinguisher, and 𝗋𝗂𝗏𝗄 uniform on 𝔽p𝖵𝖾𝗌𝗍𝖺, the triple (𝗂𝗏𝗄,𝖽𝗄,𝗈𝗏𝗄) computed from (𝖺𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄) by the constructions of this subsection is computationally indistinguishable from

(𝖢𝗈𝗆𝗆𝗂𝗍𝗋𝗂𝗏𝗄′𝗂𝗏𝗄⁢(𝖺𝗄,𝗇𝗄),u1,u2),

where 𝗋𝗂𝗏𝗄′ is uniform on 𝔽p𝖵𝖾𝗌𝗍𝖺 and u1, u2 are uniform 32-byte strings, all independent. It is a precise form of the joint assumption that the protocol specification proposes (§“Orchard Key Components”, note); it is not perfect hiding. Results apply it after Lemma 2.15 (Assumption 2.12) has made 𝗋𝗂𝗏𝗄 uniform and independent of (𝖺𝗌𝗄,𝗇𝗄), averaging over the key-generation distribution of (𝖺𝗄,𝗇𝗄). It is used by Propositions 3.18, 3.17, 6.10 and 10.6, by Proposition “Confidentiality of the outgoing ciphertext” (§10.3) and by Theorem 12.12.

3.3 Diversified addresses

Construction 3.14 (Diversified address).

For an index j∈{0,…,288−1} chosen by the key holder:

  1. 1.

    the diversifier is d:=𝖥𝖥𝟣⁢-⁢𝖠𝖤𝖲𝟤𝟧𝟨𝖽𝗄⁢(LE88⁢(j))∈{0,1}88, the FF1 mode of NIST SP 800-38G over AES-256 with key 𝖽𝗄, radix 2, length 88 and the empty tweak (Crypto Guide, §“Format-preserving encryption and FF1”, Construction “The FF1 mode of NIST SP 800-38G”; protocol specification, §“Pseudo Random Permutations”);

  2. 2.

    the diversified base is 𝗀𝖽:=𝖣𝗂𝗏𝖾𝗋𝗌𝗂𝖿𝗒𝖧𝖺𝗌𝗁⁢(d), where

    T:=𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁⁢(z.cash:Orchard-gd,𝖫𝖤𝖡𝖲𝟤𝖮𝖲𝖯88⁢(d))

    and

    𝖣𝗂𝗏𝖾𝗋𝗌𝗂𝖿𝗒𝖧𝖺𝗌𝗁⁢(d):={Tif ⁢T≠𝒪,𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁⁢(z.cash:Orchard-gd,ε)otherwise

    (protocol specification, §“𝖣𝗂𝗏𝖾𝗋𝗌𝗂𝖿𝗒𝖧𝖺𝗌𝗁𝖲𝖺𝗉𝗅𝗂𝗇𝗀 and 𝖣𝗂𝗏𝖾𝗋𝗌𝗂𝖿𝗒𝖧𝖺𝗌𝗁𝖮𝗋𝖼𝗁𝖺𝗋𝖽 Hash Functions”);

  3. 3.

    the diversified transmission key is 𝗉𝗄𝖽:=[𝗂𝗏𝗄]⁢𝗀𝖽, with 𝗂𝗏𝗄 read as a scalar (§2.1).

The address is (d,𝗉𝗄𝖽)∈{0,1}88×(ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌)∖{𝒪}) (protocol specification, §“Orchard Key Components”).

The map 𝖫𝖤𝖡𝖲𝟤𝖮𝖲𝖯88 packs d into 11 bytes, eight bits at a time, least significant bit first (§2.1). Every index yields an address. The map 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 returns a point for every input, and 𝖣𝗂𝗏𝖾𝗋𝗌𝗂𝖿𝗒𝖧𝖺𝗌𝗁 replaces the identity by the fixed fallback point, which is not the identity: the protocol specification types 𝖣𝗂𝗏𝖾𝗋𝗌𝗂𝖿𝗒𝖧𝖺𝗌𝗁𝖮𝗋𝖼𝗁𝖺𝗋𝖽 into the non-identity points. The fallback case has negligible probability under Assumption 2.8. Hence 𝗀𝖽≠𝒪 for every d, and 𝗉𝗄𝖽≠𝒪 because 𝗂𝗏𝗄 is a non-zero scalar and the group has prime order. For each key 𝖽𝗄 the map j↦d is a permutation of the 88-bit strings (Crypto Guide, §“Format-preserving encryption and FF1”, Proposition “FF1 is a keyed bijection on 𝒳”), so distinct indices give distinct diversifiers: one incoming viewing key (𝖽𝗄,𝗂𝗏𝗄) yields 288 distinct addresses, all with transmission keys under the same 𝗂𝗏𝗄. No index is excluded.

Assumption 3.15 (FF1-AES256 as a pseudorandom permutation).

For a uniform 256-bit key, 𝖥𝖥𝟣⁢-⁢𝖠𝖤𝖲𝟤𝟧𝟨 with the empty tweak on {0,1}88 is a pseudorandom permutation: no efficient adversary with oracle access distinguishes it from a uniformly random permutation of {0,1}88 (Crypto Guide, §“Pseudorandom functions and permutations”, Definition “Pseudorandom permutation”, and §“Format-preserving encryption and FF1”, Definition “Format-preserving encryption”). It is the security requirement of the protocol specification, §“Pseudo Random Permutations”, whose note records that the distinguishing attack of Dunkelman, Kumar, Lambooij and Sanadhya at this domain size and round count is no better than exhaustive search for the 256-bit key. It is used so that a diversifier reveals neither its index nor the key that produced it, in Proposition 3.17 (“Unlinkability of diversified addresses”).

Assumption 3.16 (DDH on Pallas).

Let P be a generator of ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌), let b and c be uniform on 𝔽p𝖵𝖾𝗌𝗍𝖺 and a uniform on X𝖯𝖺𝗅𝗅𝖺𝗌 (§3.2), all independent. The triples ([a]⁢P,[b]⁢P,[a⁢b]⁢P) and ([a]⁢P,[b]⁢P,[c]⁢P) are computationally indistinguishable. With a uniform on 𝔽p𝖵𝖾𝗌𝗍𝖺 instead, this is the DDH assumption of the Crypto Guide (§“Diffie–Hellman: computational and decisional”, Definition “Decisional Diffie–Hellman, DDH”). The volume assumes the form with a uniform on X𝖯𝖺𝗅𝗅𝖺𝗌 because 𝗂𝗏𝗄 is so distributed, and claims no reduction between the two forms; the protocol specification expects the non-uniformity of 𝗂𝗏𝗄 to cause no security issue (§“Orchard Key Components”, note). It is used by Propositions 3.17 and 10.6 (“Confidentiality and key privacy of note encryption”).

Proposition 3.17 (Unlinkability of diversified addresses).

Let two keys be generated independently with 𝗎𝗌𝖾⁢_⁢𝗊𝗌𝗄=𝖿𝖺𝗅𝗌𝖾. An adversary holds 𝖺𝗄, 𝗇𝗄 and 𝗈𝗏𝗄 of both keys, and none of 𝗋𝗂𝗏𝗄, 𝖽𝗄 and 𝗂𝗏𝗄 of either. It chooses indices j0, j1 and j′ with j′∉{j0,j1}, and receives the address of key 0 at index j0, the address of key 1 at index j1, and the address of key β at index j′, for a uniform hidden bit β; it outputs a bit β′. Conditioned on the event E that the three diversifiers are pairwise distinct, its advantage |Pr⁢[β′=1∣β=0]−Pr⁢[β′=1∣β=1]| is negligible under Assumptions 2.12 (through Lemma 2.15), 3.13, 3.15, 2.8 and 3.16, together with Assumption 2.22 for Lemma “Rejection in key generation”. This is the unlinkability requirement of the protocol specification, §“𝖣𝗂𝗏𝖾𝗋𝗌𝗂𝖿𝗒𝖧𝖺𝗌𝗁𝖲𝖺𝗉𝗅𝗂𝗇𝗀 and 𝖣𝗂𝗏𝖾𝗋𝗌𝗂𝖿𝗒𝖧𝖺𝗌𝗁𝖮𝗋𝖼𝗁𝖺𝗋𝖽 Hash Functions”, which stipulates distinct diversifiers.

Proof.

For each β the game is modified by a sequence of hops, each changing the adversary’s output distribution by a negligible amount (Crypto Guide, §“The hybrid argument”, Lemma “Hybrid lemma”). Each hop is justified by a reduction that runs the game; the event E is efficiently decidable from the diversifiers and has probability at least 1/2 in every game below, so conditioning on E at most doubles each cost.

  1. 1.

    Each key is replaced by a single draw without rejection (Lemma “Rejection in key generation”, §3.2).

  2. 2.

    For each key in turn, (𝖺𝗌𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄) is replaced by independent uniform elements of the three fields (Lemma 2.15); the reduction derives the remaining components and the addresses.

  3. 3.

    For each key in turn, (𝗂𝗏𝗄,𝖽𝗄,𝗈𝗏𝗄) is replaced by (𝖢𝗈𝗆𝗆𝗂𝗍𝗋𝗂𝗏𝗄′𝗂𝗏𝗄⁢(𝖺𝗄,𝗇𝗄),u1,u2) (Assumption 3.13); the reduction is given (𝖺𝗄,𝗇𝗄), generates the other key itself, and computes the game from the triple. Now 𝖽𝗄 and 𝗈𝗏𝗄 are uniform and independent of all else, and, except on the negligible events 𝗂𝗏𝗄∈{0,⊥}, the scalar 𝗂𝗏𝗄 is uniform on X𝖯𝖺𝗅𝗅𝖺𝗌 and independent of (𝖺𝗄,𝗇𝗄) (Lemmas “Distribution of 𝗂𝗏𝗄” and “Rejection in key generation”, §3.2).

  4. 4.

    For b∈{0,1} in turn, 𝖥𝖥𝟣⁢-⁢𝖠𝖤𝖲𝟤𝟧𝟨𝖽𝗄b is replaced by a uniformly random permutation πb of {0,1}88 (Assumption 3.15); the reduction queries its oracle at the indices it needs. Then d′=πβ⁢(LE88⁢(j′))≠dβ because j′≠jβ, and on E the triple (d0,d1,d′) is uniform on pairwise distinct triples, for either value of β. The event E fails only if d1−β equals dβ or d′, of probability 2/288.

  5. 5.

    On E the inputs 𝖫𝖤𝖡𝖲𝟤𝖮𝖲𝖯88⁢(d) of 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 are distinct, since 𝖫𝖤𝖡𝖲𝟤𝖮𝖲𝖯88 is injective, so under Assumption 2.8 the bases g0, g1, g′ are independent uniform points, each 𝒪, which invokes the fallback, with probability 1/p𝖵𝖾𝗌𝗍𝖺 only.

In the last game the adversary’s view consists of 𝖺𝗄, 𝗇𝗄, 𝗈𝗏𝗄 of both keys and (d0,d1,d′), independent of the rest and identically distributed for β=0,1, together with

(g0,[𝗂𝗏𝗄0]⁢g0),(g1,[𝗂𝗏𝗄1]⁢g1),(g′,[𝗂𝗏𝗄β]⁢g′),

where 𝗂𝗏𝗄0, 𝗂𝗏𝗄1 are independent and uniform on X𝖯𝖺𝗅𝗅𝖺𝗌. The first two pairs are public keys of the per-key-base ElGamal scheme with private keys 𝗂𝗏𝗄0 and 𝗂𝗏𝗄1. For gβ≠𝒪 the uniform point g′ equals [r]⁢gβ for a uniform scalar r, so the third pair is ([r]⁢gβ,[r]⁢([𝗂𝗏𝗄β]⁢gβ)), an encryption of 𝒪 under key β (Crypto Guide, §“Key privacy”, Construction “ElGamal encryption”). Distinguishing β is therefore the game of Definition “Key privacy under chosen-plaintext attack, IK-CPA” of the same subsection, for the message 𝒪. The proof of its Theorem “ElGamal is key-private under DDH” bounds the advantage by two DDH advantages. That proof plants the first exponent of the DDH triple as a private key; with private keys uniform on X𝖯𝖺𝗅𝗅𝖺𝗌, the same proof, with the other key’s private key drawn uniformly from X𝖯𝖺𝗅𝗅𝖺𝗌 (the x-coordinate of a uniform non-identity point), reduces to Assumption 3.16. Its reduction samples (d0,d1,d′) itself and programs 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 at their three inputs with the planted bases before running the adversary. The Crypto Guide’s Remark “What key privacy buys upstairs” records this correspondence for diversified addresses. Summing the costs of the hops, the advantage is negligible. □

3.4 Key capabilities and scope

Figure 1 gives the derivation graph, each edge labelled by its operation, and each one-way edge also by the assumption that makes it one-way. Proposition 3.18 proves four separations: the full viewing key yields no 𝖺𝗌𝗄, the incoming viewing key neither 𝗇𝗄 nor 𝖺𝗌𝗄, the outgoing viewing key no 𝗂𝗏𝗄, and an address no 𝗂𝗏𝗄.

Refer to caption
Figure 1: Derivation graph of a key generated with 𝗎𝗌𝖾⁢_⁢𝗊𝗌𝗄=𝖿𝖺𝗅𝗌𝖾, from the spending key 𝗌𝗄 to the address (d,𝗉𝗄𝖽). Each edge carries its operation, and each one-way edge also carries, in brackets, the assumption under which it is one-way: PRF, Assumption 2.12; DL, Assumption 2.22; JH, Assumption 3.13; RO, Assumption 2.8. Each one-way edge is a PRF call, a scalar multiplication, the joint hiding assumption or 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 as a random oracle; bundling edges invert by projection, 𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ by the even-y lift, and the FF1 edge is inverted by the holder of 𝖽𝗄. The edges out of 𝗌𝗄 are one-way under Assumption 2.12, since an algorithm recovering 𝗌𝗄 from (𝖺𝗌𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄) distinguishes 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽𝗌𝗄 from a random function. Colours give the lowest key tier that computes a node; the index j is uncoloured. The dashed edges into 𝖺𝗄ℙ and 𝗋𝗂𝗏𝗄 mark the alternative source of ZIP 2005, not constructed. Markers (a) to (d) are the four separations that Proposition 3.18 proves; no other separation is claimed.
Proposition 3.18 (Capability separation).

Let a key be generated honestly with 𝗎𝗌𝖾⁢_⁢𝗊𝗌𝗄=𝖿𝖺𝗅𝗌𝖾. No efficient algorithm, given the public parameters and only the listed key material of the key, outputs the listed secret, except with negligible probability:

  1. (a)

    given the full viewing key (𝖺𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄), the scalar 𝖺𝗌𝗄;

  2. (b)

    given the incoming viewing key (𝖽𝗄,𝗂𝗏𝗄), the key 𝗇𝗄 or the scalar 𝖺𝗌𝗄;

  3. (c)

    given 𝗈𝗏𝗄, the scalar 𝗂𝗏𝗄;

  4. (d)

    given an address (d,𝗉𝗄𝖽) of the key, the scalar 𝗂𝗏𝗄.

The hypotheses are: for (a), Assumptions 2.12 (through Lemma 2.15) and 2.22; for (b), those of (a) and, for 𝗇𝗄, Assumption 3.13; for (c), Assumptions 2.12 and 3.13; for (d), Assumptions 2.12, 3.13, 2.8 and 2.22 (“Discrete logarithms on Pallas”). Every part also uses Lemma “Rejection in key generation” (§3.2), under Assumptions 2.12, 2.22 and 2.8. These are the only separations claimed.

Proof.

By Lemma “Rejection in key generation” (§3.2), a single draw from a uniform 𝗌𝗄 replaces the key at a negligible cost. By Lemma 2.15, its triple (𝖺𝗌𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄) is then replaced by independent uniform elements of 𝔽p𝖵𝖾𝗌𝗍𝖺, 𝔽p𝖯𝖺𝗅𝗅𝖺𝗌 and 𝔽p𝖵𝖾𝗌𝗍𝖺, at a further negligible cost: in each part the success of an algorithm is efficiently decidable from the three values, by deriving the remaining components, running the algorithm and comparing its output with the secret. The result is called the idealised key.

(a) Let an algorithm 𝒜 output 𝖺𝗌𝗄 from (𝖺𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄) with probability ϵ for the idealised key. An algorithm ℬ receives Y=[s]⁢G𝖲𝗉𝖾𝗇𝖽𝖠𝗎𝗍𝗁 for s uniform on 𝔽p𝖵𝖾𝗌𝗍𝖺, draws 𝗇𝗄 and 𝗋𝗂𝗏𝗄 uniformly, and runs 𝒜 on (𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(Y),𝗇𝗄,𝗋𝗂𝗏𝗄). The input is distributed as for the idealised key, because the sign normalisation replaces 𝖺𝗌𝗄 by ±𝖺𝗌𝗄 and does not change 𝖺𝗄 (Lemma 2.4). A correct output a satisfies [a]⁢G𝖲𝗉𝖾𝗇𝖽𝖠𝗎𝗍𝗁=𝖺𝗄ℙ, the even-y lift of 𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(Y), which is Y or −Y; ℬ outputs whichever of a and −a maps to Y. Hence ℬ computes discrete logarithms to the generator G𝖲𝗉𝖾𝗇𝖽𝖠𝗎𝗍𝗁 with probability ϵ, and ϵ is negligible by Assumption 2.22.

(b) An algorithm that computes 𝖺𝗌𝗄 from (𝖽𝗄,𝗂𝗏𝗄) computes it from (𝖺𝗄,𝗇𝗄,𝗋𝗂𝗏𝗄) by first deriving (𝖽𝗄,𝗂𝗏𝗄), so (a) applies. Let 𝒜 output 𝗇𝗄 from (𝖽𝗄,𝗂𝗏𝗄) with probability ϵ. A distinguisher for Assumption 3.13, given (𝖺𝗄,𝗇𝗄) of the idealised key and a triple (x,y,z), runs 𝒜 on (y,x) and outputs 1 exactly when 𝒜 outputs 𝗇𝗄. On the real triple it outputs 1 with probability ϵ. On the ideal triple 𝒜 receives u1 and 𝖢𝗈𝗆𝗆𝗂𝗍𝗋𝗂𝗏𝗄′𝗂𝗏𝗄⁢(𝖺𝗄,𝗇𝗄), which is independent of 𝗇𝗄 unless M^=⊥, a negligible event (Lemma “Rejection in key generation”); since 𝗇𝗄 is uniform on 𝔽p𝖯𝖺𝗅𝗅𝖺𝗌, 𝒜 then succeeds with probability at most 1/p𝖯𝖺𝗅𝗅𝖺𝗌 plus a negligible term. So ϵ exceeds the distinguisher’s advantage by a negligible amount at most.

(c) Let 𝒜 output 𝗂𝗏𝗄 from 𝗈𝗏𝗄 with probability ϵ. The distinguisher given (𝖺𝗄,𝗇𝗄) and (x,y,z) runs 𝒜 on z and outputs 1 exactly when 𝒜 outputs x. On the ideal triple, z=u2 is independent of x=𝖢𝗈𝗆𝗆𝗂𝗍𝗋𝗂𝗏𝗄′𝗂𝗏𝗄⁢(𝖺𝗄,𝗇𝗄), which, for M^≠⊥, takes each value with probability at most 2/p𝖵𝖾𝗌𝗍𝖺 by Lemma “Distribution of 𝗂𝗏𝗄”. Hence ϵ is at most the advantage under Assumption 3.13 plus 2/p𝖵𝖾𝗌𝗍𝖺 and a negligible term.

(d) Let 𝒜 output 𝗂𝗏𝗄 from the address at an index j, possibly of its choice, with probability ϵ. The distinguisher given (𝖺𝗄,𝗇𝗄) and (x,y,z) computes d:=𝖥𝖥𝟣⁢-⁢𝖠𝖤𝖲𝟤𝟧𝟨y⁢(LE88⁢(j)), 𝗀𝖽:=𝖣𝗂𝗏𝖾𝗋𝗌𝗂𝖿𝗒𝖧𝖺𝗌𝗁⁢(d) and 𝗉𝗄𝖽:=[x]⁢𝗀𝖽, runs 𝒜 on (d,𝗉𝗄𝖽), and outputs 1 exactly when 𝒜 outputs x. On the ideal triple, 𝒜 succeeds with probability ϵ′≥ϵ−δ, for δ the advantage under Assumption 3.13; there, outside the negligible event M^=⊥, the value 𝗂𝗏𝗄:=x is 0 with probability 1/p𝖵𝖾𝗌𝗍𝖺 and otherwise uniform on X𝖯𝖺𝗅𝗅𝖺𝗌, independently of (𝖺𝗄,𝗇𝗄) and of u1, hence of d. An algorithm ℬ receives a generator G and Y=[s]⁢G for s uniform on 𝔽p𝖵𝖾𝗌𝗍𝖺. It draws t uniform on 𝔽p𝖵𝖾𝗌𝗍𝖺∖{0} and u1 uniform, computes d from u1 and j, programs 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 at (z.cash:Orchard-gd,𝖫𝖤𝖡𝖲𝟤𝖮𝖲𝖯88⁢(d)) with the uniform non-identity point [t]⁢G (Assumption 2.8), answers other queries with fresh uniform points, and runs 𝒜 on (d,[t]⁢Y)=(d,[s]⁢([t]⁢G)). With probability (p𝖵𝖾𝗌𝗍𝖺−1)/(2⁢p𝖵𝖾𝗌𝗍𝖺) the exponent s lies in X𝖯𝖺𝗅𝗅𝖺𝗌; it is then uniform on X𝖯𝖺𝗅𝗅𝖺𝗌, and the view of 𝒜 is that of the ideal triple conditioned on 𝗂𝗏𝗄≠0, up to statistical distance 1/p𝖵𝖾𝗌𝗍𝖺 for the programmed point. Algorithm ℬ outputs the output of 𝒜 and so computes s with probability at least

p𝖵𝖾𝗌𝗍𝖺−12⁢p𝖵𝖾𝗌𝗍𝖺⁢(ϵ′−2p𝖵𝖾𝗌𝗍𝖺),

a loss factor of 2⁢p𝖵𝖾𝗌𝗍𝖺/(p𝖵𝖾𝗌𝗍𝖺−1), about 2, against Assumption 2.22. Hence ϵ′, and with it ϵ, is negligible. □

Of the objects of this section only an address (d,𝗉𝗄𝖽), with the base 𝗀𝖽 computed from d, is public; 𝗌𝗄, 𝖺𝗌𝗄, 𝖺𝗄ℙ, 𝖺𝗄, 𝗇𝗄, 𝗋𝗂𝗏𝗄, the full viewing key, 𝖽𝗄, 𝗂𝗏𝗄, 𝗈𝗏𝗄 and the index j are secret key material. One incoming viewing key yields 288 addresses (§3.3), unlinkable in the sense of Proposition 3.17 (“Unlinkability of diversified addresses”).

What a holder of each key can compute from the objects of later sections is stated where those objects are constructed, each with a back-reference to Proposition 3.18: from nullifiers in “Nullifier uniqueness and unlinkability” (§6.4), and from note ciphertexts in “The outgoing ciphertext” (§10.3) and “Trial decryption and note acceptance” (§10.4). This section states no such power.

Keys and addresses are objects of the Orchard protocol, not of a pool: one key hierarchy and one address format serve both the Orchard pool and the Ironwood pool (ZIP 229, Abstract).