lovesh/libsnark-playground

The output for the SHA256 preimage?

Opened this issue · 1 comments

Hi, I just found a problem with the application of SHA256 preimage verification. I run your code and change the input to different input byte value but the hash value stays the same, the output of the verification is always true (1). Is there something I missed? Could you please help me with this?

@fanghaos2014 Check the test-gadget.cpp. The output is the public parameter and not witness, so you should set_input_sizes and NOT call output.generate_r1cs_witness in your scenario.