1

I am trying to experiment with ZoKrates library. When I use ./zokrates setup command, it warns me about gm16 malleability. So, I tried to change the proving scheme to gm17. But I keep getting the error "Backend gm17 not supported". Anyone faced this issue before? I am using MacOS. I see that gm17 requires libsnark. I checked in libsnark's github repo if they have instructions for activating libsnark in Mac. But, I don't see any instructions.

Thanks in advance for help.

1

GM 17 is the only backend that is supported by default. To enable GM16 (and PHGR13) you would have to build Zokrates from source using the appropriate flags.

cargo +nightly -Z package-features build --release --package zokrates_cli --features="libsnark"

There is a gotcha for installing this on Mac OS. OSX does not support Super Cop which is a build dependency for libsnark, so you would have to disable it in the build configuration.

https://github.com/Zokrates/ZoKrates/blob/f01fc7e627fb8c3f38774ec8bde6858ece8dbec6/zokrates_core/build.rs#L41

  let libsnark = cmake::Config::new(libsnark_source_path)
            .define("WITH_SUPERCOP", "OFF") ==> Add this line. 
            .define("WITH_PROCPS", "OFF")
            .define("CURVE", "ALT_BN128")
            .define("USE_PT_COMPRESSION", "OFF")
            .define("MONTGOMERY_OUTPUT", "ON")
            .define("BINARY_OUTPUT", "ON")
            .build();

Another thing to remember is that you need to add the right flag for the setup, generate proof , export verifier commands i.e --proving-scheme(or -s) gm17

./zokrates setup --proving-scheme gm17
./zokrates generate-proof -s gm17
./zokrates export-verifier -s gm17

Reference:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.