-
Notifications
You must be signed in to change notification settings - Fork 270
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
Implementing aztec-nr library that constrains a use of fresh keys #5688
Comments
@benesjan: How do we constrain this if we aren't storing them at them moment? #5723 (comment) Also, how do we constrain it if its not in the registry and we only pass in one of the parts of the key_hash ? There is no way to derive if it's actually valid no ? In my eyes we need to have it in the registry to assert if it's fresh, OR to have access to the base derivation through all the inputs. A bit confused here |
Following scrum, have decided to make a lib fn to constrain only the nullifier keys (not the other 3), and if the key does not exist in registry, to only say that it does not exist as there is no way to constrain this w/out the full preimg |
resolves #5688 --------- Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
We need to have the ability to constrain the use of fresh keys from registry. Implement a
fresh-key
library (if you hate the name feel free to chime in with a new one) which will have the following functions:assert_fresh_master_nullifier_public_key(account: AztecAddress, npk_m)
assert_fresh_master_incoming_viewing_public_key(account: AztecAddress, npk_m)
assert_fresh_master_outgoing_viewing_public_key(account: AztecAddress, npk_m)
assert_fresh_master_tagging_public_key(account: AztecAddress, npk_m)
It's essential that these checks can be done without calling the canonical registry contract because we can't afford another kernel iteration --> it adds a few seconds of proving and these checks will be common. For this reason we will need directly read the
SharedMutable
of the registry contract. Here is a separate issue to implement that functionality.The text was updated successfully, but these errors were encountered: