Update encodings for ik and issueAuthSig#31
Conversation
There was a problem hiding this comment.
Still, the intent of https://github.com/zcash/zips/pull/1053/files is not fully reflected from these changes.
We need an "encoding" step (a function to encode) to add the
and
the constant name should be
ZSA_BIP340_SIG_SCHEME = b'\0'
Also, The issuer should be properly represented here.
In addition, these changes also should be reflected in the code:
math:: \mathsf{AssetId} := (\mathsf{issuer}, \mathsf{assetDescHash})
and define their canonical encoding as
.. math:: \mathsf{EncodeAssetId}(\mathsf{AssetId}) = \mathsf{EncodeAssetId}((\mathsf{issuer}, \mathsf{assetDescHash})) := \mathtt{0x00} \,||\, \mathsf{issuer}\,||\,\mathsf{assetDescHash}
The associated constant name for this should be
ZSA_ASSETID_VERSION_BYTE = b'\0'
The Orchard implementation should mimic those changes
PaulLaux
left a comment
There was a problem hiding this comment.
Looks good,
In this PR:
allowed_choices = [
[False, False, False],
[False, False, True],
[True, False, False],
[True, False, True],
[True, True, False],
[True, True, True]
]
drop [False, False, True] - issuance without OrchardZSA bundle is not allowed.
Merge after fixing the in body comment.
For a subsequent PR we need:
-
Burns: Are we testing burns? I see
orchard_zsa_burn_field_bytes()but it is always empty, isn't it. Also, must enforce no duplicates and no zero value burn. -
We should create Reference note for first issuance of an Asset. Curently there is no referance to it.
-
We need ρ for IssueNotes: rho = DeriveIssuedRho(nf0,0, indexAction, indexNote)
If unclear, let's discuss in our meeting.
|
I think orchard_zsa_issuance_auth_sig.rs should be also updated (ik and sig must begin with 0x00) |
… issueAuthSig instead of just the values
… txid (to account for transparent inputs)
|
Implemented the suggestions in #31 (review) and also updated the
|
…es (#182) This PR makes the updates to the encoding of the issuance validating key and the issuance authorization signature, as done in the specification in zcash/zips#1042, along with the further updates in zcash/zips#1048 and zcash/zips#1053. The test vectors are updated in QED-it/zcash-test-vectors#31. --------- Co-authored-by: Constance Beguier <constance@qed-it.com>
This is a companion PR to QED-it/orchard#182. It makes the changes to the specification made in zcash/zips#1042, namely the addition of a
0x00byte to the start of the issuance validating key and the issuance authorization signature.