-
I've written my 1st circuit to verify BLS12-377 signatures with BW6-761 curve, it worked. I have the provingKey, verifyingKey, and public input of the 1st circuit. But I got stuck writing the 2nd circuit using BN254 to verify the BW6 proof, there is no documentation and the playground example doesn't help, this is the core function
Params &circuit.InnerProof, &circuit.Vk, circuit.PublicInputs are the 1st circuits proof, and verification key converted to BN254 as below (the converted data): // bw6_761 to bn254 data The entire function to verify: `func demo1() {
} func main() { The error message:
Also, this is to verify the 1st circuit's proof in a main() function, I tried to write the 2nd circuit for it but it gives me straight error, I can't import /backend/groth16/bn254 to do any in-circuit computation. Can anybody write/explain to me a few lines of the correct in-circuit code or pseudo code, with the right import path, the right parameter set, the right data format? I searched up and down but there is little documentation, thanks a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, right now the in-circuit Groth16 verifier does not support verifying the random challenge we use for field emulation. There is some work before we can add it (using custom field to hash function in native Groth16 verifier and doing wrong-field mimc hashing in-circuit). We are right now working on it for PLONK and when we have the pieces it should be easy to add the support. |
Beta Was this translation helpful? Give feedback.
Hi, right now the in-circuit Groth16 verifier does not support verifying the random challenge we use for field emulation. There is some work before we can add it (using custom field to hash function in native Groth16 verifier and doing wrong-field mimc hashing in-circuit). We are right now working on it for PLONK and when we have the pieces it should be easy to add the support.
See #880, #879, #884.