This section derives every key of a wallet from one seed. It fixes the seed and its fingerprint, the hardened-only derivation of Orchard spending keys and the standard account path, and the passage from an account spending key to the key components that the Ironwood Guide constructs from a spending key, including the alternative branch of ZIP 2005. It then constructs the internal keys of an account and proves the separations between the two scopes, bounds the probability that an account key is invalid, and closes with the domains of key derivation.
A wallet seed is a byte string S with
Every key of every account is a deterministic function of S , so a seed space of lower entropy is searched once for all accounts, and across many wallets as a multi-target search that matches the first derived addresses or viewing keys against a set of observed ones (ZIP 32, “Rationale for the 256-bit entropy requirement”).
For a wallet seed S , the seed fingerprint is
| SeedFP (S) := BLAKE2b - 256 (Zcash_HD_Seed_FP, [length (S)] ∥ S), |
unkeyed BLAKE2b with a 32 -byte output and the 16 -byte personalisation
shown, over the single length byte of S followed by S ; the length fits
one byte because
A partially created transaction relies on collision resistance of BLAKE2b-256 under this personalisation (Crypto Guide, §“Security notions: preimage, second-preimage, and collision resistance”, Definition “Collision resistance”); Lemma 2.5 additionally models it as a random oracle, so that the fingerprint reveals nothing of the keys. The fingerprint of a full viewing key is constructed with the key components, in §2.4.
ZIP 32 instantiates its hardened-only derivation for Orchard with the
master-key domain ZcashIP32Orchard, a 16 -byte BLAKE2b
personalisation that SHOULD be disjoint from every other BLAKE2b domain
separator of Zcash, and the child-key domain 0x81 , a lead byte
of PRFexpand (ZIP 32, “Specification: Hardened-only key
derivation”, “Instantiation”, and “Specification: Orchard key
derivation”). An Orchard extended spending key is a pair
(sk, c) of 32 -byte strings, where sk is a
spending key in the sense of the Ironwood Guide, §“The spending
key and the spend-side secrets”, and c is the chain code
(ZIP 32, “Orchard extended keys”). Only hardened derivation is defined for
Orchard: child derivation fails at every index
For a wallet seed S (Definition 2.1), let
| I := BLAKE2b - 512 (ZcashIP32Orchard, S), |
unkeyed BLAKE2b with a 64 -byte output, and let
For a parent extended spending key (sk par, c par) and an index
| I := PRFexpand c par ([0x81] ‖ sk par ‖ I2LEOSP 32 (i)), |
a 64 -byte string, and
Assume the following.
BLAKE2b-512 under the personalisation ZcashIP32Orchard and BLAKE2b-256 under the personalisation Zcash_HD_Seed_FP are modelled as random oracles (Crypto Guide, §“The random oracle model”, Definition “Random oracle”), independent of each other and of every other personalised use of BLAKE2b (Crypto Guide, §“Domain separation and personalisation”, Proposition “Domain separation yields independent oracles”), and of every other derivation from S that is modelled as a random oracle.
The seed S has min-entropy at least 256 bits, the reading of the entropy requirement of Definition 2.1 that the lemma uses.
The Ironwood Guide’s Assumption “Pseudorandomness of PRF expansion” (§“Pseudorandom functions and field reductions”) holds.
Let N be a fixed finite set of distinct nodes of the Orchard derivation
tree rooted at m Orchard , each reached by
Construction 2.4 along hardened indices, and let T be the
subtree spanned by the paths from the root to the nodes of N . Then the
spending keys of the nodes of N , the chain codes of those nodes of N
that are not a proper ancestor of another node of N , and
SeedFP (S) are jointly computationally indistinguishable from
independent uniform 32 -byte strings. For an adversary making q
random-oracle queries, the distinguishing advantage is at most
A hybrid argument (Crypto Guide, §“The hybrid argument”, Lemma
“Hybrid lemma”). Game 0 is the real experiment. Game 1 answers every
oracle query whose input is determined by S (the master query of
Construction 2.3, the input of SeedFP and the
inputs of the other modelled derivations) by fresh uniform strings,
independent of S . The two games differ only if the adversary itself
queries such an input. In Game 1 its view is independent of S until
that happens, so each of its q queries does so with probability at most
2 − 256 by hypothesis (ii), and the games differ by at most
Then visit the nodes of T that have a child in T , each parent before its children. At such a node v the chain code c v is, by the earlier hops, a uniform string that is used only as a PRFexpand key and is not released, because v is a proper ancestor of a node of N . The hop replaces PRFexpand c v by a uniformly random function. The children of v in T have distinct indices, hence distinct inputs [0x81] ‖ sk v ‖ I2LEOSP 32 (i) , so their 64 -byte outputs become fresh uniform strings (Ironwood Guide, §“Pseudorandom functions and field reductions”, Lemma “Independence of domain-separated expansions”, first conclusion, applied to a uniform key; its statistical-distance clause is not used). The hop costs the PRF advantage of a reduction that samples every other node itself and forwards the queries of v to its oracle. In the last game every released value is a fresh uniform string; the chain codes of proper ancestors, which are not fresh relative to their children, are exactly those the lemma does not release. □
In Construction 2.4 the parent chain code keys the expansion and the parent spending key is message data, so deriving children requires the pair (sk, c) . A 32 -byte spending key alone derives no child: by Lemma 2.5, without c the children are pseudorandom (ZIP 32, “Orchard child key derivation”). A wallet that keeps sk acct and not c acct keeps no power to derive keys below the account.
For a wallet seed S , a coin type t and an account index
| (sk acct, c acct) := CKD (CKD (CKD (MKG (S), 32 ′), t ′), a ′), |
the path m Orchard / purpose ′ / coin _ type ′ / account ′ . The purpose index is
The path ends at the account. Addresses are not path children: an account has 2 88 diversified addresses per scope, the images of the diversifier indices (Ironwood Guide, §“Diversified addresses”, Construction “Diversified address”). There is no change level. A shielded output does not show its address on chain, so returning change to the originating address is indistinguishable from using a change address; the wallet separates change from received funds by the internal scope below the account (§2.5; ZIP 32, “Key path levels”). Figure 1 shows the derivation from the seed to the addresses of both scopes.
Let S be the 32 bytes
| Node | Value | |
|---|---|---|
| m | sk | 7eee3c1017870990a3dd6891b82f80be8976c1e7dc20d60817a5e88e8b2cd4b8 |
| c | ab8b7a00509ef20e469b5292b61d474b7cffcb1657924cda720250ae40526677 | |
| m / 32 ′ | sk | 93af0a87c2e4704d8825e145557c6a5d4dcbc9016170e276a2080a2dc9eb0f87 |
| c | 6e1e808d410d6d1f84e62e67c8b60e80e5ee4de5021d575c0433a625d609c45c | |
| m / 32 ′ / 133 ′ | sk | 149fcee594a2a03de277ab919f22611d0ef6aa8e8e9a0bef32f01a0bcb0e8c4c |
| c | 07d13fdeccd21da16b467f8e785edc32f74ceeb541bede0394647f10fdb7114f | |
| m / 32 ′ / 133 ′ / 0 ′ | sk | b67d8d87cab9189500afb45dbca9f92c924c1de9d9ee1451be4a78313cb223b4 |
| c | 7ff0a6392e144d4c8f45bca21fb7827b508446ac069890aefbebbe388b7a84c0 |
The last spending key is sk acct , and it is valid in the sense of §2.6; the last chain code is c acct , which no construction uses. The master spending key agrees with the first Orchard test vector of ZIP 32, “Test Vectors”.
The Ironwood Guide constructs from a spending key sk the
components ask , nk and r ivk (§“The spending key and the
spend-side secrets”), the spend validating key ak P and its
coordinate ak (same subsection), the full viewing key
| PRFexpand LE 256 (r ivk) ([0x82] ‖ I2LEOSP 256 (ak) ‖ I2LEOSP 256 (nk)) |
(§“Viewing keys”), and the diversified addresses (§“Diversified
addresses”). These constructions are the
Let R be a result of the Ironwood Guide about a key generated with
| | Pr [W in G acct ∣ V] − Pr [B wins G] | ≤ 2 δ 1 − ρ − δ, |
where δ is the advantage bound of Lemma 2.5 for the
distinguisher of the proof and ρ is the probability that a single draw
from a uniform sk is discarded, negligible by the Ironwood
Guide’s Lemma “Rejection in key generation” (§“Viewing keys”); the bound
assumes
The key sk acct is only computationally close to
uniform, so the statistical-distance clause of the Ironwood Guide’s
Lemma “Independence of domain-separated expansions” (§“Pseudorandom
functions and field reductions”) does not apply; the proof is a reduction. Both
V and W are decided efficiently by the challenger. A distinguisher for
Lemma 2.5 receives either the real values
( sk acct , the other spending keys and
SeedFP (S) ) or independent uniform strings, runs the challenger and
A on them, and outputs 1 exactly on
| | a v − a u v u | ≤ | a − a u | v + a u v u ⋅ | v u − v | v ≤ 2 δ v ≤ 2 δ 1 − ρ − δ, |
using
The flag
| nk := ToBase (PRFexpand sk ([0x07])) . |
If
If
| ak | := Extract P (ak P), | ||
| qsk | := truncate 32 (PRFexpand sk ([0x0C])), | ||
| qk | := BLAKE3 . derive _ key (Zcash ZIP 2005 qk-derivation v1, qsk, 32), | ||
| r ivk | := ToScalar (PRFexpand qk ([0x0D] ‖ I2LEOSP 256 (ak) ‖ I2LEOSP 256 (nk))), |
where truncate 32 keeps the first 32 bytes and
| BLAKE3 . derive _ key (context, material, length) |
is the function that ZIP 2005 specifies, cited to it and not constructed; no property of it is assumed.
The components ivk , dk , ovk and every address are computed from (ak, nk, r ivk) by the Ironwood Guide’s constructions in both branches, so they depend on use _ qsk (ZIP 2005, “Changes to the Protocol Specification”, §4.2.3 “Orchard Key Components”, and “Usage with FROST”). No edition of the protocol specification carries this branch.
Wallet rules. A wallet MUST generate every key of one ZIP 32 account with
the same value of use _ qsk (ZIP 326, “Wallet key-generation
restrictions”). The rule of the same section on Orchard-pool funds and
Class (Definition 1.1): how an account whose keys are
to be recoverable from the seed with
Lemma 2.9 and every later key-side result of this
volume (separations, hiding, validity bounds) is claimed for
For
Composition of Constructions 2.3 and 2.4
and Definition 2.7, which map the seed to
sk acct ; of Construction 2.10,
which maps sk acct and use _ qsk , together
with ak P when
For a full viewing key (ak, nk, r ivk) of either branch,
| FVFP (ak, nk, r ivk) := BLAKE2b - 256 ( | ZcashOrchardFVFP, | ||
| I2LEOSP 256 (ak) ∥ I2LEOSP 256 (nk) ∥ I2LEOSP 256 (r ivk)), |
over the 96 -byte string shown, which is the raw encoding of an Orchard full viewing key (protocol specification, §“Orchard Raw Full Viewing Keys”). It MAY be used to identify the key uniquely; its uses rely on collision resistance, cited as for Construction 2.2; Lemma 2.24 models it as a random oracle. The tag is FVFP [0..4) , its first 4 bytes; it serves key lookup and MUST NOT be assumed unique, and nothing is claimed of it (ZIP 32, “Orchard Full Viewing Key Fingerprints and Tags”). In ZIP 32’s encoding of an extended spending key, a key names its parent by this tag, the master key’s parent tag being four zero bytes (ZIP 32, “Orchard extended spending keys”).
With no change level, the separation between externally visible receipt and wallet-internal operations runs below the account. The internal operations are change and auto-shielding, the automatic transfer of received transparent funds to the most recent shielded pool (ZIP 315, “Terminology”; its rules in §11.3). The derivation applies to keys at the account level (ZIP 32, “Orchard internal key derivation”).
For a full viewing key
| r ivk int := ToScalar (PRFexpand K ([0x83] ‖ I2LEOSP 256 (ak) ‖ I2LEOSP 256 (nk))) ∈ F p Vesta . |
The internal full viewing key is
Hence
From fvk alone one computes, for both scopes, ivk , dk , ovk and
the address at every diversifier index
Computation: fvk int is a function of fvk (Construction 2.14), and each address is a function of (dk, ivk) and j (Ironwood Guide, §“Diversified addresses”, Construction “Diversified address”). No ask : the Ironwood Guide, §“Key capabilities and scope”, Proposition “Capability separation”, part (a), under its Assumptions “Pseudorandomness of PRF expansion” and “Discrete logarithms on Pallas”, transferred to sk acct by Lemma 2.9. No other account: the spending key of another account lies at a distinct path, and only hardened derivation exists; by Lemma 2.5 the two keys are jointly indistinguishable from independent uniform strings, so an algorithm given every key of this account outputs the other key with probability at most 2 − 256 plus the advantage bound of that lemma. □
For keys with
| (Commit r ivk (ak, nk), u 1, u 2, Commit r ′ ivk (ak, nk), u 3, u 4), |
where r and r ′ are uniform on F p Vesta and
Let an account key have
Acceptance under a key ivk derives the transmission key again as
[ivk] g d from the decrypted diversifier and checks the note commitment
of the derived note against cmx (Ironwood Guide, §“Trial
decryption and note acceptance”, Construction “Acceptance of an
Ironwood-pool output”, check (iv); for an Orchard-pool output the check of
the protocol specification, §“Decryption using an Incoming Viewing Key
(Sapling and Orchard)”). The honest output commits to a note n with
transmission key [ivk int] g d . If the note n ′ derived
under ivk ext differs from n , acceptance exhibits two
distinct notes with one extracted commitment, which happens with negligible
probability (Ironwood Guide, §“Note commitments”, Proposition “Hiding
and binding of note commitments”, part (b)). If
A P2PKH (pay-to-public-key-hash) output pays to the hash of one secp256k1 public key (Crypto Guide, §“The transparent layer’s schemes: ECDSA and BIP-340 over secp256k1”). P2PKH keys have no outgoing viewing key, yet auto-shielding outputs need one. For the BIP 32 account-level extended public key (c, pk) of a transparent account, at path m / 44 ′ / coin _ type ′ / account ′ (BIP 44), let
| I ovk := PRFexpand c ([0xD0] ∥ ser P (pk)), |
with the chain code c used as a 32 -byte key and
ser P (pk) the 33 -byte compressed encoding of BIP 32;
then
For an honestly generated account-level extended public key (c, pk) , the extended public keys of its non-hardened children 0 and 1 and the two halves of I ovk are jointly computationally indistinguishable from two independently generated extended public keys, each a uniform 32 -byte chain code with the public key of a uniform secret key, and two independent uniform 32 -byte strings. The chain code c keys both HMAC-SHA512 in BIP 32 non-hardened derivation and PRFexpand in the 0xD0 row, so this is not an instance of the Ironwood Guide’s Lemma “Independence of domain-separated expansions” (§“Pseudorandom functions and field reductions”); it is assumed.
The following hold, where “derives” means outputs the key with non-negligible probability.
A holder of a full viewing key derives the external and internal incoming viewing keys and the external and internal outgoing viewing keys.
A holder of the external incoming viewing key derives neither the internal incoming viewing key nor any outgoing viewing key.
A holder of the external outgoing viewing key derives neither the internal outgoing viewing key nor any incoming viewing key.
For Orchard the statements hold for keys with
(i) Constructive: Construction 2.14 and the Ironwood Guide’s constructions; for transparent keys, Construction 2.18 from (c, pk) .
(ii) and (iii), Orchard: by Lemma 2.9 and Assumption 2.16 the six keys are replaced by the ideal distribution, at the cost of the distinguishing advantage, since success is decided by comparing the output with the key. In the ideal distribution every key not computed from the held one is independent of it: either a uniform 32 -byte string, output with probability 2 − 256 , or a Commit ivk value under an independent trapdoor, output with probability at most 2 / p Vesta (Ironwood Guide, §“Viewing keys”, Lemma “Distribution of ivk ”). Transparent: the same argument in the ideal distribution of Assumption 2.19, where an independently generated extended public key has a uniform chain code, output with probability 2 − 256 . Sapling: cited to ZIP 316, “Deriving Internal Keys”, which asserts them from the one-wayness of PRFexpand and CRH ivk ; not proved here. □
For
ZIP 32 notes that a child spending key yields an invalid external or internal full viewing key “with small probability” and prescribes no wallet behaviour (“Orchard child key derivation”). The specification’s instruction to discard the key and repeat with a new sk applies to a freshly random key, not to a fixed path, where nothing is drawn again: an account index whose key is invalid has no key. Class (Definition 1.1): the wallet’s handling of such an index is an open problem; Proposition 2.23 bounds its probability.
Model the Sinsemilla generators, the points S (j) for
| ε := 3 ⌈ 2 512 / p Vesta ⌉ 2 512 + 408 p Vesta < 412 p Vesta = 2 − 245.31 . |
For
Replace sk acct by a uniform string
(Lemma 2.5); the 512 -bit outputs of rows 0x06 ,
0x07 and 0x08 by independent uniform strings (the
Ironwood Guide’s Lemma “Independence of domain-separated
expansions” (§“Pseudorandom functions and field reductions”), first
conclusion); r ivk by a uniform element of F p Vesta (the reduction
distance); and, on the event
The Sinsemilla hash point M ^ of the message
LE 255 (ak) ∥ LE 255 (nk) is
⊥ .
The message has 510 bits, 51 chunks of 10 bits, so the hash
performs 102 incomplete additions, two per round,
The sum is ε . Negligibility alone is the Ironwood Guide’s Lemma “Rejection in key generation” (§“Viewing keys”). For n accounts, apply the replacements to the n paths jointly and the union bound over the n keys; path nodes that are not account keys do not enter the union, since an account key’s validity does not depend on theirs. □
Domain separation of PRFexpand is per key: under one key,
distinct lead bytes give jointly pseudorandom outputs (Ironwood Guide,
§“Pseudorandom functions and field reductions”, Lemma “Independence of
domain-separated expansions”), while
expansions under different keys may reuse a byte. Byte conventions: the key
that ZIP 32 writes I2LEBSP 256 (r ivk) is
LE 256 (r ivk) ; the bytes of ak are
I2LEOSP 256 (ak) of the field element
Table 2 lists the expansions and personalisations that this volume constructs. The expansions of the key components and of notes are the rows of the Ironwood Guide’s Construction “Domain bytes of PRF expansion” (§“Pseudorandom functions and field reductions”) and are not restated. The list of expansion bytes that the protocol specification maintains, as amended by ZIP 2005, is §“Pseudo Random Functions” (ZIP 2005, “Changes to the Protocol Specification”, §4.1.2); bytes this volume does not use are not listed.
| Byte | Key | Message | Output | Constructed in |
| 0x81 | c par | sk par ∥ I2LEOSP 32 (i) | (sk i, c i) | Constr. 2.4 |
| 0x83 | LE 256 (r ivk) |
I2LEOSP 256 (ak) ∥
I2LEOSP 256 (nk) |
r ivk int ( ToScalar ) | Constr. 2.14 |
| 0x0C | sk | ε (empty) | qsk ( truncate 32 ) | Constr. 2.10 |
| 0x0D | qk |
I2LEOSP 256 (ak) ∥
I2LEOSP 256 (nk) |
r ivk if use _ qsk = true ( ToScalar ) | Constr. 2.10 |
| 0xD0 | transparent chain code c | ser P (pk) | ovk external ∥ ovk internal | Constr. 2.18 |
| Personalisation | Function | Output | Constructed in | |
| ZcashIP32Orchard | BLAKE2b - 512 of S | (sk m, c m) | Constr. 2.3 | |
| Zcash_HD_Seed_FP | BLAKE2b - 256 of [length (S)] ∥ S | SeedFP (S) | Constr. 2.2 | |
| ZcashOrchardFVFP | BLAKE2b - 256 of the 96 -byte encoding of fvk | FVFP | Constr. 2.13 | |
Under the Ironwood Guide’s Assumption “Pseudorandomness of PRF expansion” (§“Pseudorandom functions and field reductions”), with BLAKE2b under distinct personalisations modelled as independent random oracles, the expansions of rows 0x81 and 0x0C , whose keys (a chain code of the Orchard tree, and sk acct ) are pseudorandom by Lemma 2.5 and enter no function other than PRFexpand , and the three personalised BLAKE2b functions of Table 2 are jointly indistinguishable from independent random functions. The lemma excludes the other rows, each outside the hypothesis of the Ironwood Guide’s Lemma “Independence of domain-separated expansions” (§“Pseudorandom functions and field reductions”): the row 0x83 , whose key is also the Commit ivk trapdoor, is covered by Assumption 2.16; the row 0xD0 , whose key also keys HMAC-SHA512, by Assumption 2.19; the row 0x0D , keyed by the BLAKE3 output qk of which nothing is assumed (Remark 2.11), carries no claim.
For each key, the Ironwood Guide’s Lemma “Independence of domain-separated expansions” (§“Pseudorandom functions and field reductions”), applied after the hybrid of Lemma 2.5 has made the keys uniform; this is a reduction, as in Lemma 2.9, not the statistical-distance clause of that lemma. For the three personalisations, the Crypto Guide’s Proposition “Domain separation yields independent oracles” (§“Domain separation and personalisation”): they are pairwise distinct 16 -byte strings, and the two BLAKE2b-256 uses and the BLAKE2b-512 use differ also in the output length, a parameter of BLAKE2b. The proof of Lemma 2.5 uses the same two citations directly. □