}
print_header("R1CS ppzkSNARK Prover");
- r1cs_ppzksnark_proof<ppT> proof = r1cs_ppzksnark_prover<ppT>(keypair.pk, example.primary_input, example.auxiliary_input);
+ r1cs_ppzksnark_proof<ppT> proof = r1cs_ppzksnark_prover<ppT>(keypair.pk, example.primary_input, example.auxiliary_input, example.constraint_system);
printf("\n"); print_indent(); print_mem("after prover");
if (test_serialization)
template<typename ppT>
r1cs_ppzksnark_proof<ppT> r1cs_ppzksnark_prover(const r1cs_ppzksnark_proving_key<ppT> &pk,
const r1cs_ppzksnark_primary_input<ppT> &primary_input,
- const r1cs_ppzksnark_auxiliary_input<ppT> &auxiliary_input);
+ const r1cs_ppzksnark_auxiliary_input<ppT> &auxiliary_input,
+ const r1cs_ppzksnark_constraint_system<ppT> &constraint_system);
/*
Below are four variants of verifier algorithm for the R1CS ppzkSNARK.
#include <cassert>
#include <cstdio>
-#include "common/default_types/r1cs_ppzksnark_pp.hpp"
+#include "algebra/curves/alt_bn128/alt_bn128_pp.hpp"
#include "common/profiling.hpp"
#include "common/utils.hpp"
#include "relations/constraint_satisfaction_problems/r1cs/examples/r1cs_examples.hpp"
const bool test_serialization = true;
r1cs_example<Fr<ppT> > example = generate_r1cs_example_with_binary_input<Fr<ppT> >(num_constraints, input_size);
+ example.constraint_system.swap_AB_if_beneficial();
const bool bit = run_r1cs_ppzksnark<ppT>(example, test_serialization);
EXPECT_TRUE(bit);
TEST(zk_proof_systems, r1cs_ppzksnark)
{
- default_r1cs_ppzksnark_pp::init_public_params();
start_profiling();
- test_r1cs_ppzksnark<default_r1cs_ppzksnark_pp>(1000, 100);
+ test_r1cs_ppzksnark<alt_bn128_pp>(1000, 20);
}