Skip to content

Commit bacdc71

Browse files
authored
Merge pull request #1275 from daira/zip-2005-drop-leadByte-from-hrcm
ZIP 2005: Improve security argument; drop leadByte and AssetBase from H^{rcm,Orchard}; commit to deployment option 1
2 parents 6c28d6f + 537c392 commit bacdc71

5 files changed

Lines changed: 492 additions & 241 deletions

File tree

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ written.
176176
<tr> <td>226</td> <td class="left"><a href="zips/zip-0226.rst">Transfer and Burn of Zcash Shielded Assets</a></td> <td>Draft</td> <td class="left"><a href="https://github.com/zcash/zips/issues/618">zips#618</a></td>
177177
<tr> <td>227</td> <td class="left"><a href="zips/zip-0227.rst">Issuance of Zcash Shielded Assets</a></td> <td>Draft</td> <td class="left"><a href="https://github.com/zcash/zips/issues/618">zips#618</a></td>
178178
<tr> <td><span class="reserved">228</span></td> <td class="left"><a class="reserved" href="zips/zip-0228.rst">Asset Swaps for Zcash Shielded Assets</a></td> <td>Reserved</td> <td class="left"><a href="https://github.com/zcash/zips/issues/776">zips#776</a></td>
179-
<tr> <td>230</td> <td class="left"><a href="zips/zip-0230.rst">Version 6 Transaction Format</a></td> <td>Draft</td> <td class="left"><a href="https://github.com/zcash/zips/issues/686">zips#686</a></td>
180179
<tr> <td>231</td> <td class="left"><a href="zips/zip-0231.md">Memo Bundles</a></td> <td>Draft</td> <td class="left"><a href="https://github.com/zcash/zips/issues/627">zips#627</a></td>
181180
<tr> <td>233</td> <td class="left"><a href="zips/zip-0233.md">Network Sustainability Mechanism: Removing Funds From Circulation</a></td> <td>Draft</td> <td class="left"><a href="https://github.com/zcash/zips/issues/922">zips#922</a></td>
182181
<tr> <td>234</td> <td class="left"><a href="zips/zip-0234.md">Network Sustainability Mechanism: Issuance Smoothing</a></td> <td>Draft</td> <td class="left"><a href="https://github.com/zcash/zips/issues/923">zips#923</a></td>
@@ -250,6 +249,7 @@ Withdrawn, Rejected, or Obsolete ZIPs
250249
<tr> <th>ZIP</th> <th>Title</th> <th>Status</th> </tr>
251250
<tr> <td><strike>210</strike></td> <td class="left"><strike><a href="zips/zip-0210.rst">Sapling Anchor Deduplication within Transactions</a></strike></td> <td>Withdrawn</td>
252251
<tr> <td><strike>220</strike></td> <td class="left"><strike><a href="zips/zip-0220.rst">Zcash Shielded Assets</a></strike></td> <td>Withdrawn</td>
252+
<tr> <td><strike>230</strike></td> <td class="left"><strike><a href="zips/zip-0230.rst">Withdrawn Version 6 Transaction Format</a></strike></td> <td>Withdrawn</td>
253253
<tr> <td><strike>254</strike></td> <td class="left"><strike><a href="zips/zip-0254.md">Deployment of the NU7 Network Upgrade (Withdrawn)</a></strike></td> <td>Withdrawn</td>
254254
<tr> <td><strike>313</strike></td> <td class="left"><strike><a href="zips/zip-0313.rst">Reduce Conventional Transaction Fee to 1000 zatoshis</a></strike></td> <td>Obsolete</td>
255255
<tr> <td><strike>1001</strike></td> <td class="left"><strike><a href="zips/zip-1001.rst">Keep the Block Distribution as Initially Defined — 90% to Miners</a></strike></td> <td>Obsolete</td>
@@ -316,7 +316,7 @@ Index of ZIPs
316316
<tr> <td>226</td> <td class="left"><a href="zips/zip-0226.rst">Transfer and Burn of Zcash Shielded Assets</a></td> <td>Draft</td>
317317
<tr> <td>227</td> <td class="left"><a href="zips/zip-0227.rst">Issuance of Zcash Shielded Assets</a></td> <td>Draft</td>
318318
<tr> <td><span class="reserved">228</span></td> <td class="left"><a class="reserved" href="zips/zip-0228.rst">Asset Swaps for Zcash Shielded Assets</a></td> <td>Reserved</td>
319-
<tr> <td>230</td> <td class="left"><a href="zips/zip-0230.rst">Version 6 Transaction Format</a></td> <td>Draft</td>
319+
<tr> <td><strike>230</strike></td> <td class="left"><strike><a href="zips/zip-0230.rst">Withdrawn Version 6 Transaction Format</a></strike></td> <td>Withdrawn</td>
320320
<tr> <td>231</td> <td class="left"><a href="zips/zip-0231.md">Memo Bundles</a></td> <td>Draft</td>
321321
<tr> <td>233</td> <td class="left"><a href="zips/zip-0233.md">Network Sustainability Mechanism: Removing Funds From Circulation</a></td> <td>Draft</td>
322322
<tr> <td>234</td> <td class="left"><a href="zips/zip-0234.md">Network Sustainability Mechanism: Issuance Smoothing</a></td> <td>Draft</td>

zips/zip-0226.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Abstract
4242
This ZIP (ZIP 226) proposes the Orchard Zcash Shielded Assets (OrchardZSA) protocol, in conjunction with ZIP 227 [#zip-0227]_. The OrchardZSA protocol is an extension of the Orchard protocol that enables the issuance, transfer and burn of custom Assets on the Zcash chain. The issuance of such Assets is defined in ZIP 227 [#zip-0227]_, while the transfer and burn of such Assets is defined in this ZIP (ZIP 226).
4343
While the proposed OrchardZSA protocol is a modification to the Orchard protocol, it has been designed with adaptation to possible future shielded protocols in mind.
4444

45-
This ZIP is defined relative to the Zcash protocol with the changes specified in ZIP 2005 [#zip-2005]_ applied. ZIP 2005 (Orchard Quantum Recoverability) is expected to deploy before any ZSA activation; the references in this document to $\mathsf{H^{rcm,Orchard}}$, $\mathsf{H^{\text{ψ},Orchard}}$, recoverable note plaintexts (lead byte $\mathtt{0x03}$), and related constructs are to be interpreted as defined by ZIP 2005's modifications to the protocol specification.
45+
This ZIP is defined relative to the Zcash protocol with the changes specified in ZIP 2005 [#zip-2005]_ applied. ZIP 2005 (Orchard Quantum Recoverability) is expected to deploy before any ZSA activation; the references in this document to $\mathsf{H^{rcm,Orchard}}$, $\mathsf{H^{\text{ψ},Orchard}}$, recoverable note plaintexts, and related constructs are to be interpreted as defined by ZIP 2005's modifications to the protocol specification.
4646

4747
Motivation
4848
==========
@@ -159,7 +159,7 @@ The nullifier is generated in the same manner as in the Orchard protocol §4.16
159159
The OrchardZSA note plaintext also includes the Asset Base $\mathsf{asset\_base} : \mathbb{B}^{[\ell_{\mathbb{P}}]}$ in addition to the components in the Orchard note plaintext [#protocol-notept]_.
160160
The explicit encoding of the note plaintext is provided in ZIP 230 [#zip-0230-orchard-note-plaintext]_.
161161

162-
When § 4.7.3 'Sending Notes (Orchard)' [#protocol-orchardsend]_ or § 4.8.3 'Dummy Notes (Orchard)' [#protocol-orcharddummynotes]_ are invoked directly or indirectly in the computation of $\text{ρ}$ and $\text{ψ}$ for an OrchardZSA note, $\mathsf{leadByte}$ MUST be set to $\mathtt{0x03}$.
162+
When § 4.7.3 'Sending Notes (Orchard)' [#protocol-orchardsend]_ or § 4.8.3 'Dummy Notes (Orchard)' [#protocol-orcharddummynotes]_ are invoked directly or indirectly in the computation of $\text{ρ}$ and $\text{ψ}$ for an OrchardZSA note, $\mathsf{leadByte}$ MUST be set to {{ZSALEADBYTE}}.
163163

164164
The explicit order of addition of the note commitments to the note commitment tree is specified in ZIP 227 [#zip-0227-note-commitment-order]_.
165165

@@ -392,11 +392,9 @@ The following requirements on wallets are specified and motivated in ZIP 230
392392
ZEC asset. For other consequences see ZIP 230.
393393

394394
* *All* wallets should be ready to receive funds in outputs of v6 transactions as soon
395-
as ZSAs activate — in particular to support decrypting recoverable note plaintexts
396-
(lead byte $\mathtt{0x03}$) [#zip-0230-note-plaintexts]_. The consequence of not doing so would
397-
be that funds sent to Orchard addresses of a wallet without this support could be
398-
temporarily inaccessible, until the wallet is upgraded to fully support v6 and to
399-
rescan outputs since v6 activation.
395+
as ZSAs activate. The consequence of not doing so would be that funds sent to Orchard
396+
addresses of a wallet without this support could be temporarily inaccessible, until
397+
the wallet is upgraded to fully support v6 and to rescan outputs since v6 activation.
400398

401399
Sighash modifications relative to ZIP 244 [#zip-0244]_
402400
------------------------------------------------------

zips/zip-0230.rst

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
::
22

33
ZIP: 230
4-
Title: Version 6 Transaction Format
4+
Title: Withdrawn Version 6 Transaction Format
55
Owners: Daira-Emma Hopwood <daira@jacaranda.org>
66
Jack Grigg <thestr4d@gmail.com>
77
Sean Bowe <ewillbefull@gmail.com>
@@ -11,7 +11,7 @@
1111
Original-Authors: Greg Pfeil
1212
Deirdre Connolly
1313
Credits: Ying Tong Lai
14-
Status: Draft
14+
Status: Withdrawn
1515
Category: Consensus
1616
Created: 2023-04-18
1717
License: MIT
@@ -35,6 +35,15 @@ The character § is used when referring to sections of the Zcash Protocol Specif
3535
Abstract
3636
========
3737

38+
.. warning::
39+
This ZIP has been obsoleted by ZIP 248 [#zip-0248]_, and will not be deployed. Transaction
40+
version number 6 is now defined by ZIP 248.
41+
42+
Occurrences of the note plaintext lead byte constant it introduced (originally $\mathtt{0x03}$)
43+
have been changed to "{{LEADBYTE}}", to clarify that this ZIP does not reserve that lead byte
44+
value, and to avoid confusion with the different specification of lead byte $\mathtt{0x03}$ in
45+
ZIP 2005 [#zip-2005]_.
46+
3847
This proposal defines a new Zcash peer-to-peer transaction format, which supports the
3948
changes being deployed in Network Upgrade 7 [#draft-arya-deploy-nu7]_. It follows the same design
4049
pattern as the v5 transaction format [#zip-0225]_.
@@ -46,7 +55,7 @@ Motivation
4655
The OrchardZSA protocol requires serialized data elements that are distinct from
4756
any previous Zcash transaction. Since ZIP 244 was activated in NU5, the
4857
v5 and later serialized transaction formats are not consensus-critical.
49-
Thus, this ZIP defines format that can easily accommodate future extensions,
58+
Thus, this ZIP defines a format that can easily accommodate future extensions,
5059
where elements or a given pool are kept separate.
5160

5261

@@ -487,11 +496,11 @@ An issuance note description, ``IssueNoteDescription`` contains the following fi
487496
Note Plaintexts
488497
---------------
489498

490-
New note plaintext formats using lead byte $\mathtt{0x03}$ are introduced for
499+
New note plaintext formats using lead byte {{LEADBYTE}} are introduced for
491500
Sapling and Orchard, in order to support memo bundles and (for Orchard) ZSAs and
492501
quantum recoverability.
493502

494-
The $\mathsf{leadByte}$ MUST be $\mathtt{0x03}$ for all note plaintexts in v6
503+
The $\mathsf{leadByte}$ MUST be {{LEADBYTE}} for all note plaintexts in v6
495504
transactions.
496505

497506
Sapling Note Plaintext
@@ -546,8 +555,8 @@ The encodings of $\mathsf{d}$, $\mathsf{v}$, and $\mathsf{rseed}$ remain unchang
546555
Non-normative note: The *use* of the $\mathsf{rseed}$ in Orchard note decryption
547556
changes, but its type and encoding do not.
548557

549-
Rationale for requiring the lead byte to be 0x03 in v6
550-
``````````````````````````````````````````````````````
558+
Rationale for requiring the lead byte to be {{LEADBYTE}} in v6
559+
``````````````````````````````````````````````````````````````
551560

552561
It was decided to synchronize the changes to note encryption required for
553562
quantum recoverability, ZSA support, and memo bundles with a change to the
@@ -632,7 +641,7 @@ Support for receiving funds in v6 transactions
632641

633642
Zcash wallets MUST support parsing and processing v6 transactions by the time
634643
they are allowed on the network (scheduled for NU7 activation). This includes
635-
detecting and decrypting lead-byte $\mathtt{0x03}$ note plaintexts and memo
644+
detecting and decrypting lead-byte {{LEADBYTE}} note plaintexts and memo
636645
bundles.
637646

638647
The necessary changes to note decryption are specified in ZIP 231 [#zip-0231]_,
@@ -648,7 +657,7 @@ once that support is added.
648657
Rationale for being ready to receive v6 transactions at their activation
649658
````````````````````````````````````````````````````````````````````````
650659

651-
Note plaintexts with lead byte $\mathtt{0x03}$, which are required for Orchard
660+
Note plaintexts with lead byte {{LEADBYTE}}, which are required for Orchard
652661
notes in v6 transactions, can be sent to any Orchard address.
653662

654663
These notes use a different computation of $\mathsf{rcm}$ and $\text{ψ}$ from
@@ -660,7 +669,7 @@ attempting to non-conformantly use the note decryption algorithm for lead byte
660669
$\mathtt{0x02}$ would compute a different note commitment $\mathsf{cm}_x$ and
661670
would reject the note.
662671

663-
If wallets do not support v6 transactions and lead-byte $\mathtt{0x03}$ note
672+
If wallets do not support v6 transactions and lead-byte {{LEADBYTE}} note
664673
decryption immediately, then funds may be sent to them that they cannot receive.
665674
This affects both the existing Orchard functionality, and receiving non-native
666675
ZSA assets.
@@ -720,5 +729,5 @@ References
720729
.. [#zip-0301] `ZIP 301: Zcash Stratum Protocol <zip-0301.rst>`_
721730
.. [#zip-2002-motivation] `ZIP 231: Explicit Fees — Motivation <zip-2002.rst#motivation>`_
722731
.. [#zip-2005] `ZIP 2005: Quantum Recoverability <zip-2005.md>`_
723-
.. [#zip-2005-security-analysis] `ZIP 2005: Quantum Recoverability — Security Analysis <zip-2005.md#security-analysis>`_
732+
.. [#zip-2005-security-analysis] `ZIP 2005: Quantum Recoverability — Security Analysis <zip-2005.md#securityanalysis>`_
724733
.. [#draft-arya-deploy-nu7] `draft-arya-deploy-nu7: Deployment of the NU7 Network Upgrade <draft-arya-deploy-nu7.md>`_

zips/zip-0231.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ In § 5.5 ‘Encodings of Note Plaintexts and Memo Fields’ [^protocol-notepten
487487
>
488488
> $\begin{array}{|c|c|c|c|c|} \hline \raisebox{0.6ex}{\mathstrut} \text{8-bit } \mathsf{leadByte} & \text{88-bit } \mathsf{d} & \text{64-bit } \mathsf{v} & \text{256-bit } \mathsf{rseed} & \text{32-byte } \mathsf{K^{memo}} \\\hline \end{array}$
489489
>
490-
> * A byte 0x03, indicating this version of the encoding of a v6-onward
490+
> * A byte {{MBLEADBYTE}}, indicating this version of the encoding of a v6-onward
491491
> Sapling or Orchard note plaintext.
492492
> * 11 bytes specifying $\mathsf{d}$.
493493
> * 8 bytes specifying $\mathsf{v}$.
@@ -583,6 +583,11 @@ synchronization.
583583

584584
TBD
585585

586+
## Note plaintext lead byte assignment
587+
588+
The lead byte to be used for this proposal, denoted as {{MBLEADBYTE}} above, has
589+
not yet been assigned.
590+
586591

587592
# Rationale
588593

0 commit comments

Comments
 (0)