Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ZSA] Issuance Key Derivation update to match with ZIP 32 #72

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

vivek-arte
Copy link

This PR makes the changes to align with the change in notation for ZIP 32 done in zcash#908.

Copy link

netlify bot commented Oct 4, 2024

Deploy Preview for zcash-zips-qedit ready!

Name Link
🔨 Latest commit 5c62d53
🔍 Latest deploy log https://app.netlify.com/sites/zcash-zips-qedit/deploys/670069834213c400081dbc4e
😎 Deploy Preview https://deploy-preview-72--zcash-zips-qedit.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@vivek-arte vivek-arte changed the title Issuance Key Derivation update to match with ZIP 32 [ZSA] Issuance Key Derivation update to match with ZIP 32 Oct 6, 2024
Copy link

@PaulLaux PaulLaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one comment, not directly related to changes.


As in ZIP 32 for Orchard [#zip-0032-orchard-child-key-derivation]_, we only use hardened child key derivation for the issuance authorizing key.
We reuse the :math:`\mathsf{CDKsk}` function for Orchard child key derivation from ZIP 32.
- Return :math:`\mathsf{CKDh}^{\mathsf{Issuance}}((\mathsf{sk}_{par},\mathsf{c}_{par}), i)\!`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some inconsistency on lines 141-143: some items written with ' like account' but then ' is is omitted.
image

Copy link
Author

@vivek-arte vivek-arte Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To quote from BIP 43 (which is the notation ZIP 32 uses):

Apostrophe indicates that BIP32 hardened derivation is used.

The hardened derivation section from BIP 32 contains:

The normal child keys use indices 0 through $$2^{31} -1$$ . The hardened child keys use indices $$2^{31}$$ through $$2^{32}-1$$. To ease notation for hardened key indices, a number $$i_H$$ represents $$i+2^{31}$$.

So in BIP 43, $$i'$$ (with apostrophe) is used in place of the $$i_H$$.

coin_type and account are defined in their particular ways, but what is used in the path is the hardened version (with the MSB = 1). Hence the path has the apostrophe, but the definition does not.

This is consistent with the notation in ZIP 32 (see here and here).

@vivek-arte vivek-arte merged commit 993e6dc into zsa1 Oct 8, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants