<p>The key words "MUST" and "MUST NOT" in this document are to be interpreted as described in RFC 2119. <aid="id1"class="footnote_reference"href="#rfc2119">1</a></p>
<p>The terms "consensus branch", "epoch", and "network upgrade" in this document are to be interpreted as described in ZIP 200. <aid="id2"class="footnote_reference"href="#zip-0200">2</a></p>
<p>This proposal defines changes to ZIP 244 <aid="id3"class="footnote_reference"href="#zip-0244">4</a> transaction id and signature digest algorithms to accommodate the inclusion of transparent Zcash extensions (TZEs) as defined in ZIP 222 <aid="id4"class="footnote_reference"href="#zip-0222">3</a>.</p>
<p>The tree of hashes defined by ZIP 244 <aid="id5"class="footnote_reference"href="#zip-0244">4</a> is re-structured to include a new branch for TZE hashes. The <code>tze_digest</code> branch is the only new addition to the tree; <code>header_digest</code>, <code>transparent_digest</code>, <code>sprout_digest</code>, and <code>sapling_digest</code> are as in ZIP 244:</p>
<p>A BLAKE2b-256 hash of all TZE inputs to the transaction, excluding witness data. For each TZE input, the following values are appended to this hash:</p>
<pre>* 2a.i. the field encoding of the CompactSize representation
of the TZE extension id for the input.
* 2a.i. the field encoding of the CompactSize representation
of the TZE mode for the input.</pre>
<p>The personalization field of this hash is set to:</p>
<p>The signature digest creation algorithm defined by ZIP 244 <aid="id7"class="footnote_reference"href="#zip-0244">4</a> is modified to include a new branch for TZE hashes. The <code>tze_digest</code> branch is the only new addition to the tree; <code>header_digest</code>, <code>transparent_digest</code>, <code>sprout_digest</code>, and <code>sapling_digest</code> are as in ZIP 244:</p>
<p>The personalization field of this hash is set to:</p>
<pre>"ZcashTxHash_" || CONSENSUS_BRANCH_ID</pre>
<p>This value must have the same personalization as the top hash of the transaction identifier digest tree, in order to make it possible to sign the transaction id in the case that there are no transparent inputs.</p>
* S.3b. ``extension_id`` (CompactSize field encoding)
* S.3c. ``mode`` (CompactSize field encoding)
* S.3d. ``payload`` (arbitrary bytes)
* S.3e. ``value`` of the output spent by this input (8-byte little endian)</pre>
<p>The personalization field of this hash is set to:</p>
<pre>"Zcash__TzeInHash"</pre>
</section>
</section>
</section>
<sectionid="authorizing-data-commitment"><h3><spanclass="section-heading">Authorizing Data Commitment</span><spanclass="section-anchor"><arel="bookmark"href="#authorizing-data-commitment"><imgwidth="24"height="24"src="assets/images/section-anchor.png"alt=""></a></span></h3>
<p>The tree of hashes defined by ZIP 244 <aid="id9"class="footnote_reference"href="#zip-0244">4</a> for authorizing data commitments is re-structured to include a new branch for TZE hashes. The <code>tze_digest</code> branch is the only new addition to the tree; <code>transparent_digest</code>, <code>sprout_digest</code>, and <code>sapling_digest</code> are as in ZIP 244:</p>