How to set up pb.primary_input() on the verifier side
wzjin2017 opened this issue · comments
weizhaojin commented
Hi, I am building a two-to-one hash function using this post. I generated proof and keypair.vk, and serialized them. However, on the verifier side, when I try to use bool verified = r1cs_ppzksnark_verifier_strong_IC<default_r1cs_ppzksnark_pp>(keypair.vk, pb.primary_input(), proof);
, I don't know how to set up this pb.primary_input(). I know this should be the y in y = Hash(x1, x2). Do I need to set up a new pb and input this y value using something like const libff::bit_vector y = libff::int_list_to_bits({0xe421ca1e, 0x71d16149, 0x8997ecc3, 0x6d05272a, 0xecc74cc9, 0xf5d071a5, 0x7e743987, 0x1bae758c}, 32);
?
Thanks in advance!