## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
Keshav Mundhra
@mundhrakeshav
Hey all, I am very new to Zero Knowledge Cr, I wanna implement sort of age verification using zokrates can anyone share any resource?
Cryptography*
Jay Logelin
@jlogelin
Thanks @Schaeff - I figured as much after messing around with zokrates last night.
Hey @mundhrakeshav Also a beginner here. Did you try this:
def main(private field a) -> (bool):
return a > 18
Keshav Mundhra
@mundhrakeshav
Hey @jlogelin got it
Thanks
Keshav Mundhra
@mundhrakeshav
Hey, how exactly can we implement a circuit so we can conduct a voting and keep identities of voters private.
Ayush
@AyushKaul
@Schaeff are there any utils for generating the merkle proofs, path digest, direction selector for snarks inputs?
Yasin Aktimur
@omgbbqhaxx
Hello is zokrares functions are visible or public?
def main(private field a) -> (bool):
return a > 18
for examplw when i use this main function is everyone can see that functions details?
Thibaut Schaeffer
@Schaeff
Not the source code, but a lower level version of the program is visible to all participants, yes.
Yasin Aktimur
@omgbbqhaxx
Eer Kai Jun
@eerkaijun
Hello everyone, I'm new to Zokrates. Have a question: when the prover has generated proof, zokrates will output a proof.json file. How do we pass the content of this proof.json to the deployed verifier smart contract? Do we need to manually extract the info of this file as the arguments to verifyTx?
Thibaut Schaeffer
@Schaeff
@eerkaijun have you tried zokrates print-proof -h?
Hello everyone! I am experimenting with ZoKrates using it as a
rust library. I can generate a proof ('G16::generate_proof()') but
I cannot find a way to extract the curve points a,b, and c from
the 'Proof' struct for further processing. All the fields
'proof', and 'a', 'b', 'c' in 'ProofPoints' are private. Is there
a way to obtain the points other than to serialize the whole proof to JSON
and then deserialize it and parse from strings? Thanks.
Thibaut Schaeffer
@Schaeff
Hey @sladecek right now it's the way to go, yes
Hello Thibaut, thank you for your answer. I tried to make the members public in a fork. The changes are quite minimal. Should I submit them as a pull request?
Thibaut Schaeffer
@Schaeff
Sure! We can discuss it there
smithsen
@smithsen
I have been following the instructions of libsnark in https://github.com/scipr-lab/libsnark I have been trying to install libsnark as a library, I did the symbolic linking, seems like the instructions there were wrong as to use ln -s /path rather than -L/path. I don't understand how to do the compiling to be honest. Any help or suggestions will be extremely useful.
smithsen
@smithsen

I have been following the instructions of libsnark in https://github.com/scipr-lab/libsnark I have been trying to install libsnark as a library, I did the symbolic linking, seems like the instructions there were wrong as to use ln -s /path rather than -L/path. I don't understand how to do the compiling to be honest. Any help or suggestions will be extremely useful.

Hey could anyone please give me some suggestions as to what am I doing wrong? That would be really great. @Schaeff please guide me to the next step.

Thibaut Schaeffer
@Schaeff
Hey @smithsen what platform are you on?
smithsen
@smithsen
Hey @Schaeff I am on linux system, ubuntu 20.04.
Thibaut Schaeffer
@Schaeff
Do you hit an error running cargo check in ZoKrates?
smithsen
@smithsen
Oh no, I am actually trying to run the library libsnark
Like using libsnark as a library
The thing is I want to use libsnark as a library but I am stuck at the aforementioned step. I understand that ZoKrates is potentially using libsnark as a lot of people did ask question concerning https://github.com/howardwu/libsnark-tutorial#compilation and so was wondering if I can get some help in the same
Thibaut Schaeffer
@Schaeff
The only thing I can suggest is for you to check out zokrates_core/build.rs, this is where we build libsnark
smithsen
@smithsen
Oh alright ! Thanks a lot, I will go through it now
ucwong
@ucwong
I encountered this of compiling " I/O Error: No file found at signatures/verifyEddsa" when I have already set the zokrates_home to stdlib, any suggestions?
echo \$ZOKRATES_HOME
/root/ZoKrates/zokrates_stdlib/stdlib
I updated latest 0.6.2
I compiled successfully before on 0.6.1
Thibaut Schaeffer
@Schaeff
Hey @ucwong thanks for this, we noticed a change was undocumented, now ZOKRATES_STDLIB should point to the stdlib folder. We'll correct that in the book
ucwong
@ucwong
@Schaeff Thanks a lot
smithsen
@smithsen
Hey everyone, I am trying to install Zokrates in my computer. Ubuntu 16.04. I did the installation as mentioned here https://zokrates.github.io/gettingstarted.html I made root.zok and then at the step zokrates compile -i root.zok it says that "zokrates: command not found". I am not sure where I went wrong. Please let me know. Thanks.
Thibaut Schaeffer
@Schaeff
@smithsen did you use the one-line installer?
smithsen
@smithsen

Oh yeah you mean "curl -LSfs get.zokrat.es | sh" ? Yes I did. It gives me "curl: (22) The requested URL returned error: 404 Not Found

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now" Not sure I know how to fix this

Thibaut Schaeffer
@Schaeff
Thanks for reporting this, we'll look into it
Thibaut Schaeffer
@Schaeff
@smithsen I tested with Ubuntu 16.04 x86_64 and couldn't reproduce the error, could you submit an issue with steps to reproduce if you're still hitting this?
smithsen
@smithsen
@Schaeff no it works. I realize that my ubuntu version was not accurate. I accidentally got another version of ubuntu 16.04 and hence was problem in almost everything. So the problem was with my OS and has been sorted. Thanks though. I have another question after doing the installation how do I test it? So, after I run the first line I see successful results but then in the subsection "Hello Zokrates", it says create a text file named root.zok, since it does not mention anything else, I simply do "gedit root.zok" and also I have mentioned explicit path previously according to the prompt I got while doing the installation. What I am confused is now once I do "zokrates compile -i root.zok" I get a prompt "zokrates: command not found". don't know what I am doing wrong. Can you please help me with the subsection Hello Zokrates on https://zokrates.github.io/gettingstarted.html It is not very clear to me how it works.
Thibaut Schaeffer
@Schaeff
if you run the one liner, it should tell you how to make sure the zokrates executable is in your PATH
smithsen
@smithsen
Yeah I did that. Alright, I will try it again and put here what error I got
Hi, yeah I was writing wrong path. I am sorry it works fully now. Thanks
smithsen
@smithsen
Hey, could you tell me how to get an estimate of timing for a circuit with different snark i.e. groth or pinochio ? Do I need to write a different code to see the timing or is there a tool in zokrates that can be used
smithsen
@smithsen

Hey, could you tell me how to get an estimate of timing for a circuit with different snark i.e. groth or pinochio ? Do I need to write a different code to see the timing or is there a tool in zokrates that can be used

@Schaeff @ucwong

Paul Etscheit
@petscheit
Hi, I have a quick question regarding passing u32 parameters in the compute-witness step. In a .zok program I'm able to define u32's in hex format, however, I'm unable to pass a u32 parameter in hex. Is there something I'm missing or do I have to convert the params to integers?
Paul Etscheit
@petscheit

Hey, could you tell me how to get an estimate of timing for a circuit with different snark i.e. groth or pinochio ? Do I need to write a different code to see the timing or is there a tool in zokrates that can be used

Not sure what you mean with timing of the circuit, but all ZoKrates programs are compatible with the different proving systems. You can simply switch them in the CLI and compare how they perform. Take a look here: https://zokrates.github.io/toolbox/proving_schemes.html

Thibaut Schaeffer
@Schaeff
@petscheit https://zokrates.github.io/toolbox/abi.html you can pipe your inputs as JSON with the --abi flag, with the -a flag you can only pass field elements (which for u32 comes down to what you said, convert to decimal)