poseidon in R1CS?
what should we do here? What version of poseidon does Circom implement?
https://github.com/zksecurity/noname/blob/main/src/backends/r1cs/builtin.rs#L19
// todo: impl this
pub fn poseidon(
compiler: &mut CircuitWriter<R1csBls12_381>,
vars: &[VarInfo<Fr>],
span: Span,
) -> Result<Option<Var<Fr>>> {
// dummy for now
unimplemented!()
}
https://github.com/iden3/circomlib/blob/cff5ab6288b55ef23602221694a6a38a0239dcc0/circuits/poseidon.circom
I think essentially this will come down to just providing these things as libraries, where a backend can provide its own library.
So kimchi's poseidon should be provided via something like use backend::kimchi which will panic if you're not using the kimchi backend, but will give you access to kimchi::poseidon. I thought I wrote that idea somewhere else but can't find it. I can't think of a more elegant way atm.
related to https://github.com/zksecurity/noname/issues/37