-
I would like to compute inside a gnark circuit the commitment of a witness message x with some witness randomness r and verify that it matches with the commitment (computed outside the circuit and passed as a public parameter). I would like to check if my code corresponds to the correct way.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This should work. Please note that MiMC hash is not universal as we have defined a MiMC instance per curve. So you would have to ensure that the witness you compute is computed using same MiMC instance as is used inside the circuit. For debugging it would be better to have full minimal runnable program (including witness generation etc.) |
Beta Was this translation helpful? Give feedback.
This should work. Please note that MiMC hash is not universal as we have defined a MiMC instance per curve. So you would have to ensure that the witness you compute is computed using same MiMC instance as is used inside the circuit.
For debugging it would be better to have full minimal runnable program (including witness generation etc.)