Skip to content

Commit 8e73b4c

Browse files
dairaclaude
andcommitted
ZIP 2005: Address review comments (define-order, explicit imports, displaymath, I2LEBSP).
* In § 4.7.2, define Derive_rcm^Sapling before H^esk,Sapling (rcm-then-esk ordering, matching § 4.7.3). * In § 4.8.2, add an import preamble for Derive_rcm^Sapling. * In § 4.8.3 and § 4.20.2/§ 4.20.3, replace the stale H^{rcm,Orchard} import with Derive_rcm^Orchard (and add Derive_rcm^Sapling to § 4.20.x), since the actual derivation goes through the helpers. * In the key-binding algebraic setup, replace the non-existent LEBSP with I2LEBSP_{l^Orchard} and lift the three named formulas to display math for readability. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d113645 commit 8e73b4c

1 file changed

Lines changed: 24 additions & 18 deletions

File tree

zips/zip-2005.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -741,14 +741,14 @@ Add the following notes:
741741

742742
Add after the definition of $\mathsf{leadByte}$:
743743

744-
> Define $\mathsf{H^{esk,Sapling}_{rseed}}(\_) = \mathsf{ToScalar^{Sapling}}\big(\mathsf{PRF^{expand}_{rseed}}([\mathtt{0x05}])\kern-0.1em\big)$.
745-
>
746-
> ($\mathsf{H^{esk,Sapling}}$ intentionally takes an argument that is unused.)
747-
>
748744
> Define $\mathsf{Derive\_rcm^{Sapling}_{rseed}}(\mathsf{leadByte}) = \begin{cases}
749745
> \mathsf{LEOS2IP}_{256}(\mathsf{rseed}),&\!\!\!\text{if } \mathsf{leadByte} = \mathtt{0x01} \\
750746
> \mathsf{ToScalar^{Sapling}}\big(\mathsf{PRF^{expand}_{rseed}}([\mathtt{0x04}])\kern-0.1em\big),&\!\!\!\text{if } \mathsf{leadByte} = \mathtt{0x02}
751747
> \end{cases}$
748+
>
749+
> Define $\mathsf{H^{esk,Sapling}_{rseed}}(\_) = \mathsf{ToScalar^{Sapling}}\big(\mathsf{PRF^{expand}_{rseed}}([\mathtt{0x05}])\kern-0.1em\big)$.
750+
>
751+
> ($\mathsf{H^{esk,Sapling}}$ intentionally takes an argument that is unused.)
752752
753753
Replace the lines deriving $\mathsf{rcm}$ and $\mathsf{esk}$ with
754754

@@ -794,6 +794,11 @@ with
794794
795795
#### § 4.8.2 ‘Dummy Notes (Sapling)’
796796

797+
Add
798+
799+
> Let $\mathsf{Derive\_rcm^{Sapling}}$ be as defined in
800+
> § 4.7.2 ‘Sending Notes (Sapling)’.
801+
797802
Replace the line deriving $\mathsf{rcm}$ with
798803

799804
> Derive $\mathsf{rcm} = \mathsf{Derive\_rcm^{Sapling}_{rseed}}(\mathsf{leadByte})$
@@ -802,7 +807,7 @@ Replace the line deriving $\mathsf{rcm}$ with
802807

803808
Insert before "The spend-related fields ...":
804809

805-
> Let $\mathsf{H^{rcm,Orchard}}$ and $\mathsf{H^{\text{ψ},Orchard}}$ be
810+
> Let $\mathsf{Derive\_rcm^{Orchard}}$ and $\mathsf{H^{\text{ψ},Orchard}}$ be
806811
> as defined in § 4.7.3 ‘Sending Notes (Orchard)’.
807812
808813
Replace the lines deriving $\mathsf{rcm}$ and $\text{ψ}$ with
@@ -821,9 +826,10 @@ in the inputs to $\mathsf{NoteCommit^{Orchard}}$.
821826

822827
For both § 4.20.2 and § 4.20.3, add before the decryption procedure:
823828

824-
> Let $\mathsf{H^{esk,Sapling}}$ be as defined in § 4.7.2 ‘Sending Notes (Sapling)’.
829+
> Let $\mathsf{Derive\_rcm^{Sapling}}$ and $\mathsf{H^{esk,Sapling}}$ be
830+
> as defined in § 4.7.2 ‘Sending Notes (Sapling)’.
825831
>
826-
> Let $\mathsf{H^{rcm,Orchard}}$, $\mathsf{H^{esk,Orchard}}$,
832+
> Let $\mathsf{Derive\_rcm^{Orchard}}$, $\mathsf{H^{esk,Orchard}}$,
827833
> and $\mathsf{H^{\text{ψ},Orchard}}$ be as defined in
828834
> § 4.7.3 ‘Sending Notes (Orchard)’.
829835
@@ -1434,20 +1440,20 @@ $\varepsilon_{\mathsf{kb}}(\mathcal{A}, q_{\mathsf{kb}}) \leq \frac{3\, q_{\math
14341440

14351441
*Algebraic setup.*
14361442
By § 5.4.1.10 “Sinsemilla commitments”,
1437-
$\mathsf{Commit^{ivk}_{rivk}}(\mathsf{ak}, \mathsf{nk}) =
1438-
\mathsf{Extract}_{\mathbb{P}}\big(M' + [\mathsf{rivk}]\, \mathcal{S}\big)$,
1439-
where
1440-
$\mathcal{S} := \mathsf{GroupHash}^{\mathbb{P}}(\texttt{“z.cash:Orchard-CommitIvk-r”}, \texttt{“”})$
1441-
is the rivk-randomization base and
1442-
$M' := \mathsf{SinsemillaHashToPoint}\big(\texttt{“z.cash:Orchard-CommitIvk-M”},\,
1443-
\mathsf{LEBSP}(\mathsf{ak}) \,\Vert\, \mathsf{LEBSP}(\mathsf{nk})\big)$
1444-
(see § 5.4.1.10 for the exact bit-sequence encoding).
1443+
$$\mathsf{Commit^{ivk}_{rivk}}(\mathsf{ak}, \mathsf{nk}) =
1444+
\mathsf{Extract}_{\mathbb{P}}\big(M' + [\mathsf{rivk}]\, \mathcal{S}\big),$$
1445+
where $\mathcal{S}$ is the rivk-randomization base
1446+
$$\mathcal{S} := \mathsf{GroupHash}^{\mathbb{P}}(\texttt{“z.cash:Orchard-CommitIvk-r”}, \texttt{“”}),$$
1447+
and
1448+
$$M' := \mathsf{SinsemillaHashToPoint}\big(\texttt{“z.cash:Orchard-CommitIvk-M”},\;
1449+
\mathsf{I2LEBSP}_{\ell^{\mathsf{Orchard}}_{\mathsf{base}}}(\mathsf{ak}) \,\Vert\,
1450+
\mathsf{I2LEBSP}_{\ell^{\mathsf{Orchard}}_{\mathsf{base}}}(\mathsf{nk})\big).$$
14451451
By expanding the Sinsemilla bases used inside $\mathsf{SinsemillaHashToPoint}$
14461452
as scalar multiples of $\mathcal{S}$, without loss of generality we have
14471453
$M' = [h(\mathsf{ak}, \mathsf{nk})]\, \mathcal{S}$ for a Pedersen-like
1448-
deterministic scalar hash $h$. Therefore
1449-
$\mathsf{Commit^{ivk}_{rivk}}(\mathsf{ak}, \mathsf{nk}) =
1450-
\mathsf{Extract}_{\mathbb{P}}\big([h(\mathsf{ak}, \mathsf{nk}) + \mathsf{rivk}]\, \mathcal{S}\big)$.
1454+
deterministic scalar hash $h$, so
1455+
$$\mathsf{Commit^{ivk}_{rivk}}(\mathsf{ak}, \mathsf{nk}) =
1456+
\mathsf{Extract}_{\mathbb{P}}\big([h(\mathsf{ak}, \mathsf{nk}) + \mathsf{rivk}]\, \mathcal{S}\big).$$
14511457
Domain separation in
14521458
the protocol's BLAKE2b instantiations ensures $h$ does not query
14531459
$\mathsf{H^{rivk\_ext}}$, $\mathsf{H^{rivk\_legacy}}$,

0 commit comments

Comments
 (0)