-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor of ZIP 228 #128
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
Refactor of ZIP 228 #128
Conversation
✅ Deploy Preview for zcash-zips-qedit ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
PaulLaux
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work. Minor comments
zips/zip-0228.rst
Outdated
|
|
||
| We protect against the malleation of the ``timeLimit`` field by a malicious matching party by including the time limit inside the Action Group Hash that is signed using the Spend Authorization Signature (see more details in `Rationale for Time Limit`_). | ||
| The security of the Spend Authorization Signature and the collision resistance of the BLAKE2b-256 hash then ensures that the time limit remains the same as the one mandated by the creator of the Swap Order. | ||
| We protect against the malleation of the ``nAGExpiryHeight`` field by a malicious matching party by including the expiry height inside the Action Group Hash that is signed using the Spend Authorization Signature (see more details in `Rationale for Expiry Height`_). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it actually done for ZSA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, see ZIP 246: T.4a.v in the spec, and this line in the orchard implementation:
https://github.com/QED-it/orchard/blob/a02fdf1f873d58167887abe23a8a7e0b9c1a0a36/src/primitives/orchard_primitives_zsa.rs#L108
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed there is a change needed in the sentence though, need to replace Action Group Hash with v1 Signature Digest. Made this change
This PR goes through ZIP 228, and makes changes to reconcile the ZIP with the updates made in ZIP 226, ZIP 227, ZIP 230 and ZIP 246, for the NU7 protocol upgrade