Zokrates / ZoKrates

A toolbox for zkSNARKs on Ethereum
https://zokrates.github.io
GNU Lesser General Public License v3.0
1.83k stars 361 forks source link

MalformedVerifyingKey (zokrates_ark/src/groth16.rs:84:56) #1207

Closed shishirhome closed 2 years ago

shishirhome commented 2 years ago

Hi Team

Trying this example - https://zokrates.github.io/examples/sha256example.html and receiving the below error:

Performing verification... calledResult::unwrap()on anErrvalue: MalformedVerifyingKey (zokrates_ark/src/groth16.rs:84:56)

DSL for generating Proof:

`import "hashes/sha256/512bitPacked" as sha256packed;

def main(private field a, private field b, private field c, private field d) -> bool { field[2] h = sha256packed([a, b, c, d]); assert(h[0] == 263561599766550617289250058199814760685); assert(h[1] == 65303172752238645975888084098459749904); return true; }`

dark64 commented 2 years ago

Can you share on which compiler version this occurs and the verification key so we can examine in depth why it's malformed. It would also be helpful to share reproducible steps that end in this error.

shishirhome commented 2 years ago

Hi Darko, it got sorted, I was passing in the wrong number of private inputs. Thanks for your reply.