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

Can now assign public variables in witness without triggering error for missing secret values, and force Prover execution with invalid solution #38

Merged
merged 4 commits into from Nov 5, 2020

Conversation

ThomasPiellard
Copy link
Collaborator

@ThomasPiellard ThomasPiellard commented Nov 3, 2020

  • frontend/circuit.go: ParseWitness(..) now becomes ParsePublicWitness() and ParseSecretWitness() to allow the verifier to use the Circuit{} interface for assigning public data (otherwise the verifier was forced to give all variables, including the private ones). (@mdj33 was it the issue that you mentionned?)

  • internal/backend/circuits/: modified the test circuits so that for each circuit there is a correct/bad input for the prover, and a common public input

  • integration_test.go: added a function to test gnark from the API instead of the CLI (it allows to test if parseWitness is correct, via groth16.Verify, and providing a Circuit interface)

  • backend/groth16/groth16.go: added two versions for proving: Prove(...) and ProveUnsafe(). The latter performs the multi exponentiation whether or not the proof is correct. It's useful for testing wrong circuits, to check if the groht16 verifier catches an error on the test circuits in internal/backend/circuits/ (previously, the integration tests used only the CLI, and in case of a wrong proof, the verifier read an empty proof and didn't actually check if the groth16 verification failed)

@CLAassistant
Copy link

CLAassistant commented Nov 3, 2020

CLA assistant check
All committers have signed the CLA.

ThomasPiellard and others added 3 commits November 4, 2020 15:34
…ParseWitness. If an input is not set, the errInputNotSet is caught when calling groth16.Prove/Verify
@gbotrel gbotrel changed the title fixes #37 Can now assign public variables in witness without triggering error for missing secret values, and force Prover execution with invalid solution Nov 5, 2020
@gbotrel gbotrel merged commit 0966f69 into master Nov 5, 2020
@gbotrel gbotrel deleted the hotfix/discard_secret branch November 5, 2020 00:19
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

Successfully merging this pull request may close these issues.

None yet

3 participants