From 243de7399d2871a3019bbb96784faa1e10e4281f Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Tue, 11 Aug 2020 19:50:08 +0100 Subject: [PATCH] ZIP 304: more cosmetics (math fonts). Signed-off-by: Daira Hopwood --- zip-0304.html | 16 +++++++++------- zip-0304.rst | 16 ++++++++-------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/zip-0304.html b/zip-0304.html index 832e2dda..7c5f6761 100644 --- a/zip-0304.html +++ b/zip-0304.html @@ -129,26 +129,26 @@ License: MIT \((\mathsf{ak}, \mathsf{nk}, \mathsf{ovk})\) from the expanded spending key.
  • Let - \(g_d = \mathsf{DiversifyHash}(d)\) + \(\mathsf{g_d} = \mathsf{DiversifyHash}(\mathsf{d})\) .
  • Let - \(cm = \mathsf{NoteCommit}^\mathsf{Sapling}_0(\mathsf{repr}_\mathbb{J}(\mathsf{g_d}), \mathsf{repr}_\mathbb{J}(\mathsf{pk_d}), 1)\) + \(\mathsf{cm} = \mathsf{NoteCommit}^\mathsf{Sapling}_0(\mathsf{repr}_\mathbb{J}(\mathsf{g_d}), \mathsf{repr}_\mathbb{J}(\mathsf{pk_d}), 1)\) .
  • Let - \(rt\) + \(\mathsf{rt}\) be the root of a Merkle tree with depth \(\mathsf{MerkleDepth}^\mathsf{Sapling}\) and hashing function \(\mathsf{MerkleCRH}^\mathsf{Sapling}\) , containing - \(cm\) + \(\mathsf{cm}\) at position 0, and \(\mathsf{Uncommitted}^\mathsf{Sapling}\) at all other positions.
  • Let \(path\) be the Merkle path from position 0 to - \(rt\) + \(\mathsf{rt}\) . 14
  • Let \(\mathsf{cv} = \mathsf{ValueCommit}_0(1)\) @@ -158,7 +158,7 @@ License: MIT
  • Let - \(nf = \mathsf{PRF}^\mathsf{nfSapling}_{\mathsf{repr}_\mathbb{J}(\mathsf{nk})}(\mathsf{repr}_\mathbb{J}(\mathsf{MixingPedersenHash}(\mathsf{cm}, 0)))\) + \(\mathsf{nf} = \mathsf{PRF}^\mathsf{nfSapling}_{\mathsf{repr}_\mathbb{J}(\mathsf{nk})}(\mathsf{repr}_\mathbb{J}(\mathsf{MixingPedersenHash}(\mathsf{cm}, 0)))\) .
  • Select a random \(α\) @@ -253,7 +253,9 @@ License: MIT

    The raw form of a ZIP 304 signature is \(\mathsf{nf}\,||\,\mathsf{rk}\,||\,zkproof\,||\,spendAuthSig\) , for a total size of 320 bytes.

    -

    When encoding a ZIP 304 signature in a human-readable format, implementations SHOULD use standard Base64 for compatibility with the signmessage and verifymessage RPC methods in zcashd. ZIP 304 signatures in this form are 428 bytes. The encoded form is the string 'zip304:' followed by the result of Base64-encoding 2 the raw form of the signature.

    +

    When encoding a ZIP 304 signature in a human-readable format, implementations SHOULD use standard Base64 for compatibility with the signmessage and verifymessage RPC methods in zcashd. ZIP 304 signatures in this form are 428 bytes. The encoded form is the string + \(\texttt{"zip304:"}\) + followed by the result of Base64-encoding 2 the raw form of the signature.

    Rationale

    diff --git a/zip-0304.rst b/zip-0304.rst index 83abd256..814df136 100644 --- a/zip-0304.rst +++ b/zip-0304.rst @@ -135,22 +135,22 @@ The signature is created as follows: - Derive the full viewing key :math:`(\mathsf{ak}, \mathsf{nk}, \mathsf{ovk})` from the expanded spending key. -- Let :math:`g_d = \mathsf{DiversifyHash}(d)`. +- Let :math:`\mathsf{g_d} = \mathsf{DiversifyHash}(\mathsf{d})`. -- Let :math:`cm = \mathsf{NoteCommit}^\mathsf{Sapling}_0(\mathsf{repr}_\mathbb{J}(\mathsf{g_d}), \mathsf{repr}_\mathbb{J}(\mathsf{pk_d}), 1)`. +- Let :math:`\mathsf{cm} = \mathsf{NoteCommit}^\mathsf{Sapling}_0(\mathsf{repr}_\mathbb{J}(\mathsf{g_d}), \mathsf{repr}_\mathbb{J}(\mathsf{pk_d}), 1)`. -- Let :math:`rt` be the root of a Merkle tree with depth +- Let :math:`\mathsf{rt}` be the root of a Merkle tree with depth :math:`\mathsf{MerkleDepth}^\mathsf{Sapling}` and hashing function - :math:`\mathsf{MerkleCRH}^\mathsf{Sapling}`, containing :math:`cm` at position 0, and + :math:`\mathsf{MerkleCRH}^\mathsf{Sapling}`, containing :math:`\mathsf{cm}` at position 0, and :math:`\mathsf{Uncommitted}^\mathsf{Sapling}` at all other positions. -- Let :math:`path` be the Merkle path from position 0 to :math:`rt`. [#merkle-path]_ +- Let :math:`path` be the Merkle path from position 0 to :math:`\mathsf{rt}`. [#merkle-path]_ - Let :math:`\mathsf{cv} = \mathsf{ValueCommit}_0(1)`. - This is a constant and may be pre-computed. -- Let :math:`nf = \mathsf{PRF}^\mathsf{nfSapling}_{\mathsf{repr}_\mathbb{J}(\mathsf{nk})}(\mathsf{repr}_\mathbb{J}(\mathsf{MixingPedersenHash}(\mathsf{cm}, 0)))`. +- Let :math:`\mathsf{nf} = \mathsf{PRF}^\mathsf{nfSapling}_{\mathsf{repr}_\mathbb{J}(\mathsf{nk})}(\mathsf{repr}_\mathbb{J}(\mathsf{MixingPedersenHash}(\mathsf{cm}, 0)))`. - Select a random :math:`α`. @@ -217,8 +217,8 @@ total size of 320 bytes. When encoding a ZIP 304 signature in a human-readable format, implementations **SHOULD** use standard Base64 for compatibility with the ``signmessage`` and ``verifymessage`` RPC methods in ``zcashd``. ZIP 304 signatures in this form are 428 bytes. The encoded form is -the string 'zip304:' followed by the result of Base64-encoding [#RFC4648]_ the raw form -of the signature. +the string :math:`\texttt{"zip304:"}` followed by the result of Base64-encoding [#RFC4648]_ +the raw form of the signature. Rationale =========