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

fix: improve prover consistency checks #98

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

AaronFeickert
Copy link
Contributor

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.

Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

ACK

@SWvheerden SWvheerden merged commit 09ac06c into tari-project:main Oct 25, 2023
6 checks passed
@AaronFeickert AaronFeickert deleted the prover-consistency branch October 25, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proof generation succeeds on invalid value
4 participants