You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: zip-0032.html
+59-11Lines changed: 59 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@
20
20
<sectionid="terminology">
21
21
<h2>Terminology</h2>
22
22
<p>The key words "MUST", "MUST NOT", and "MAY" in this document are to be interpreted as described in RFC 2119. <ahref="#rfc2119" id="id1" class="footnote_reference">1</a></p>
23
-
<p>"Jubjub" refers to the elliptic curve defined in <ahref="#sapling-spec" id="id2" class="footnote_reference">8</a> section 5.4.8.3.</p>
23
+
<p>"Jubjub" refers to the elliptic curve defined in <ahref="#sapling-jubjub" id="id2" class="footnote_reference">12</a>.</p>
24
24
</section>
25
25
<sectionid="abstract">
26
26
<h2>Abstract</h2>
@@ -49,14 +49,14 @@ <h2>Conventions</h2>
49
49
<li>LEOS2IP<sub>l</sub>(<em>S</em>) is the integer in range {0..2<sup>l</sup>-1} represented in little-endian order by the byte sequence <em>S</em> of length <em>l</em>/8.</li>
50
50
<li>I2LEBSP<sub>l</sub>(<em>k</em>) is the sequence of <em>l</em> bits representing <em>k</em> in little-endian order.</li>
51
51
<li>LEBS2OSP<sub>l</sub>(<em>B</em>) is defined as follows when <em>l</em> is a multiple of 8: convert each group of 8 bits in <em>B</em> to a byte value with the least significant bit first, and concatenate the resulting bytes in the same order as the groups.</li>
52
-
<li>repr<sub>𝕁</sub>(<em>P</em>) is the representation of the Jubjub elliptic curve point <em>P</em> as a bit sequence, defined in <ahref="#sapling-spec" id="id9" class="footnote_reference">8</a> section 5.4.8.3.</li>
52
+
<li>repr<sub>𝕁</sub>(<em>P</em>) is the representation of the Jubjub elliptic curve point <em>P</em> as a bit sequence, defined in <ahref="#sapling-jubjub" id="id9" class="footnote_reference">12</a>.</li>
53
53
<li>BLAKE2b-256(<em>p</em>, <em>x</em>) refers to unkeyed BLAKE2b-256 in sequential mode, with an output digest length of 32 bytes, 16-byte personalization string <em>p</em>, and input <em>x</em>.</li>
54
54
<li>BLAKE2b-512(<em>p</em>, <em>x</em>) refers to unkeyed BLAKE2b-512 in sequential mode, with an output digest length of 64 bytes, 16-byte personalization string <em>p</em>, and input <em>x</em>.</li>
<li>ToScalar(<em>x</em>) := LEOS2IP<sub>512</sub>(<em>x</em>) (mod <em>r</em><sub>𝕁</sub>), where <em>r</em><sub>𝕁</sub> is the order of the Jubjub large prime subgroup.</li>
57
-
<li>DiversifyHash(<em>d</em>) maps a diversifier <em>d</em> to a base point on the Jubjub elliptic curve, or to ⊥ if the diversifier is invalid. It is instantiated in <ahref="#sapling-spec" id="id10" class="footnote_reference">8</a> section 5.4.1.6.</li>
57
+
<li>DiversifyHash(<em>d</em>) maps a diversifier <em>d</em> to a base point on the Jubjub elliptic curve, or to ⊥ if the diversifier is invalid. It is instantiated in <ahref="#sapling-diversifyhash" id="id10" class="footnote_reference">10</a>.</li>
58
58
</ul>
59
-
<p>The following algorithm standardized in <ahref="#nist-sp-800-38g" id="id11" class="footnote_reference">10</a> is used:</p>
59
+
<p>The following algorithm standardized in <ahref="#nist-sp-800-38g" id="id11" class="footnote_reference">16</a> is used:</p>
60
60
<ul>
61
61
<li>FF1-AES256.Encrypt(<em>key</em>, <em>tweak</em>, <em>x</em>) refers to the FF1 encryption algorithm using AES with a 256-bit <em>key</em>, and parameters <em>radix</em> = 2, <em>minlen</em> = 88, <em>maxlen</em> = 88. It will be used only with the empty string "" as the <em>tweak</em>. <em>x</em> is a sequence of 88 bits, as is the output.</li>
62
62
</ul>
@@ -139,7 +139,7 @@ <h4>Deriving a child extended spending key</h4>
<h4>Deriving a child extended full viewing key</h4>
142
-
<p>Let 𝓖 be as defined in <ahref="#sapling-spec" id="id16" class="footnote_reference">8</a> section 5.4.6.1 and let 𝓗 be as defined in <ahref="#sapling-key-components" id="id17" class="footnote_reference">9</a>.</p>
142
+
<p>Let 𝓖 be as defined in <ahref="#sapling-spendauthsig" id="id16" class="footnote_reference">11</a> and let 𝓗 be as defined in <ahref="#sapling-key-components" id="id17" class="footnote_reference">9</a>.</p>
<li>Check whether <em>i</em> ≥ 2<sup>31</sup> (whether the child is a hardened key).
@@ -184,7 +184,7 @@ <h3>Sprout extended keys</h3>
184
184
</section>
185
185
<sectionid="sprout-helper-functions">
186
186
<h3>Sprout helper functions</h3>
187
-
<p>Let EncodeASK(<em>a</em><sub>sk</sub>) be the 32-byte encoding of <em>a</em><sub>sk</sub> in the raw encoding of a Sprout spending key (excluding lead bytes) as specified in <ahref="#sapling-spec" id="id18" class="footnote_reference">8</a> section 5.6.8.</p>
187
+
<p>Let EncodeASK(<em>a</em><sub>sk</sub>) be the 32-byte encoding of <em>a</em><sub>sk</sub> in the raw encoding of a Sprout spending key (excluding lead bytes) as specified in <ahref="#sprout-spending-keys" id="id18" class="footnote_reference">15</a>.</p>
188
188
<p>Let DecodeASK(<em>ASK</em>) be the result of clearing the 4 most significant bits of the first byte of <em>ASK</em>, and decoding the 32-byte result according to the inverse of EncodeASK.</p>
<h3>Sapling Full Viewing Key Fingerprints and Tags</h3>
249
-
<p>A "Sapling full viewing key fingerprint" of a full viewing key with raw encoding <em>FVK</em> (as specified in <ahref="#sapling-spec" id="id23" class="footnote_reference">8</a> section 5.6.7) is given by:</p>
249
+
<p>A "Sapling full viewing key fingerprint" of a full viewing key with raw encoding <em>FVK</em> (as specified in <ahref="#sapling-full-viewing-keys" id="id23" class="footnote_reference">14</a>) is given by:</p>
<p>A "Sprout address fingerprint" of a Sprout payment address with raw encoding <em>ADDR</em> (as specified in <ahref="#sapling-spec" id="id24" class="footnote_reference">8</a> section 5.6.3, including the lead bytes) is given by:</p>
258
+
<p>A "Sprout address fingerprint" of a Sprout payment address with raw encoding <em>ADDR</em> (as specified in <ahref="#sprout-shielded-addresses" id="id24" class="footnote_reference">13</a>, including the lead bytes) is given by:</p>
<td><ahref="https://github.com/zcash/zips/blob/master/protocol/protocol.pdf">Zcash Protocol Specification, Version 2018.0-beta-25 or later [Overwinter+Sapling]</a></td>
381
+
<td><ahref="protocol/protocol.pdf">Zcash Protocol Specification, Version 2019.0.8 or later [Overwinter+Sapling+Blossom]</a></td>
<td><ahref="https://github.com/zcash/zips/blob/master/protocol/protocol.pdf">Section 4.2.2: Sapling Key Components. Zcash Protocol Specification, Version 2018.0-beta-25 or later [Overwinter+Sapling]</a></td>
<td><ahref="https://dx.doi.org/10.6028/NIST.SP.800-38G">NIST Special Publication 800-38G -- Recommendation for Block Cipher Modes of Operation: Methods for Format-Preserving Encryption</a></td>
Let EncodeASK(*a*\ :sub:`sk`) be the 32-byte encoding of *a*\ :sub:`sk` in the raw encoding of a Sprout
268
-
spending key (excluding lead bytes) as specified in [#sapling-spec]_ section 5.6.8.
268
+
spending key (excluding lead bytes) as specified in [#sprout-spending-keys]_.
269
269
270
270
Let DecodeASK(*ASK*) be the result of clearing the 4 most significant bits of the first byte of *ASK*,
271
271
and decoding the 32-byte result according to the inverse of EncodeASK.
@@ -364,7 +364,7 @@ Sapling Full Viewing Key Fingerprints and Tags
364
364
----------------------------------------------
365
365
366
366
A "Sapling full viewing key fingerprint" of a full viewing key with raw encoding *FVK* (as specified
367
-
in [#sapling-spec]_ section 5.6.7) is given by:
367
+
in [#sapling-full-viewing-keys]_) is given by:
368
368
369
369
BLAKE2b-256("ZcashSaplingFVFP", *FVK*)
370
370
@@ -378,7 +378,7 @@ Sprout Address Fingerprints and Tags
378
378
------------------------------------
379
379
380
380
A "Sprout address fingerprint" of a Sprout payment address with raw encoding *ADDR* (as specified in
381
-
[#sapling-spec]_ section 5.6.3, including the lead bytes) is given by:
381
+
[#sprout-shielded-addresses]_, including the lead bytes) is given by:
382
382
383
383
BLAKE2b-256("Zcash_Sprout_AFP", *ADDR*)
384
384
@@ -481,7 +481,13 @@ References
481
481
.. [#bip-0044] `BIP 44: Multi-Account Hierarchy for Deterministic Wallets <https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki>`_
482
482
.. [#slip-0044] `SLIP 44: Registered coin types for BIP-0044 <https://github.com/satoshilabs/slips/blob/master/slip-0044.md>`_
483
483
.. [#bip-0173] `BIP 173: Base32 address format for native v0-16 witness outputs <https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki>`_
484
-
.. [#sapling-spec] `Zcash Protocol Specification, Version 2018.0-beta-25 or later [Overwinter+Sapling] <https://github.com/zcash/zips/blob/master/protocol/protocol.pdf>`_
485
-
.. [#sapling-key-components] `Section 4.2.2: Sapling Key Components. Zcash Protocol Specification, Version 2018.0-beta-25 or later [Overwinter+Sapling] <https://github.com/zcash/zips/blob/master/protocol/protocol.pdf>`_
484
+
.. [#sapling-spec] `Zcash Protocol Specification, Version 2019.0.8 or later [Overwinter+Sapling+Blossom] <protocol/protocol.pdf>`_
.. [#NIST-SP-800-38G] `NIST Special Publication 800-38G -- Recommendation for Block Cipher Modes of Operation: Methods for Format-Preserving Encryption <https://dx.doi.org/10.6028/NIST.SP.800-38G>`_
0 commit comments