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

Trusted setup? #24

Open
gxavier38 opened this issue Jun 9, 2021 · 8 comments
Open

Trusted setup? #24

gxavier38 opened this issue Jun 9, 2021 · 8 comments

Comments

@gxavier38
Copy link
Contributor

gxavier38 commented Jun 9, 2021

I'm wondering how trusted setup works in PySNARK.

When I output a proof, say in Bellman with zkinterface, it outputs both the constraints and the witness. Does that mean that the setup is done by the prover and there is no external trusted setup?

@gxavier38
Copy link
Contributor Author

Never mind. It's in the README.

@gxavier38
Copy link
Contributor Author

Actually, the readme talks about qaptools. How would it work for zkinterface?

@gxavier38 gxavier38 reopened this Jun 10, 2021
@meilof
Copy link
Owner

meilof commented Jun 11, 2021 via email

@meilof
Copy link
Owner

meilof commented Jun 11, 2021 via email

@meilof
Copy link
Owner

meilof commented Jun 13, 2021

I changed the zkinterface backend a bit so that it now generates a zkif file that contains the witness and a file that does not contain the witness (which the trusted party can then freely distributed). I also updated the README.

@gxavier38
Copy link
Contributor Author

I'm having trouble using the new changes with the zkinterface tool. The zkInterface tool says the output violates the specification. Not entirely sure why.

PYSNARK_BACKEND=zkinterface python3 cube.py 10
cat computation.zkif | zkif validate

The statement is NOT COMPLIANT with the specification!
Violations:
- variable_0 was defined but not used.

@meilof
Copy link
Owner

meilof commented Aug 7, 2021

As you mentioned, this problem seems to only occur in programs which never use constants (which unfortunately happens to be the case for the cube.py). It may be a bit overkill to fix this in pysnark. Especially since at first glance it seems wrong that the zkinterface specification should demand this.

By the way, I get more error message, do you get these as well?

The statement is NOT COMPLIANT with the specification!
Violations:
- Multiple headers.
- Multiple definition of the value of the instance variable_1
- Multiple definition of the value of the instance variable_2
- variable_0 was defined but not used.

Error: "Found 4 violations."

@meilof meilof closed this as completed Aug 7, 2021
@meilof meilof reopened this Aug 7, 2021
@gxavier38
Copy link
Contributor Author

Yes, I get the "multiple definition" issue. It looks like the zkinterface tool reads all .zkif files in the working directory. If you remove either circuit.zkif or computation.zkif it fixes the issue.

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