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

zcash_proofs: Extract separate verifiers for proofs, spendAuthSigs, and bindingSig from SaplingVerificationContext #115

Open
str4d opened this issue May 29, 2020 · 2 comments

Comments

@str4d
Copy link
Contributor

str4d commented May 29, 2020

Currently, we have a single SaplingVerificationContext which we initialize, use to verify each Spend and Output description, and then call final_check to verify bindingSig. The reason for this workflow was that there is a data dependency on the entire transaction to fully verify it. However, this data dependency is only a blocker on bindingSig; the remaining components can be verified independently of the whole transaction (after computing sigHash), and also batch-verified.

Furthermore, the data dependency for bindingSig is effectively just on computing bvk. Once we have that, verification of bindingSig is equivalent to verifying a spendAuthSig.

We should extract the per-proof and per-signature verifiers from SaplingVerificationContext, so they can be run independently or batched. SaplingVerificationContext would continue to apply the various consensus checks on each spend and output, and final_check would return bvk, which could then be used to e.g. batch-verify bindingSig alongside the spendAuthSigs.

@str4d str4d changed the title Replace SaplingVerificationContext with separate verifiers for proofs, spendAuthSigs, and bindingSig zcash_proofs: Replace SaplingVerificationContext with separate verifiers for proofs, spendAuthSigs, and bindingSig May 29, 2020
@str4d str4d changed the title zcash_proofs: Replace SaplingVerificationContext with separate verifiers for proofs, spendAuthSigs, and bindingSig zcash_proofs: Extract separate verifiers for proofs, spendAuthSigs, and bindingSig from SaplingVerificationContext May 29, 2020
@str4d
Copy link
Contributor Author

str4d commented Dec 13, 2022

This is essentially how the orchard crate works, so we would follow its pattern here.

@daira
Copy link

daira commented Dec 19, 2023

Was this done? It is marked as blocking zcash/librustzcash#738 which is closed.

@nuttycom nuttycom transferred this issue from zcash/librustzcash Jan 2, 2024
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

2 participants