proof of poseidon preimage with any length

Hi, this is primarily o1js-related.

I was wondering whether there is an example to create a zk-program that proves there exists a preimage of variable length that has a given hash?
I know that is quite simple with a constant-sized input, but using the recursion and Poseidon.update it should also be possible for variable length by proving that the state is valid and then extracting the actual hash in the last step.
Is there some example code on this somewhere? I was unable to find it.

1 Like

Thank you for opening this Topic. I think you’ll get a quicker response if you raise this question on our Discord (Mina Protocol). I hope this helps you move forward!

1 Like