philsippl / circom-witness-rs

MIT License
54 stars 13 forks source link

supported prime numbers #7

Open NikZak opened 7 months ago

NikZak commented 7 months ago

I use circom with a specific prime number (secq256k1). Are all primes supported for a drop-in replacement of witness generation or need to expand this library to support different primes?

NikZak commented 7 months ago

Oh, I see that all mod operations are for single constant

M = 21888242871839275222246405745257275088548364400416034343698204186575808495617

So I guess this repo is for Bn-254 curve.

We may probably make this prime a param as it is done in circom