-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve prover consistency checks (#98)
When producing a proof, the prover does not currently check that the provided witness value is within the range specified by the statement bit length. It also does not check that the witness corresponds to valid openings of the statement commitments. This is not a security issue (the verifier will reject such an invalid proof), but it means that the caller may produce an invalid proof that does not return an error. This PR adds these checks, and ensures that the prover returns an error if they fail. It also adds unit tests exercising various failure modes. Closes #97.
- Loading branch information
1 parent
a47f511
commit 09ac06c
Showing
1 changed file
with
118 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters