-
Notifications
You must be signed in to change notification settings - Fork 29
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
Comments
Never mind. It's in the README. |
Actually, the readme talks about qaptools. How would it work for zkinterface? |
Details would depend on which backend you use for zkinterface, but at a
high level it is similar to qaptools. For example, in the bellman case:
examples meilof$ PYSNARK_BACKEND=zkifbellman python3 cube.py 33
The cube of 33 is 35937
*** zkinterface: writing circuit
*** zkinterface: writing witness
*** zkinterface: writing constraints
*** zkinterface circuit, witness, constraints written to
'computation.zkif', size 656
This is done both by the prover and the trusted party. Computation.zkif
does not need to be distributed.
examples meilof$ cat computation.zkif | zkif_bellman setup
Written parameters into
/Users/meilof/Subversion/pysnark/examples/bellman-pk
This is done by the trusted party to generate key material bellman-pk,
which can then be distributed to prover and verifier.
examples meilof$ cat computation.zkif | zkif_bellman prove
Reading parameters from
/Users/meilof/Subversion/pysnark/examples/bellman-pk
Written proof into /Users/meilof/Subversion/pysnark/examples/bellman-proof
This is done by the prover. Proof can be distributed to verifier.
examples meilof$ cat computation.zkif | zkif_bellman verify
Reading parameters from
/Users/meilof/Subversion/pysnark/examples/bellman-pk
Reading proof from /Users/meilof/Subversion/pysnark/examples/bellman-proof
The proof is valid.
This is done by the verifier.
…On Thu, Jun 10, 2021 at 3:41 PM Glenn Xavier ***@***.***> wrote:
Actually, the readme talks about qaptools. How would it work for
zkinterface?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#24 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACAJUUZY6ZOE4ACU5A3CAX3TSC6JZANCNFSM46MVT75A>
.
--
Meilof
-- ***@***.***
|
And for bulletproofs, a trusted setup should not be needed...
Op vr 11 jun. 2021 om 23:45 schreef Meilof Veeningen ***@***.***>
Details would depend on which backend you use for zkinterface, but at a
high level it is similar to qaptools. For example, in the bellman case:
examples meilof$ PYSNARK_BACKEND=zkifbellman python3 cube.py 33
>
> The cube of 33 is 35937
>
> *** zkinterface: writing circuit
>
> *** zkinterface: writing witness
>
> *** zkinterface: writing constraints
>
> *** zkinterface circuit, witness, constraints written to
> 'computation.zkif', size 656
>
This is done both by the prover and the trusted party. Computation.zkif
does not need to be distributed.
> examples meilof$ cat computation.zkif | zkif_bellman setup
>
> Written parameters into
> /Users/meilof/Subversion/pysnark/examples/bellman-pk
>
This is done by the trusted party to generate key material bellman-pk,
which can then be distributed to prover and verifier.
> examples meilof$ cat computation.zkif | zkif_bellman prove
>
> Reading parameters from
> /Users/meilof/Subversion/pysnark/examples/bellman-pk
>
> Written proof into /Users/meilof/Subversion/pysnark/examples/bellman-proof
>
This is done by the prover. Proof can be distributed to verifier.
> examples meilof$ cat computation.zkif | zkif_bellman verify
>
> Reading parameters from
> /Users/meilof/Subversion/pysnark/examples/bellman-pk
>
> Reading proof from /Users/meilof/Subversion/pysnark/examples/bellman-proof
>
> The proof is valid.
>
This is done by the verifier.
On Thu, Jun 10, 2021 at 3:41 PM Glenn Xavier ***@***.***>
wrote:
> Actually, the readme talks about qaptools. How would it work for
> zkinterface?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#24 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACAJUUZY6ZOE4ACU5A3CAX3TSC6JZANCNFSM46MVT75A>
> .
>
--
Meilof
-- ***@***.***
--
Meilof
-- ***@***.***
|
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. |
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.
|
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?
|
Yes, I get the "multiple definition" issue. It looks like the zkinterface tool reads all |
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?
The text was updated successfully, but these errors were encountered: