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

Fully validate key rules before creating a key or account #84

Open
AArnott opened this issue Sep 23, 2023 · 0 comments
Open

Fully validate key rules before creating a key or account #84

AArnott opened this issue Sep 23, 2023 · 0 comments

Comments

@AArnott
Copy link
Collaborator

AArnott commented Sep 23, 2023

The Zcash protocol spec and ZIPs are full of provisions around if certain keys or calculations evaluate to 0 or ⊥, that the key is invalid. This suggests that not all randomly generated 32-byte seeds lead to valid Zcash keys or accounts.
While Nerdbank.Zcash calls into rust at certain points and the rust crates do include many or all of these checks, it's not currently guaranteed that all checks are run up front at account creation.

We should ensure that at key derivation time or import time, we derive every key that may be needed to support a particular account and ensure that they all succeed, or throw a meaningful exception indicating a new seed (or account index?) is required.

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

No branches or pull requests

1 participant