Closed ThomasPiellard closed 1 year ago
@ThomasPiellard Any update regarding this issue?
Hi @realuncle no currently the issue hasn't been fixed. I wonder if it's not better to directly enforce the Write() function in the mimc implementation to not accept anything which overflows r, the snark modulus. Otherwise if we pass a gigantic slice of []byte for instance it would force us to do the r-basis decomposition, which would be quite inefficient.
In the mimc implementations, this for loop
might create collision, as the modulus is not BlockSize long but usually shorter.
What should be done is to take the value in the buffer, decompose it base
p
wherep
is the size of the snark field, and encrypt each digit one after the other, using the previous hash as initial state.