Custom Modulus + External R1CS

Hello, firstly, thank you for this beautiful library!

I have two questions:

Firstly, I couldn’t figure out how to use mod operation with gnark between 2 frontend.Variable or converting circuit input to big.Int will also solve my problem. In circom:

Var xer = balance % r_prime;
What is the equivalent of this in the gnark circuit?

Secondly, I have written and compiled my circuit in circom, now I have my r1cs and witness. Is it possible to use gnark only as a prover and also can I generate my witness from my r1cs (or sym etc.) of circom circuit, using gnark?

Thank you!!


Hi please check Custom Modulus & External R1CS · ConsenSys/gnark · Discussion #595 · GitHub it is all covered there

1 Like