The Zcash ArboretumThe Complete Arboretum PDF

2 Notation and primitive instances

This section fixes the encodings and the primitive instances on which the later constructions rest, each with its Orchard parameters and domain separators. The underlying constructions belong to the Math Guide and the Crypto Guide and are cited, not re-derived; each named assumption is stated at the first construction whose security needs it.

2.1 Fields, groups, and encodings

The Pallas group ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌) is the group of points of the curve y2=x3+5 over the prime field 𝔽p𝖯𝖺𝗅𝗅𝖺𝗌, with identity 𝒪. It has prime order p𝖵𝖾𝗌𝗍𝖺 and cofactor 1, and 𝔽p𝖵𝖾𝗌𝗍𝖺 is both its scalar field and the base field of the Vesta curve (Math Guide, §“Base fields, scalar fields, and the Pasta cycle” and §“Pallas and Vesta assembled”, Example “The Pasta curves”; Crypto Guide, §“Instantiation on elliptic curves; the Pasta curves”, Definition “The Pasta curves”). The group, its order and the cycle with Vesta are cited, not re-derived; the moduli are those of the protocol specification, §“Pallas and Vesta”. Table 1 maps this notation, once, to the names used by the specification and by the lower volumes. Those names appear in the table only; later text writes only the column headed “This volume”. Maps defined on the Pallas group carry the specification’s subscript ℙ, as in 𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ.

Object This volume Specification Lower volumes
Pallas base-field modulus p𝖯𝖺𝗅𝗅𝖺𝗌 qℙ p
Pallas scalar-field modulus, Vesta base-field modulus, order of the Pallas group p𝖵𝖾𝗌𝗍𝖺 rℙ q
Pallas base field and scalar field 𝔽p𝖯𝖺𝗅𝗅𝖺𝗌, 𝔽p𝖵𝖾𝗌𝗍𝖺 𝔽qℙ, 𝔽rℙ 𝔽p, 𝔽q
Pallas group ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌) ℙ Ep⁢(𝔽p)
k-bit little-endian encoding of an integer LEk 𝖨𝟤𝖫𝖤𝖡𝖲𝖯k —
Encoding of a point P P⋆ 𝗋𝖾𝗉𝗋ℙ⁢(P) —
Sinsemilla short commitment 𝖲𝗁𝗈𝗋𝗍𝖢𝗈𝗆𝗆𝗂𝗍 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖲𝗁𝗈𝗋𝗍𝖢𝗈𝗆𝗆𝗂𝗍 —
Spend validating key, as a point and as its x-coordinate 𝖺𝗄ℙ, 𝖺𝗄 𝖺𝗄ℙ, 𝖺𝗄 —
Table 1: Notation for the fields, the Pallas group and the encodings, with the names of the protocol specification and of the Math and Crypto Guides. The spend validating key is constructed in §3.1; the point 𝖺𝗄ℙ and the field element 𝖺𝗄=𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(𝖺𝗄ℙ) are kept apart throughout.

Scalar multiplication is written [k]⁢P, for k∈𝔽p𝖵𝖾𝗌𝗍𝖺 or an integer read modulo p𝖵𝖾𝗌𝗍𝖺. The symbol ∥ denotes concatenation of bit strings or of byte strings, and ε the empty string. Byte-string literals and tags are set in monospace, as in z.cash:Orchard, and single bytes as 𝟶⁢𝚡... The symbol ⊥ is the failure value of a partial map; a map that may fail takes values in X∪{⊥} for its codomain X.

Both moduli have bit length 255, and p𝖯𝖺𝗅𝗅𝖺𝗌<p𝖵𝖾𝗌𝗍𝖺:

2254<p𝖯𝖺𝗅𝗅𝖺𝗌<p𝖵𝖾𝗌𝗍𝖺<2255.

Two consequences are used later. First, the integer representative of an element of either field lies in {0,…,2255−1} and has a 255-bit encoding, which leaves the top bit of a 256-bit string free. Second, the integer representative of an element of 𝔽p𝖯𝖺𝗅𝗅𝖺𝗌 lies in {0,…,p𝖵𝖾𝗌𝗍𝖺−1}; reading it as a Pallas scalar is therefore an injective, not a surjective, map 𝔽p𝖯𝖺𝗅𝗅𝖺𝗌→𝔽p𝖵𝖾𝗌𝗍𝖺. This map is used wherever a base-field element multiplies a point (§3.3, §6.1).

Definition 2.1 (Integer and byte encodings).

For k≥0 and an integer m∈{0,…,2k−1}, the k-bit little-endian encoding LEk⁢(m)∈{0,1}k is the bit sequence b0⁢b1⁢⋯⁢bk−1 with m=∑i=0k−1bi⁢2i. The map LEk:{0,…,2k−1}→{0,1}k is a bijection with inverse LEk−1. A field element is encoded through its integer representative in {0,…,p−1}, for p the modulus. In the conversion names below, 𝖨 stands for integer, 𝖫𝖤 for little-endian, 𝖡𝖲 for bit string, and 𝖮𝖲 for octet string (a sequence of eight-bit bytes). The digit 2 is read “to”, and 𝖯 stands for primitive, a basic conversion operation. The subscript k counts bits, not bytes. Three maps relate integers, bit strings and byte strings:

  • •

    the map 𝖨𝟤𝖫𝖤𝖮𝖲𝖯k sends m∈{0,…,2k−1} to its ⌈k/8⌉-byte little-endian encoding;

  • •

    for k a multiple of 8, the map 𝖫𝖤𝖮𝖲𝟤𝖨𝖯k sends a k/8-byte string (s0,…,sk/8−1) to the integer ∑isi⁢ 256i∈{0,…,2k−1};

  • •

    the map 𝖫𝖤𝖡𝖲𝟤𝖮𝖲𝖯k:{0,1}k→{0,…,255}⌈k/8⌉ pads its input on the right with zero bits to a multiple of 8 bits, packs each group of 8 bits into a byte, least significant bit first, and keeps the order of the groups.

Hence 𝖫𝖤𝖡𝖲𝟤𝖮𝖲𝖯k⁢(LEk⁢(m))=𝖨𝟤𝖫𝖤𝖮𝖲𝖯k⁢(m). The byte form is needed wherever a bit string enters BLAKE2b or 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 (protocol specification, §“Integers, Bit Sequences, and Endianness”).

The widths used later are LE10 (the Merkle layer tag, §5.1), LE64 (the note value, §4.2), LE88 (the diversifier index, §3.3), LE255 (field elements) and LE256 (the star encoding below; the key encoding of 𝗋𝗂𝗏𝗄, §3.2).

Definition 2.2 (Coordinate extraction).

The map 𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ:ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌)→𝔽p𝖯𝖺𝗅𝗅𝖺𝗌 is

𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(𝒪):=0,𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢((x,y)):=x.

Its lifting 𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⊥:ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌)∪{⊥}→𝔽p𝖯𝖺𝗅𝗅𝖺𝗌∪{⊥} maps ⊥ to ⊥ and agrees with 𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ on points (protocol specification, §“Coordinate Extractor for Pallas”).

The map 𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ supplies a field element wherever a later construction needs one in place of a point: the field element 𝖺𝗄 (§3.1), the extracted note commitment 𝖼𝗆𝗑 (§4.2), the node values of the note commitment tree (§5.1) and the nullifier 𝗇𝖿 (§6.1). It is two-to-one on non-identity points, by Lemma 2.4 and because P≠−P for P≠𝒪 in a group of odd order; every binding argument over an extracted coordinate treats the opposite point explicitly.

Lemma 2.3 (Extract vanishes only at the identity).

For P∈ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌), 𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(P)=0 if and only if P=𝒪.

Proof.

If P=𝒪, then 𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(P)=0 by definition. A point (0,y) would satisfy y2=5 in 𝔽p𝖯𝖺𝗅𝗅𝖺𝗌, but 5 is a quadratic non-residue modulo p𝖯𝖺𝗅𝗅𝖺𝗌 (Math Guide, §“Quadratic residues and the Euler criterion”, Example “5 is a non-square in the Pallas base field”). Hence no point other than 𝒪 has extracted coordinate 0. □

Lemma 2.4 (Coordinate extraction identifies opposite points).

For P,P′∈ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌), 𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(P)=𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(P′) if and only if P′=P or P′=−P.

Proof.

Negation is −𝒪=𝒪 and −(x,y)=(x,−y) (Math Guide, §“Explicit affine formulas”, Definition “Negation”), so 𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(−P)=𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(P) for every P, which is the reverse implication. For the forward implication let 𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(P)=𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(P′). If P=𝒪, then 𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⁢(P′)=0, and Lemma 2.3 gives P′=𝒪=−P. If P=(x,y), then x≠0 by Lemma 2.3, so P′≠𝒪 and P′=(x,y′) with y′⁣2=x3+5=y2; hence y′=±y and P′=±P. □

Definition 2.5 (Star encoding).

For P∈ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌) the star encoding P⋆∈{0,1}256 is

𝒪⋆:=LE256⁢(0),(x,y)⋆:=LE256⁢(x+2255⁢(ymod2)),

with x and y read as integer representatives: the 255-bit x-coordinate fills the low bits and the parity of y the top bit. The partial inverse 𝖺𝖻𝗌𝗍ℙ:{0,1}256→ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌)∪{⊥} reads the first 255 bits of s as x~:=LE255−1⁢(s0⁢⋯⁢s254) and the last bit as the sign bit y~:=s255, and returns

  1. 1.

    the failure value ⊥ if x~≥p𝖯𝖺𝗅𝗅𝖺𝗌; otherwise let x:=x~∈𝔽p𝖯𝖺𝗅𝗅𝖺𝗌;

  2. 2.

    the identity 𝒪 if x=0 and y~=0;

  3. 3.

    the failure value ⊥ if x3+5 is not a square in 𝔽p𝖯𝖺𝗅𝗅𝖺𝗌;

  4. 4.

    otherwise the point (x,y) with y2=x3+5 and ymod2=y~

(protocol specification, §“Pallas and Vesta”).

The encoding is canonical: 𝖺𝖻𝗌𝗍ℙ⁢(P⋆)=P for every point P, and 𝖺𝖻𝗌𝗍ℙ⁢(s)≠⊥ implies 𝖺𝖻𝗌𝗍ℙ⁢(s)⋆=s. For the first claim, 𝒪⋆ decodes to 𝒪 at step 2. A point (x,y) has x≠0 (Lemma 2.3), and y≠0 because a point with y=0 has order 2, which a group of odd order does not contain (Math Guide, §“Torsion, the cofactor, and prime-order subgroups”, Remark “No two-torsion on the Pasta curves”). The two square roots ±y are therefore non-zero and, p𝖯𝖺𝗅𝗅𝖺𝗌 being odd, of opposite parities, so step 4 returns (x,y). For the second claim, a string decoded at step 2 is LE256⁢(0)=𝒪⋆, and a string decoded at step 4 to (x,y) has low bits LE255⁢(x) and top bit ymod2, so it equals (x,y)⋆. Consequently P↦P⋆ is injective, each point has exactly one valid encoding, and every other string decodes to ⊥, among them LE256⁢(2255) (whose x-part is 0 and sign bit 1) and every string whose x-part is at least p𝖯𝖺𝗅𝗅𝖺𝗌. The star encoding is the form in which a point enters a hash or a commitment as a bit string.

2.2 GroupHash, domain separation, and nothing-up-my-sleeve generators

Construction 2.6 (GroupHash on Pallas).

For byte strings D (the domain separator) and M (the message), the point 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁⁢(D,M)∈ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌) is computed as follows.

  1. 1.

    Let

    𝖣𝖲𝖳:=D⁢‖-‖⁢pallas∥_XMD:BLAKE2b_SSWU_RO_;

    the map is defined when 𝖣𝖲𝖳 has at most 255 bytes, which holds for every domain separator of Table 2.

  2. 2.

    The map 𝗁𝖺𝗌𝗁⁢_⁢𝗍𝗈⁢_⁢𝖿𝗂𝖾𝗅𝖽 expands (M,𝖣𝖲𝖳) by 𝖾𝗑𝗉𝖺𝗇𝖽⁢_⁢𝗆𝖾𝗌𝗌𝖺𝗀𝖾⁢_⁢𝗑𝗆𝖽 over BLAKE2b-512 into two 64-byte strings. BLAKE2b runs with zero personalisation; the string 𝖣𝖲𝖳, followed by a byte carrying its length, is part of the hashed input. Each string is read as a big-endian integer and reduced modulo p𝖯𝖺𝗅𝗅𝖺𝗌, giving u0,u1∈𝔽p𝖯𝖺𝗅𝗅𝖺𝗌.

  3. 3.

    The simplified Shallue–van de Woestijne–Ulas map sends each ui to a point Qi of a curve 3-isogenous to Pallas.

  4. 4.

    The output is the image of Q0+Q1 under the 3-isogeny onto Pallas.

No cofactor is cleared, since the Pallas group has prime order. The isogenous curve, the isogeny coefficients and the constant of the map are those of the protocol specification, §“Group Hash into Pallas and Vesta”, and are not reproduced. The map is deterministic, public and efficiently computable (Crypto Guide, §“Hashing to a field element”, Construction “Expand-then-reduce”; §“Hashing to a curve point”, Constructions “Simplified Shallue–van de Woestijne–Ulas map” and “The hash-to-curve pipeline”, Remark “The isogeny detour forced by j-invariant 0”).

Definition 2.7 (Domain separator and fixed generator).

A domain separator is a fixed ASCII byte string naming a use site; it is the first argument of 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁, so that distinct uses draw distinct generators. A fixed generator is the value of 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 on a public, fixed pair (D,M). It is nothing-up-my-sleeve: the public pair determines it, and no party chose it (Crypto Guide, §“Hashing to a curve point”, Construction “Nothing-up-my-sleeve generators”). The strings are fixed by the protocol specification.

Assumption 2.8 (GroupHash as a random oracle).

In security arguments 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 is modelled as a random oracle on pairs (D,M) with values in ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌) (Crypto Guide, §“The random oracle model”, Definition “Random oracle”, with the group in place of bit strings): distinct pairs receive independent uniform points. In particular the fixed generators of Table 2 are, in the model, independent uniform points. The assumption is a heuristic about the concrete map, supported by its design for indifferentiability from a random oracle (protocol specification, §“Group Hash into Pallas and Vesta”, note); it is not a theorem. Every later binding, collision, uniqueness or unlinkability result that needs it names it.

Domain separator D Message M Object Used in
z.cash:Orchard G G𝖲𝗉𝖾𝗇𝖽𝖠𝗎𝗍𝗁, spend-authorisation base §3.1, §7.1
z.cash:Orchard K K𝖮𝗋𝖼𝗁𝖺𝗋𝖽, nullifier base §6.1
z.cash:Orchard-gd 𝖫𝖤𝖡𝖲𝟤𝖮𝖲𝖯88⁢(d) 𝗀𝖽 for a diversifier d §3.3
z.cash:Orchard-gd ε 𝗀𝖽 if the row above gives 𝒪 §3.3
z.cash:SinsemillaQ z.cash:Orchard-NoteCommit-M hash base of 𝖭𝗈𝗍𝖾𝖢𝗈𝗆𝗆𝗂𝗍 §4.2
z.cash:Orchard-NoteCommit-r ε blinding base of 𝖭𝗈𝗍𝖾𝖢𝗈𝗆𝗆𝗂𝗍 §4.2
z.cash:SinsemillaQ z.cash:Orchard-CommitIvk-M hash base of 𝖢𝗈𝗆𝗆𝗂𝗍𝗂𝗏𝗄 §2.4
z.cash:Orchard-CommitIvk-r ε blinding base of 𝖢𝗈𝗆𝗆𝗂𝗍𝗂𝗏𝗄 §2.4
z.cash:SinsemillaQ z.cash:Orchard-MerkleCRH hash base of 𝖬𝖾𝗋𝗄𝗅𝖾𝖢𝖱𝖧 §5.1
z.cash:Orchard-cv v V𝖮𝗋𝖼𝗁𝖺𝗋𝖽, value base §8.1
z.cash:Orchard-cv r R𝖮𝗋𝖼𝗁𝖺𝗋𝖽, randomness base §8.1
z.cash:SinsemillaS 𝖨𝟤𝖫𝖤𝖮𝖲𝖯32⁢(j) table entry S⁢(j), 0≤j<210 §2.4
Table 2: Every input of 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 in the Orchard protocol. The hash base of 𝖬𝖾𝗋𝗄𝗅𝖾𝖢𝖱𝖧 is derived from its domain without the suffix -M, and 𝖬𝖾𝗋𝗄𝗅𝖾𝖢𝖱𝖧 has no blinding base. The table entries S⁢(j) are shared by every Sinsemilla domain.
Remark 2.9 (Domain separation).

The pairs of Table 2 are pairwise distinct, and the map from (D,M) to the input hashed by 𝗁𝖺𝗌𝗁⁢_⁢𝗍𝗈⁢_⁢𝖿𝗂𝖾𝗅𝖽 is injective, because 𝖣𝖲𝖳 is closed by a byte carrying its length. Under Assumption 2.8 the table’s generators are therefore independent, and a relation found in one context transfers to no other (Crypto Guide, §“Domain separation and personalisation”, Proposition “Domain separation yields independent oracles”). The Crypto Guide’s inventory of Orchard tags and personalisations in the same section is cited, not repeated.

2.3 Pseudorandom functions and field reductions

Definition 2.10 (Pseudorandom function).

A keyed family (Fk)k of functions is a pseudorandom function (PRF) if no efficient adversary with adaptive oracle access distinguishes Fk, for a secret uniform key k, from a uniformly random function with the same domain and range, except with negligible advantage (Crypto Guide, §“Pseudorandom functions and permutations”, Definition “Pseudorandom function”).

Construction 2.11 (Expansion function).

For a key k∈{0,1}256 and a byte string t,

𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽k(t):=BLAKE2b-512( Zcash_ExpandSeed,
𝖫𝖤𝖡𝖲𝟤𝖮𝖲𝖯256(k)∥t),

a 64-byte string, identified with {0,1}512; here BLAKE2b⁢-⁢512⁢(P,x) is unkeyed BLAKE2b with a 64-byte output, the 16-byte personalisation P and the input x. A key given as a 32-byte string enters as is. The key is thus carried in the message, not in BLAKE2b’s native keyed mode (protocol specification, §“Pseudo Random Functions”), so the Crypto Guide’s PRF argument for native keying (§“PRFs from hash functions: length extension and keyed BLAKE2”) does not cover this construction; Assumption 2.12 states the property directly. The key is written as a subscript; the leading byte of t names the derived quantity (protocol specification, §“Pseudo Random Functions”).

Assumption 2.12 (Pseudorandomness of PRF expansion).

For k uniform on {0,1}256, the function t↦𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽k⁢(t) from byte strings to {0,1}512 is a PRF in the sense of the preceding definition. This is the security requirement that the protocol specification, §“Pseudo Random Functions”, places on 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽.

Definition 2.13 (Field reductions).

For x∈{0,1}512, read as 64 bytes,

ToBase⁢(x) :=𝖫𝖤𝖮𝖲𝟤𝖨𝖯512⁢(x)modp𝖯𝖺𝗅𝗅𝖺𝗌∈𝔽p𝖯𝖺𝗅𝗅𝖺𝗌,
ToScalar⁢(x) :=𝖫𝖤𝖮𝖲𝟤𝖨𝖯512⁢(x)modp𝖵𝖾𝗌𝗍𝖺∈𝔽p𝖵𝖾𝗌𝗍𝖺

(protocol specification, §“Orchard Key Components”).

For x uniform on {0,1}512, the statistical distance of ToBase⁢(x) from the uniform distribution on 𝔽p𝖯𝖺𝗅𝗅𝖺𝗌 is at most p𝖯𝖺𝗅𝗅𝖺𝗌/2512, and that of ToScalar⁢(x) from the uniform distribution on 𝔽p𝖵𝖾𝗌𝗍𝖺 at most p𝖵𝖾𝗌𝗍𝖺/2512 (Math Guide, §“Uniform sampling and the bias of modular reduction”, Proposition “Bias of modular reduction”, with L=512). Both bounds are below 2−257.

Construction 2.14 (Domain bytes of PRF expansion).

Every later use of 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽 derives one quantity as

y:=f⁢(𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽κ⁢(b∥t′)),

where the lead byte b, the key κ, the remainder t′ of the input and the reduction f∈{ToBase,ToScalar}, or no reduction, form one row of Table 3. Each row’s objects are defined in the section it names (protocol specification, §“Orchard Key Components” for 𝟶⁢𝚡⁢𝟶𝟼, 𝟶⁢𝚡⁢𝟶𝟽, 𝟶⁢𝚡⁢𝟶𝟾 and 𝟶⁢𝚡⁢𝟾𝟸; §“Sending Notes (Orchard)” for 𝟶⁢𝚡⁢𝟶𝟺, 𝟶⁢𝚡⁢𝟶𝟿 and 𝟶⁢𝚡⁢𝟶⁢𝙱).

b Key κ Remainder t′ f Output Section
𝟶⁢𝚡⁢𝟶𝟼 𝗌𝗄 ε ToScalar 𝖺𝗌𝗄 §3.1
𝟶⁢𝚡⁢𝟶𝟽 𝗌𝗄 ε ToBase 𝗇𝗄 §3.1
𝟶⁢𝚡⁢𝟶𝟾 𝗌𝗄 ε ToScalar 𝗋𝗂𝗏𝗄 §3.1
𝟶⁢𝚡⁢𝟾𝟸 LE256⁢(𝗋𝗂𝗏𝗄) 𝖨𝟤𝖫𝖤𝖮𝖲𝖯256⁢(𝖺𝗄)∥𝖨𝟤𝖫𝖤𝖮𝖲𝖯256⁢(𝗇𝗄) none 𝖽𝗄∥𝗈𝗏𝗄 §3.2
𝟶⁢𝚡⁢𝟶𝟺 𝗋𝗌𝖾𝖾𝖽 𝖨𝟤𝖫𝖤𝖮𝖲𝖯256⁢(ρ) ToScalar 𝖾𝗌𝗄 §4.3
𝟶⁢𝚡⁢𝟶𝟿 𝗋𝗌𝖾𝖾𝖽 𝖨𝟤𝖫𝖤𝖮𝖲𝖯256⁢(ρ) ToBase ψ §4.3
𝟶⁢𝚡⁢𝟶⁢𝙱 𝗋𝗌𝖾𝖾𝖽 𝖫𝖤𝖡𝖲𝟤𝖮𝖲𝖯256⁢(𝗀𝖽⋆)⁢‖𝖫𝖤𝖡𝖲𝟤𝖮𝖲𝖯256⁢(𝗉𝗄𝖽⋆)‖⁢𝖨𝟤𝖫𝖤𝖮𝖲𝖯64⁢(v)⁢‖𝖨𝟤𝖫𝖤𝖮𝖲𝖯256⁢(ρ)‖⁢𝖨𝟤𝖫𝖤𝖮𝖲𝖯256⁢(ψ) ToScalar 𝗋𝖼𝗆 §4.3
Table 3: Every lead byte of 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽 used in this volume. The row 𝟶⁢𝚡⁢𝟾𝟸 applies no reduction: its 64-byte output splits into 𝖽𝗄, the first 32 bytes, and 𝗈𝗏𝗄, the last 32 bytes.
Lemma 2.15 (Independence of domain-separated expansions).

Let k be uniform on {0,1}256 and used only as a 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽 key. Let an efficient algorithm choose, possibly adaptively, pairwise distinct inputs t1,…,tn, in particular inputs with pairwise distinct leading bytes, and receive the answers. Under Assumption 2.12, the answers (𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽k⁢(t1),…,𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽k⁢(tn)) are computationally indistinguishable from n independent uniform elements of {0,1}512. Consequently, for reductions fi∈{ToBase,ToScalar}, the answers (fi⁢(𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽k⁢(ti)))i are computationally indistinguishable from independent uniform elements of the target fields, up to an additional statistical distance of at most the sum of the reduction distances. For a key within statistical distance δ of uniform, both conclusions hold with δ added.

Proof.

One hybrid replaces 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽k by a uniformly random function; the distinguishing advantage changes by at most the PRF advantage of the algorithm that runs the given one and forwards its queries to its own oracle (Assumption 2.12; adaptive queries are within the definition, Crypto Guide, §“Pseudorandom functions and permutations”, Remark “Necessity of adaptivity”). A random function, sampled lazily, answers each new input with a fresh uniform value, so its answers on pairwise distinct inputs are independent and uniform, also when each input depends on earlier answers. For the reduced answers, replacing each fi of a fresh uniform string by a fresh uniform field element changes the distribution of the whole interaction by at most the reduction distance of fi; summing over i bounds the total by the triangle inequality, and the post-processing by the algorithm does not increase it (Math Guide, §“Statistical distance”, Theorem “Properties of statistical distance”). A key within statistical distance δ of uniform changes the interaction, a function of the key and the algorithm’s coins, by at most δ, by the same theorem. □

The hypothesis of Lemma 2.15 holds for the spending key 𝗌𝗄, and for 𝗋𝗌𝖾𝖾𝖽 towards an adversary that sees 𝗋𝗌𝖾𝖾𝖽 only through 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽 outputs; the note plaintext, which contains 𝗋𝗌𝖾𝖾𝖽, is treated in §10.2. It does not hold for the row 𝟶⁢𝚡⁢𝟾𝟸, whose key encodes the trapdoor 𝗋𝗂𝗏𝗄, which is also used in 𝖢𝗈𝗆𝗆𝗂𝗍𝗂𝗏𝗄; that row is covered by Assumption 3.13 in §3.2. The lemma is used in §3.1, in Lemma “Rejection in key generation” (§3.2), in Propositions 3.18, 3.17, 4.8, 6.10 and 10.6, in Proposition “Confidentiality of the outgoing ciphertext” (§10.3), in Theorems 12.9 and 12.12, and in Remark “Hypothesis (H) for honest keys” (§11.3).

Remark 2.16 (Hash roles).

Each hash is defined at its construction site. BLAKE2b-512 with personalisation Zcash_ExpandSeed serves 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽 (this subsection); BLAKE2b-512 without personalisation serves 𝗁𝖺𝗌𝗁⁢_⁢𝗍𝗈⁢_⁢𝖿𝗂𝖾𝗅𝖽 inside 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 (§2.2); personalised BLAKE2b-512 serves the RedPallas hash 𝖧 (§7.1); BLAKE2b-256 serves the note-encryption key derivation and the outgoing cipher key (§10.2, §10.3); BLAKE2b serves the transaction and signature digests (§11.3); Sinsemilla serves 𝖬𝖾𝗋𝗄𝗅𝖾𝖢𝖱𝖧, 𝖭𝗈𝗍𝖾𝖢𝗈𝗆𝗆𝗂𝗍 and 𝖢𝗈𝗆𝗆𝗂𝗍𝗂𝗏𝗄 (§2.4); Poseidon serves the nullifier PRF, constructed with the nullifier (§6.1). The personalisations of 𝖯𝖱𝖥𝖾𝗑𝗉𝖺𝗇𝖽, the note-encryption key derivation and the outgoing cipher key are those of the Crypto Guide’s inventory (§“PRFs from hash functions: length extension and keyed BLAKE2”, Remark “Zcash’s use of keyed and personalised BLAKE2”); every personalisation is stated at its construction.

2.4 Sinsemilla: hash, commitment, and short forms

Construction 2.17 (Sinsemilla hash on Pallas).

The Crypto Guide, §“Sinsemilla: an algebraic hash-based commitment”, Construction “Sinsemilla hash”, fixes the chunk width k=10 (written w there, where k counts the pieces), the table and the domain base

S⁢(j) :=𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁⁢(z.cash:SinsemillaS,𝖨𝟤𝖫𝖤𝖮𝖲𝖯32⁢(j))(0≤j<2k),
Q⁢(D) :=𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁⁢(z.cash:SinsemillaQ,D)

for a byte string D, and the accumulator; it writes LE32⁢(j) for the four-byte encoding 𝖨𝟤𝖫𝖤𝖮𝖲𝖯32⁢(j). The Orchard instance adds the following (protocol specification, §“Sinsemilla Hash Function”).

  1. 1.

    The chunk bound c is the largest integer with 2c≤(p𝖵𝖾𝗌𝗍𝖺−1)/2; thus c=253, and a message has at most k⁢c=2530 bits.

  2. 2.

    Incomplete addition ∔ on ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌)∪{⊥} returns ⊥ if either operand is ⊥; for points it returns ⊥ in an exceptional case, when an operand is 𝒪 or the operands have equal x-coordinates (equal or opposite points), and their group sum otherwise (Math Guide, §“Explicit affine formulas”, Remark “Complete versus incomplete addition”).

  3. 3.

    For a byte string D and a bit string M of length at most k⁢c, let n:=⌈|M|/k⌉≤c, pad M with zero bits to n⁢k bits, split the result into k-bit pieces, and let mi be LEk−1 of the i-th piece, 1≤i≤n. Then

    𝖠𝖼𝖼0:=Q⁢(D),𝖠𝖼𝖼i:=(𝖠𝖼𝖼i−1∔S⁢(mi))∔𝖠𝖼𝖼i−1(1≤i≤n),

    and 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁𝖳𝗈𝖯𝗈𝗂𝗇𝗍⁢(D,M):=𝖠𝖼𝖼n. The output is ⊥ exactly when some incomplete addition meets an exceptional case.

  4. 4.

    The extracted hash is

    𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁⁢(D,M):=𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⊥⁢(𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁𝖳𝗈𝖯𝗈𝗂𝗇𝗍⁢(D,M))∈𝔽p𝖯𝖺𝗅𝗅𝖺𝗌∪{⊥}.
Construction 2.18 (Sinsemilla commitment and short commitment).

For a byte string D, a bit string M of length at most k⁢c and a trapdoor r∈𝔽p𝖵𝖾𝗌𝗍𝖺, let

M^:=𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁𝖳𝗈𝖯𝗈𝗂𝗇𝗍⁢(D∥-M,M),HD:=𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁⁢(D∥-r,ε).

Then, with complete group addition,

𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖢𝗈𝗆𝗆𝗂𝗍r⁢(D,M) :={M^+[r]⁢HDif ⁢M^≠⊥,⊥otherwise,
𝖲𝗁𝗈𝗋𝗍𝖢𝗈𝗆𝗆𝗂𝗍r⁢(D,M) :=𝖤𝗑𝗍𝗋𝖺𝖼𝗍ℙ⊥⁢(𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖢𝗈𝗆𝗆𝗂𝗍r⁢(D,M))∈𝔽p𝖯𝖺𝗅𝗅𝖺𝗌∪{⊥}

(protocol specification, §“Sinsemilla commitments”). The domain D is routed to the hash as D∥-M and to the blinding base as D∥-r with the empty message. The Crypto Guide constructs the commitment with a generic independent blinding generator (§“Sinsemilla: an algebraic hash-based commitment”, Construction “SinsemillaCommit”); the routing and the ⊥ case are the Orchard additions.

The unblinded 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁 is deterministic and therefore not hiding; 𝖲𝗁𝗈𝗋𝗍𝖢𝗈𝗆𝗆𝗂𝗍 is its blinded counterpart. Proposition 2.24 and Lemma 2.26 state the security of both.

Construction 2.19 (Orchard instances).

The Orchard protocol uses three Sinsemilla instances, each with one fixed message length per domain, all within c chunks (Table 4): 𝖬𝖾𝗋𝗄𝗅𝖾𝖢𝖱𝖧, a 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁 instance whose layout is given in §5.1; 𝖭𝗈𝗍𝖾𝖢𝗈𝗆𝗆𝗂𝗍, a 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖢𝗈𝗆𝗆𝗂𝗍 instance whose layout is given in Definition 4.4; and 𝖢𝗈𝗆𝗆𝗂𝗍𝗂𝗏𝗄, a 𝖲𝗁𝗈𝗋𝗍𝖢𝗈𝗆𝗆𝗂𝗍 instance defined next.

Instance Form Domain Message bits Chunks
𝖬𝖾𝗋𝗄𝗅𝖾𝖢𝖱𝖧 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁 z.cash:Orchard-MerkleCRH 10+2⋅255=520 52
𝖭𝗈𝗍𝖾𝖢𝗈𝗆𝗆𝗂𝗍 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖢𝗈𝗆𝗆𝗂𝗍 z.cash:Orchard-NoteCommit 2⋅256+64+2⋅255=1086 109
𝖢𝗈𝗆𝗆𝗂𝗍𝗂𝗏𝗄 𝖲𝗁𝗈𝗋𝗍𝖢𝗈𝗆𝗆𝗂𝗍 z.cash:Orchard-CommitIvk 2⋅255=510 51
Table 4: The Orchard Sinsemilla instances. Each domain hashes messages of the single length shown, of at most c=253 chunks of k=10 bits.
Definition 2.20 (The key commitment).

For x,y∈𝔽p𝖯𝖺𝗅𝗅𝖺𝗌 and 𝗋𝗂𝗏𝗄∈𝔽p𝖵𝖾𝗌𝗍𝖺,

𝖢𝗈𝗆𝗆𝗂𝗍𝗋𝗂𝗏𝗄𝗂𝗏𝗄⁢(x,y):=𝖲𝗁𝗈𝗋𝗍𝖢𝗈𝗆𝗆𝗂𝗍𝗋𝗂𝗏𝗄⁢(z.cash:Orchard-CommitIvk,LE255⁢(x)∥LE255⁢(y)),

a 510-bit message (protocol specification, §“Sinsemilla commitments”). Its output is ⊥ exactly when 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁𝖳𝗈𝖯𝗈𝗂𝗇𝗍⁢(z.cash:Orchard-CommitIvk-M,⋅) returns ⊥; it is 0 exactly when the commitment point is 𝒪 (Lemma 2.3); otherwise it is the x-coordinate of a non-identity point, an element of {1,…,p𝖯𝖺𝗅𝗅𝖺𝗌−1} and hence, since p𝖯𝖺𝗅𝗅𝖺𝗌<p𝖵𝖾𝗌𝗍𝖺, a non-zero Pallas scalar. The x-coordinates of non-identity points form a set of (p𝖵𝖾𝗌𝗍𝖺−1)/2 elements, by Lemma 2.4 and because a group of odd prime order has no point with y=0. The incoming viewing key of §3.2 is this instance applied to (𝖺𝗄,𝗇𝗄) with trapdoor 𝗋𝗂𝗏𝗄; the exclusion of the outputs 0 and ⊥ by key generation is stated there.

Remark 2.21 (Cost inside a proof).

Sinsemilla is used for its cost inside an arithmetic circuit with lookups, one table lookup and two incomplete additions over 𝔽p𝖯𝖺𝗅𝗅𝖺𝗌 per k-bit chunk (Crypto Guide, §“Sinsemilla: an algebraic hash-based commitment”, Remark “Why Sinsemilla exists: cost inside a proof”; Halo 2 Guide, §“The lookup argument” and §“From statement to circuit: arithmetisation in practice”), and its collision resistance reduces to discrete logarithms on Pallas together with 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 modelled as a random oracle, not to discrete logarithms alone.

Assumption 2.22 (Discrete logarithms on Pallas).

For every classical probabilistic polynomial-time algorithm, given a generator G of ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌) and [s]⁢G for s uniform in 𝔽p𝖵𝖾𝗌𝗍𝖺, the probability of outputting s is negligible (Crypto Guide, §“The discrete logarithm problem”, Definition “Discrete logarithm problem, DLP”, instantiated on Pallas; Math Guide, §“The elliptic-curve discrete logarithm problem”). Concretely, the best known classical attack costs about 2126 group operations (Crypto Guide, §“Instantiation on elliptic curves; the Pasta curves”, Proposition “The Pasta curves against the criteria”); the level is cited, not recomputed.

Lemma 2.23 (Relations among fixed generators).

Under Assumptions 2.8 and 2.22, no efficient algorithm outputs, except with negligible probability, distinct inputs of 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 with values P1,…,Pt and coefficients a1,…,at∈𝔽p𝖵𝖾𝗌𝗍𝖺, not all zero, with ∑i[ai]⁢Pi=𝒪.

Proof.

In the model of Assumption 2.8 a reduction receiving a challenge Y=[s]⁢G answers each new 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 input with [u]⁢G+[w]⁢Y for fresh uniform u,w∈𝔽p𝖵𝖾𝗌𝗍𝖺, a uniform point and hence distributed as the oracle’s answer. For every value of w exactly one u is consistent with the answer, so the w remain uniform and independent of the algorithm’s view. A relation ∑i[ai]⁢Pi=𝒪 gives c0+c1⁢s=0 with c1=∑iai⁢wi, which is non-zero except with probability 1/p𝖵𝖾𝗌𝗍𝖺, and then s=−c0⁢c1−1 (Crypto Guide, §“Pedersen vector commitments”, Theorem “Properties of the vector commitment”, proof; §“Hashing to a curve point”, Remark “Why NUMS generators are binding-safe”). □

Every later argument that ends in a non-trivial discrete-logarithm relation among values of 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 ends in this lemma.

Proposition 2.24 (Collision resistance of the Sinsemilla instances).

Consider an Orchard instance of Table 4 with message length l, hash domain D′ (z.cash:Orchard-MerkleCRH for 𝖬𝖾𝗋𝗄𝗅𝖾𝖢𝖱𝖧; D∥-M for a commitment instance with domain D) and, for a commitment instance, blinding base HD. Under Assumptions 2.22 and 2.8, no efficient algorithm outputs, except with negligible probability:

  1. (i)

    messages M,M′∈{0,1}l whose hash points P:=𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁𝖳𝗈𝖯𝗈𝗂𝗇𝗍⁢(D′,M) and P′:=𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁𝖳𝗈𝖯𝗈𝗂𝗇𝗍⁢(D′,M′) are not ⊥ and satisfy P=P′ with M≠M′, or P=−P′; hence, by Lemma 2.4, no M≠M′ with equal values of the extracted form 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁 other than ⊥;

  2. (ii)

    for a commitment instance, openings (M,r) and (M′,r′) in {0,1}l×𝔽p𝖵𝖾𝗌𝗍𝖺 whose commitments C:=𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖢𝗈𝗆𝗆𝗂𝗍r⁢(D,M) and C′:=𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖢𝗈𝗆𝗆𝗂𝗍r′⁢(D,M′) are not ⊥ and satisfy C=C′ with M≠M′, or C=−C′; hence no M≠M′ with equal values of 𝖲𝗁𝗈𝗋𝗍𝖢𝗈𝗆𝗆𝗂𝗍 other than ⊥;

  3. (iii)

    a message in {0,1}l on which 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁𝖳𝗈𝖯𝗈𝗂𝗇𝗍⁢(D′,⋅) returns ⊥, equivalently on which the 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁 or commitment form returns ⊥ for every trapdoor.

Each such output yields efficiently a non-trivial discrete-logarithm relation among Q⁢(D′), S⁢(0), …, S⁢(2k−1) and, in (ii), HD.

Proof.

The proof is by citation, with the Orchard steps made in place. The cited arguments are, in the Crypto Guide, §“Sinsemilla: an algebraic hash-based commitment”, Proposition “Collision resistance of Sinsemilla”, with the paragraph after it on the extracted coordinate and the fixed length, and Construction “SinsemillaCommit”; and the Security argument of the protocol specification, §“Sinsemilla Hash Function”: Lemma “An injectivity property for Sinsemilla”, the theorem “Collision resistance of SinsemillaHash and SinsemillaHashToPoint” with its note extending it to added terms with independent bases, which covers 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖢𝗈𝗆𝗆𝗂𝗍 and 𝖲𝗁𝗈𝗋𝗍𝖢𝗈𝗆𝗆𝗂𝗍, and the theorem that a ⊥ output of 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁𝖳𝗈𝖯𝗈𝗂𝗇𝗍 yields a non-trivial discrete-logarithm relation. These arguments write a non-⊥ output on the pieces m=(m1,…,mn) as

𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁𝖳𝗈𝖯𝗈𝗂𝗇𝗍⁢(D′,M)=[2n]⁢Q⁢(D′)+∑j=02k−1[χj⁢(m)]⁢S⁢(j), (1)

where χj⁢(m):=∑i=1n2n−i⁢δmi,j with δ the Kronecker delta, and with [r]⁢HD added for a commitment. Equal outputs on distinct messages give

∑j[χj⁢(m)−χj⁢(m′)]⁢S⁢(j)+[r−r′]⁢HD=𝒪,

non-trivial because m↦χ⁢(m) is injective. Opposite outputs give

[2n+1]⁢Q⁢(D′)+∑j[χj⁢(m)+χj⁢(m′)]⁢S⁢(j)+[r+r′]⁢HD=𝒪,

non-trivial because its coefficient on Q⁢(D′) is non-zero. An exceptional case at step i has the form [α]⁢𝖠𝖼𝖼i−1+S⁢(mi)=𝒪 with α∈{−1,1,2}; substituting (1) for 𝖠𝖼𝖼i−1 gives a relation with coefficient α⁢ 2i−1 on Q⁢(D′). For the hash forms the terms in HD are absent.

Three steps are made in place. (1) Each instance hashes one fixed length l per domain, and l is admissible: n≤c, with n=52, 109 and 51 (Table 4). Admissibility is exactly the hypothesis under which no coefficient wraps modulo p𝖵𝖾𝗌𝗍𝖺. Because 2n≤2c≤(p𝖵𝖾𝗌𝗍𝖺−1)/2, each difference χj⁢(m)−χj⁢(m′) has absolute value below 2n<p𝖵𝖾𝗌𝗍𝖺 and vanishes modulo p𝖵𝖾𝗌𝗍𝖺 only if it vanishes as an integer, so uniqueness of binary expansions makes χ injective; and 0<2n+1≤p𝖵𝖾𝗌𝗍𝖺−1 and 0<|α⁢ 2i−1|≤2n keep the coefficient on Q⁢(D′) non-zero. Padding to n⁢k bits is injective on messages of the fixed length l, so M≠M′ gives m≠m′. (2) By the definition of incomplete addition, an instance returns ⊥ exactly when some incomplete addition meets an exceptional case, the case the cited ⊥ theorem treats. An operand 𝒪 arises only if Q⁢(D′) or some S⁢(j) is 𝒪, itself a non-trivial relation, because an incomplete addition that meets no exceptional case never returns 𝒪. The commitment forms return ⊥ exactly when the point hash does, for every trapdoor, since the blinding addition is complete. (3) The generators Q⁢(D′),S⁢(0),…,S⁢(2k−1) and HD are values of 𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁 on pairwise distinct inputs (Table 2), so the lemma on relations among fixed generators excludes each relation except with negligible probability. The consequences for the extracted forms follow from Lemma 2.4: equal extracted values other than ⊥ come from equal or opposite points, which are the cases of (i) and (ii). □

Remark 2.25 (Fixed length).

The fixed-length hypothesis cannot be dropped. The point hash 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖧𝖺𝗌𝗁𝖳𝗈𝖯𝗈𝗂𝗇𝗍 zero-pads its input to a multiple of k bits, so for a message M whose length is not a multiple of k the messages M and M∥ 0 collide with no discrete-logarithm relation. The specification requires collision resistance only between inputs of one fixed length for a given domain (protocol specification, §“Sinsemilla Hash Function”), and every Orchard domain hashes a single length.

Lemma 2.26 (Hiding and binding of SinsemillaCommit).

Let D be a byte string and l≤k⁢c a message length.

  1. (i)

    Perfect hiding: if HD≠𝒪, then for every M∈{0,1}l with hash point M^≠⊥ and r uniform on 𝔽p𝖵𝖾𝗌𝗍𝖺 and independent of M, the commitment 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖢𝗈𝗆𝗆𝗂𝗍r⁢(D,M) is uniform on ℰ⁢(𝔽p𝖯𝖺𝗅𝗅𝖺𝗌); hence the distribution of neither it nor 𝖲𝗁𝗈𝗋𝗍𝖢𝗈𝗆𝗆𝗂𝗍r⁢(D,M), a fixed function of it, depends on M.

  2. (ii)

    Computational binding: under Assumptions 2.22 and 2.8, no efficient algorithm outputs, except with negligible probability, openings (M,r) and (M′,r′) with M≠M′ in {0,1}l whose commitments 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖢𝗈𝗆𝗆𝗂𝗍r⁢(D,M) and 𝖲𝗂𝗇𝗌𝖾𝗆𝗂𝗅𝗅𝖺𝖢𝗈𝗆𝗆𝗂𝗍r′⁢(D,M′) are equal and not ⊥.

Proof.

The lemma is the Crypto Guide’s Construction “SinsemillaCommit” (§“Sinsemilla: an algebraic hash-based commitment”) for the Orchard blinding base. (i) Since HD≠𝒪 and the group has prime order p𝖵𝖾𝗌𝗍𝖺, the map r↦[r]⁢HD is a bijection from 𝔽p𝖵𝖾𝗌𝗍𝖺 onto the group, so [r]⁢HD is uniform, and so is its translate by the fixed point M^ (Crypto Guide, §“The Pedersen commitment”, Theorem “Perfect hiding”). (ii) Two such openings give the first relation in the proof of Proposition 2.24, whose coefficient vector on the S⁢(j) is non-zero for n=⌈l/k⌉≤c by step (1) of that proof. The only Orchard addition is the blinding base HD=𝖦𝗋𝗈𝗎𝗉𝖧𝖺𝗌𝗁⁢(D∥-r,ε), whose input differs from those of Q⁢(D∥-M) and of every S⁢(j), since its domain separator ends in -r; the lemma on relations among fixed generators excludes the relation. The specification states the same properties, with hiding conditional on no ⊥ output (protocol specification, §“Sinsemilla commitments”). □