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 Answer 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.


  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")

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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