From f93e264834b90a1859d7aa017524ffc36b944f30 Mon Sep 17 00:00:00 2001 From: swasilyev Date: Mon, 29 Oct 2018 14:31:45 -0700 Subject: [PATCH 1/4] Renamed test_r1cs_gg_zok_ppzksnark.cpp -> test_r1cs_gg_ppzksnark_zok.cpp for consistency --- ...t_r1cs_gg_zok_ppzksnark.cpp => test_r1cs_gg_ppzksnark_zok.cpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark_zok/tests/{test_r1cs_gg_zok_ppzksnark.cpp => test_r1cs_gg_ppzksnark_zok.cpp} (100%) diff --git a/libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark_zok/tests/test_r1cs_gg_zok_ppzksnark.cpp b/libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark_zok/tests/test_r1cs_gg_ppzksnark_zok.cpp similarity index 100% rename from libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark_zok/tests/test_r1cs_gg_zok_ppzksnark.cpp rename to libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark_zok/tests/test_r1cs_gg_ppzksnark_zok.cpp From 86e0920b5b5fe2b13d84c6fe3733d8a51e87f516 Mon Sep 17 00:00:00 2001 From: swasilyev Date: Mon, 29 Oct 2018 14:35:16 -0700 Subject: [PATCH 2/4] Added missing default_r1cs_gg_ppzksnark_zok_pp typedef --- .../r1cs_gg_ppzksnark_zok_pp.hpp | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 libsnark/common/default_types/r1cs_gg_ppzksnark_zok_pp.hpp diff --git a/libsnark/common/default_types/r1cs_gg_ppzksnark_zok_pp.hpp b/libsnark/common/default_types/r1cs_gg_ppzksnark_zok_pp.hpp new file mode 100644 index 00000000..023ab4a5 --- /dev/null +++ b/libsnark/common/default_types/r1cs_gg_ppzksnark_zok_pp.hpp @@ -0,0 +1,22 @@ +/** @file + ***************************************************************************** + + This file defines default_r1cs_gg_ppzksnark_zok_pp based on the elliptic curve + choice selected in ec_pp.hpp. + + ***************************************************************************** + * @author This file is part of libsnark, developed by SCIPR Lab + * and contributors (see AUTHORS). + * @copyright MIT license (see LICENSE file) + *****************************************************************************/ + +#ifndef R1CS_GG_PPZKSNARK_ZOK_PP_HPP_ +#define R1CS_GG_PPZKSNARK_ZOK_PP_HPP_ + +#include + +namespace libsnark { +typedef libff::default_ec_pp default_r1cs_gg_ppzksnark_zok_pp; +} // libsnark + +#endif // R1CS_GG_PPZKSNARK_ZOK_PP_HPP_ From f077f222ede4c0aa177238c3dcdc12d203f29d04 Mon Sep 17 00:00:00 2001 From: swasilyev Date: Mon, 29 Oct 2018 14:37:04 -0700 Subject: [PATCH 3/4] Added r1cs_gg_ppzksnark_zok testing and profiling to CMake --- .gitignore | 2 ++ libsnark/CMakeLists.txt | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/.gitignore b/.gitignore index 1cfc1b2a..927f17cd 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,8 @@ libsnark/zk_proof_systems/ppzksnark/bacs_ppzksnark/profiling/profile_bacs_ppzksn libsnark/zk_proof_systems/ppzksnark/bacs_ppzksnark/tests/test_bacs_ppzksnark libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark/profiling/profile_r1cs_gg_ppzksnark libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark/tests/test_r1cs_gg_ppzksnark +libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark_zok/profiling/profile_r1cs_gg_ppzksnark_zok +libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark_zok/tests/test_r1cs_gg_ppzksnark_zok libsnark/zk_proof_systems/ppzksnark/r1cs_ppzksnark/profiling/profile_r1cs_ppzksnark libsnark/zk_proof_systems/ppzksnark/r1cs_ppzksnark/tests/test_r1cs_ppzksnark libsnark/zk_proof_systems/ppzksnark/ram_ppzksnark/examples/demo_ram_ppzksnark diff --git a/libsnark/CMakeLists.txt b/libsnark/CMakeLists.txt index 2e127940..d15147df 100644 --- a/libsnark/CMakeLists.txt +++ b/libsnark/CMakeLists.txt @@ -286,6 +286,17 @@ target_link_libraries( snark ) +add_executable(profile_r1cs_gg_ppzksnark_zok + EXCLUDE_FROM_ALL + + zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark_zok/profiling/profile_r1cs_gg_ppzksnark_zok.cpp +) +target_link_libraries( + profile_r1cs_gg_ppzksnark_zok + + snark +) + add_executable( profile_ram_ppzksnark EXCLUDE_FROM_ALL @@ -580,6 +591,18 @@ target_link_libraries( snark ) +add_executable( + zk_proof_systems_r1cs_gg_ppzksnark_zok_test + EXCLUDE_FROM_ALL + + zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark_zok/tests/test_r1cs_gg_ppzksnark_zok.cpp +) +target_link_libraries( + zk_proof_systems_r1cs_gg_ppzksnark_zok_test + + snark +) + add_executable( zk_proof_systems_ram_ppzksnark_test EXCLUDE_FROM_ALL From 65f40334b4e3f0b668bb457bc3870f700a88fa88 Mon Sep 17 00:00:00 2001 From: swasilyev Date: Mon, 29 Oct 2018 14:37:35 -0700 Subject: [PATCH 4/4] Fixed r1cs_gg_ppzksnark_zok_processed_verification_key --- .../ppzksnark/r1cs_gg_ppzksnark_zok/r1cs_gg_ppzksnark_zok.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark_zok/r1cs_gg_ppzksnark_zok.hpp b/libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark_zok/r1cs_gg_ppzksnark_zok.hpp index 32df9e49..5b3c662e 100644 --- a/libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark_zok/r1cs_gg_ppzksnark_zok.hpp +++ b/libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark_zok/r1cs_gg_ppzksnark_zok.hpp @@ -245,7 +245,8 @@ std::istream& operator>>(std::istream &in, r1cs_gg_ppzksnark_zok_processed_verif template class r1cs_gg_ppzksnark_zok_processed_verification_key { public: - libff::GT vk_alpha_g1; + libff::G1 vk_alpha_g1; + libff::G2 vk_beta_g2; libff::G2_precomp vk_gamma_g2_precomp; libff::G2_precomp vk_delta_g2_precomp;