I couldn't figure out how to turn assertions on so I also edited test_affine_verifier in zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark/examples/run_r1cs_gg_ppzksnark.tcc to print out the two results, and indeed they disagree.
You can see that the affine result's c1 is minus 1 times the regular verifier's result's c1, which since these values are unitary means they are inverse. So, it seems something is getting inverted somewhere it shouldn't be.
In short,
r1cs_gg_ppzksnark_affine_verifier_weak_IC
andr1cs_gg_ppzksnark_online_verifier_weak_IC
do not agree with each other.How to reproduce
The easiest way to see this is to edit
zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark/tests/test_r1cs_gg_ppzksnark.cpp
to use mnt6 as follows.I couldn't figure out how to turn assertions on so I also edited
test_affine_verifier
inzk_proof_systems/ppzksnark/r1cs_gg_ppzksnark/examples/run_r1cs_gg_ppzksnark.tcc
to print out the two results, and indeed they disagree.A clue as to what's going on
I had the two verifiers print out the
QAP
value (which they check againstgamma_ABC_g
from the verification key). The two are inverse to each other:r1cs_gg_ppzksnark_affine_verifier_weak_IC
r1cs_gg_ppzksnark_online_verifier_weak_IC
:You can see that the affine result's
c1
is minus 1 times the regular verifier's result'sc1
, which since these values are unitary means they are inverse. So, it seems something is getting inverted somewhere it shouldn't be.