Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Will Kim
    @willKim19
    I've tried both master and 0.4.11 tags
    Thibaut Schaeffer
    @Schaeff
    @willKim19 if you want to build with gm17 enabled, you need to set WITH_LIBSNARK to 1 in your env
    this is only tested on linux
    and call ./build_release.sh
    Kevin Foesenek
    @keviinfoes
    Is there a write-up with a comparison between the proving-schemes (PGHR13, G16, GM17)?
    Kevin Foesenek
    @keviinfoes
    Thanks
    Matias Díaz
    @madiazp
    Hi all, Is there a way to make a deterministic proof? I mean, if I provide the same out, the same proving.key and the same witness I get the same proof all the time? or at least one part of the proof.
    Michael Connor
    @iAmMichaelConnor
    Hi all - I've got a few questions around the external libraries being imported in zokrates_core/src/imports.js, as it's been a while since I've looked at the ZoKrates repo:
    • I notice bellman is now being used to import a bellman/sha256round functionality and a packing/split functionality. Previously I remember libsnark being used to import similar functionalities. Is there a reason for the change?
    • I also notice a lot of the 'imports' for the standard library appear to be using code which has been solely written in .code syntax. E.g. the babyJubJub features and the Pedersen features seem to be contained entirely within zokrates_stdlib without any rust or c++ backend (i.e. without going through zokrates_core/src/imports.js). Is there a reason for this? Am I missing some of this functionality getting offloaded to the sapling_crypto library at some point? Does implementing solely in .code files not make for a 'slower' implementation?
    Matias Díaz
    @madiazp

    Hi all, Is there a way to make a deterministic proof? I mean, if I provide the same out, the same proving.key and the same witness I get the same proof all the time? or at least one part of the proof.

    never mind ,I answered myself

    Thibaut Schaeffer
    @Schaeff
    Hey @iAmMichaelConnor
    • the reason for bellman is that it works cross-platform and is pure Rust. We're trying to remove libsnark where possible.
    • No, it is our goal to write as much as possible in the DSL itself. The only thing that is offloaded right now is sha256_round until we get DSL support for u32. The implementation in stdlib may generate more constraints than sapling_crypto in some cases, but as long as the DSL is expressive enough, there's no reason we couldn't get the same number of constraints
    Also, the zokrates optimizer works way better for code written in the DSL than low level embeds
    Michael Connor
    @iAmMichaelConnor
    @Schaeff thanks for explaining - this all makes good sense!
    David Gabay
    @Dgabay2015
    Is it possible to discover what the compiled program is, using only the generated "out" file? I guess you could using the debugger?
    Sorry if this is a newbie question
    Thibaut Schaeffer
    @Schaeff
    out is serialized in binary, out.code is a human-readable equivalent
    what are you trying to achieve / prevent?
    David Gabay
    @Dgabay2015
    Without "out" you cannot compute-witness and thus cannot make a proof. Therefore, you need "out" as a prover. But, what if somebody who is not supposed to have "out" acquires it. Then, can he: 1) reproduce a verification contract to impersonate the verifier 2) derive the program from "out" to attempt to come up with the "secret knowledge" and make a proof?
    Thibaut Schaeffer
    @Schaeff
    The program (in this case, out) is always considered public. Isn't what you're saying like saying that because you know the sha256 algorithm you can compute arbitrary preimages?
    shubhamandro
    @shubhamandro
    which language does .code file use?
    Thibaut Schaeffer
    @Schaeff
    ZoKrates has its own DSL
    shubhamandro
    @shubhamandro
    where can i find the syntex ??
    Michael Connor
    @iAmMichaelConnor

    Does there always need to be a return statement in the ZoKrates DSL? Most examples return 1 and hence have function signature with ending -> (field):
    Taking the simple 'knowledge of square root' example, why would the following simplification not suffice?:

    def main(private field a, field b) -> ():
      a * a == b

    (This won't compile. I've made up the syntax -> ():for illustration. Although def main(private field a, field b): would be even simpler.)
    Surely the constraints of my proof are still satisfied without the return 1 statement? And (crucially) I would save myself some verification computational effort with a smaller input vector [b] (rather than input [b, 1]).

    Thibaut Schaeffer
    @Schaeff
    @iAmMichaelConnor you can return nothing with "return"
    Thibaut Schaeffer
    @Schaeff
    Michael Connor
    @iAmMichaelConnor
    @Schaeff so simple - yep -> (): in the function signature and return worked. Thanks!
    Asadullah Khalid
    @asad97akay_gitlab
    Hi guys I have recently developed an ZKP use case using Zokrates , but as recommend inside the documentation I used Zokrates inside the docker container. Can you please tell me if i can use Zokrates without the docker container ? and is there a version of libsnarks which is no longer OS-Specific ?
    Asadullah Khalid
    @asad97akay_gitlab
    And I also confirm if i can install zokrates directly inside linux or MacOS without any dependencies and without the use of docker ?
    Thibaut Schaeffer
    @Schaeff
    @asad97akay_gitlab https://zokrates.github.io/gettingstarted.html#installation check this out, one line installer if you want that.
    Asadullah Khalid
    @asad97akay_gitlab
    @Schaeff I know about that already , this is the installation for MacOs or Linux. But my question is regarding Windows. Inside windows is there any other method to install zokrates instead of installing and running ZoKrates inside the docker container.
    Thibaut Schaeffer
    @Schaeff
    check assets
    Asadullah Khalid
    @asad97akay_gitlab
    Okay thats amazing , thanks alot man
    so this means with zokrates-0.5.0-x86_64-pc-windows-gnu.tar.gz i can install and run ZoKrates inside windows without needing docker right ?
    And i dont need to install any other dependencies ?
    and i can just start using the ZoKrates commands ?
    @Schaeff ^
    Thibaut Schaeffer
    @Schaeff
    yeah, let us know if you're having issues
    Asadullah Khalid
    @asad97akay_gitlab
    Alright sure thing, thankyou so much :D
    Asadullah Khalid
    @asad97akay_gitlab
    @Schaeff Ill definitely let you know :D
    ucwong
    @ucwong
    will pack64 pack32 be supported in the future @Schaeff
    in stdlib
    shubhamandro
    @shubhamandro
    How does zokrates create prover key and verifier key with the help of random seed in the implementation?
    Asadullah Khalid
    @Iamaskh
    Hi guys how can i use benchmarking with ZoKrates ?
    I want to evaluate the running time for the compilation , setup phase and the proof generation and hash generation ?
    can anybody suggest anything ?
    Thibaut Schaeffer
    @Schaeff
    @ucwong not sure yet but is anything blocking you from implementing it yourself?
    Asadullah Khalid
    @Iamaskh
    when i run
    ./zokrates generate-proof -i out_preimage -j ZoKrates/target/debug/code/proofs/proof.json -p ZoKrates/target/debug/code/proving_key/proving.key -w witness_secret --proving-scheme gm17
    i get this error
    Generating proof...
    thread 'main' panicked at 'called Option::unwrap() on a None value', src/libcore/option.rs:347:21
    note: Run with RUST_BACKTRACE=1 environment variable to display a backtrace.
    fatal runtime error: failed to initiate panic, error 5
    Aborted
    Musadiqraees
    @Musadiqraees
    hello guys , i want to reduce smart contract execution time with zokrates. is this possible ?
    i am saving millions of record (hash) in a smart contract and want to reduce time for execution.