-
Notifications
You must be signed in to change notification settings - Fork 1
[BASE] Plonk #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vesselinux
wants to merge
161
commits into
develop
Choose a base branch
from
plonk
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[BASE] Plonk #49
Changes from all commits
Commits
Show all changes
161 commits
Select commit
Hold shift + click to select a range
bf4fe6c
added TAGS to .gitignore
cd4336c
added BLS12-381 curve to CMakeLists.txt
9e83435
added test for plonk in CMakeLists.txt
e7e208c
plonk: implemented common untility functions
46f89a2
plonk: implemented circuit description class
591ec92
plonk: implemented srs class
6ecf056
plonk: implemented prover class
55f0f12
plonk: implemented verifier class
82ddddf
plonk: added tests and test vector values
e9ebc12
plonk: added tests and test vector values; minor fixes to formatting …
efd9f9b
plonk: fixed formatting with clang-format-11
bfe869c
plonk: added updated version of libff with support for curve bls12-381
20dadc0
plonk: replaced all DEBUG guards with DEBUG_PLONK to avoid redeclarat…
357dffc
plonk: fixed unused variable compilation error
75e79f4
plonk: removed unused Lagrange basis input parameter from function pl…
056db0b
plonk: changed include-s of local files to be added with "" rather th…
6814299
plonk: moved libff and libfqfft include headers from test_plonk.cpp t…
43517b7
plonk: removed local alias of polynomial and replaced with the global…
514c3e6
plonk: removed the template parameter ppT from the plonk_example clas…
00bff4f
plonk: added missing #include <vector> to polynomial.hpp and included…
350f500
plonk: renamed NUM_HGEN to NUM_HSETS and fixed corresponding comment
4bd6244
plonk: removed an extra copy of f_points in plonk_interpolate_polynom…
f65b048
plonk: added empty line between all class members for improved readab…
9286c7d
plonk: moved function plonk_curcuit_description_from_example to test_…
fcb19b2
plonk: added the maximum degree of the monomials in the usrs to be an…
f91823e
plonk: removed macro MAX_DEGREE specifying the maximum monomial degre…
b1792f8
plonk: added constructor to structure circuit_t
5aa5d20
plonk: added clarification of the purpose of the circuit_t strcuture …
d333ca9
plonk: removed unused function check_field_element
7bf8843
plonk: improved efficiency in the computation of the roots of unity o…
24ad6de
plonk: corrected description of function plonk_compute_roots_of_unity…
9d35d55
plonk: added minor correction of "encrypted" to "encoded" in comments
94f8494
plonk: modified function plonk_compute_roots_of_unity_omega to alloca…
33a80c3
plonk: replaced function plonk_roots_of_unity_omega_to_subgroup_H wit…
f1409f8
plonk: fixed typo in comments
e04ecdf
plonk: removed extra output specifed in the Doxygen comments to plonk…
8d5ed16
plonk: replaced type of constant parameter nwitness from int to const…
341a12c
plonk: created a separate struct to contain all hashes of the communi…
42a979c
plonk: added the witness vlaues to be passed as an input to prover::c…
f71b60f
plonk: implemented unit tests for prover rounds 1,2,3,4,5.
a35d1cb
plonk: broke down test_plonk into three separate unit tests: test_plo…
7ff9c7f
plonk: added the hashes of the communication transcript (challenges a…
4f7f908
plonk: implemented unit tests for verifier steps 1-12
49d652d
plonk: moved all constructors from the *.hpp files to the correspondi…
61ebc3c
plonk: renamed plonk.* to utils.* to better reflect the content of th…
a281e27
plonk: renamed plonk_multiplicative_subgroups_H_k1H_k2H to plonk_comp…
51439d1
plonk: removed obsolete function plonk_interpolate_over_lagrange_basis
30b026a
plonk: removed exit(EXIT_FAILURE) in several exception handles so tha…
eefca7e
plonk: modified functions plonk_permute_subgroup_H and plonk_compute_…
bd6084d
plonk: renamed input parameter n of plonk_compute_permutation_polynom…
e589920
plonk: fixed typo in comments
6b2d65d
plonk: fixed multiple input parameters to prover functions to be pass…
2d50edf
plonk: corrected comment
a6dbb31
plonk: added missing reference to the reference Python implementation…
ec7c826
plonk: modified plonk_verifier<ppT>::step_four() to directly pass the…
533cc49
plonk: removed check that we are on the BLS12-381 in view of the fact…
a5de10c
plonk: remove all all try-catch clauses and let the caller handle the…
d20f7ca
plonk: fixed functions plonk_compute_accumulator and plonk_compute_se…
dd32274
plonk: removed storing the pre-computed Lagrange basis as part of the…
54a368d
plonk: added the libfqfft domain parameter as part of the srs. corres…
50621cf
plonk: added the 0-th Lagrange basis polynomial in the SRS instead of…
da267da
plonk: removed unused function plonk_compute_lagrange_basis()
031a300
plonk: updated depedent library libff to latest version
4fdd45e
plonk: move print_vector function to libff (cf. Issue https://github.…
9a52cf8
plonk: updated libff from 6dee67e to f9a588c in order to include the …
bc56a63
plonk: prepended explicitly libff:: to every call to print_vector whi…
915015d
plonk: replaced structure transcript_hash_t with class transcript_has…
4c66677
plonk: implementation of transcript hasher, addressing issue #56 and …
73ff038
plonk: moved the initialisation of the array of expected hash values …
8d6494d
plonk: removed catching the invalid size exception within the get_has…
24f3ae7
plonk: removed computation of the challenge u at the end of the prove…
c66787d
plonk: use std::count to check if the hasher buffer is of valid lengt…
8e3ac3b
plonk: removed doc comments /// from cpp and tcc files. left only in …
afdd4df
plonk: moved constructor of transcipt_hasher class as first method in…
c6396cf
plonk: added back the computation of the multipoint challenge u in th…
d001bd3
plonk: in transcript_hasher removed the private buffer variable as an…
a1f1806
plonk: moved function signature comments from .tcc to .hpp files only…
a9d084d
plonk: replaced test values in transcript_hasher with values from the…
1b6bb12
plonk: removed redundant debug info and unreachable debug checks. add…
0d85885
plonk: set transcript hasher constants alpha, beta, ... to type const…
c281281
plonk: added the transcript_hasher class as an additional specializat…
f92f12d
plonk: created a new transcript_hasher.hpp file with just a comment t…
825d65c
plonk: replaced the checks over all valid buffer lengths in the trans…
23a6bb0
plonk: replaced challenge_str map with a vector. addresses https://gi…
f43ec83
plonk: combine two error checks that are functionally the same into o…
29ca79d
plonk: declared const challenge upon assignment in bls12_381_test_ve…
f314a57
plonk: removed redundant this-> in get_hash. addresses https://github…
b8d85a2
plonk: created length and challenge arrays as const members of class …
af0d012
plonk: amended comments to transcript hasher code according to sugges…
89c91f6
plonk: replaced while loop in get_hash with for loop; assert-ed that …
75176fe
plonk: renamed example.tcc to example.cpp. added example.cpp and bls1…
b3a2fff
plonk: formatted example.cpp with latest version of clang-format-11
00729f5
plonk: removed dummy functions for verifier steps 1,2,3
f51b9eb
plonk: added support for BW6_761, BLS12_377 in CMakeLists.txt
5426fac
plonk: updated depends/libff to latest revision
b5278a6
plonk: added domain parameter as input to several functions in prover…
32d9b57
plonk: removed domain parameter from the srs class
aee3a95
plonk: added domain parameter as a new input to multiple functions as…
de332a8
plonk: added domain parameter as a new input to multiple functions in…
e5e3ddb
plonk: added domain parameter as an additional input parameter to sev…
a0ea6eb
plonk: edited input and output parameters in all headers to correspon…
5de0232
Merge pull request #70 from clearmatics/69-plonk-remove-domain-from-srs
dtebbs 19b52c3
plonk: updated plonk_circuit_description_from_example to accept only …
dc914ac
plonk: updated example circuit description in comments in example.hpp
5fae424
plonk: renamed public_input and public_input_index respectively to PI…
932d2a2
plonk: added wire indices of the public inputs to the srs. made corre…
562229c
plonk: removed PI polynomial from srs, circuit and example. it is now…
0069e9c
plonk: added the witness as an additional input to prover round_three…
65f377f
plonk: added the list of public input values as an additional input t…
36fb156
plonk: added the gates matrix as input to the circuit description ins…
5a674e3
plonk: modified plonk_srs_derive_from_usrs to accept usrs, gates matr…
f77c857
plonk: removed redundant circuit_t structure together with all relate…
c038bd3
plonk: hard-coded the values for k1 and k2 instead of loading them fr…
c94ce10
plonk: removed debug checks using the exampe class which is out of sc…
b887d21
plonk: changed variable name *_power_of_x to *_coordinate_x in PI pol…
e5f1ca7
plonk: changed variable name PI_wire_index to PI_wire_indices (https:…
1e68509
plonk: removed redundant debug info (https://github.com/clearmatics/l…
bec34ee
plonk: fixed comment to refer to the correct function name (https://g…
ae7eadc
plonk: removed obsolete macro DEBUG_PLONK (https://github.com/clearma…
e37f52f
plonk: renamed variable H_gen to H_prime to be consistent with the pa…
95c39a9
plonk: removed obsolete reference to circuit struct in comments
98be246
plonk: added more efficient allocation of vector secret_powers_g1 (ht…
5a453cf
plonk: removed unnecessary intermediate variable in the computation o…
023d789
plonk: changed signature of function plonk_gates_matrix_transpose to …
fe272b2
plonk: moved comment regarding optimisation in representing the ident…
7da9f61
plonk: clarified the origin of the constants k1,k2 in comments (https…
65ee138
plonk: changed variables to const (https://github.com/clearmatics/lib…
f689497
plonk: added minor edits to comments
ce9c25c
Merge pull request #91 from clearmatics/86-plonk-public-input-indices…
dtebbs 1ae5338
Merge pull request #84 from clearmatics/83-plonk-srs-from-matrix
dtebbs 0d3a5d4
plonk: added functions to generate constants k1,k2 (section 8.1 [GWC1…
56c73c4
plonk: removed size n of the subrgroup H as input to the k1,k2 functi…
97f1464
plonk: changed variable names in k1,k2 functions to more meaningful n…
b9748bc
plonk: removed redundant variable b_valid (https://github.com/clearma…
c0b31b9
plonk: clarified parts of the test code for the k1,k2 constants in co…
e7c72c1
plonk: added function to deterministically generate values for the co…
5b157e5
plonk: added unit tests for all curves for the function choosing the …
6d3fc29
plonk: edited comments to valid k1,k2 tests (https://github.com/clear…
82e39f9
plonk: added unit test for the randomized generation of constants k1,…
f8a0eaa
plonk: added validity assertion check in functions generating constan…
aed4aca
plonk: fixed several comments -- grammar + moving part of comments to…
a8d0771
plonk: added validity check 2 for constants k1,k2 to the generic unit…
e292c7d
plonk: moved comment inside function plus other minor edits (https://…
2aa6416
plonk: removed ppT template parameter from bls12-381-specific test fu…
eeecd71
plonk: edited sentences in comments to start with capital letter and …
faf0642
plonk: changed several variables to const type and removed an extra v…
8fe3f2d
Merge pull request #94 from clearmatics/70-plonk-setting-k1-k2
dtebbs 4ba7fde
plonk: added helper function for preparing the gates matrix (Issue ht…
b5c3d86
plonk: added assert for the size of the returned gates matrix (https:…
1c231c9
plonk: added proof and verfication for a simple circuit to test the c…
a8df063
plonk: added edits and clarifications in comments regarding preparati…
712e50d
plonk: moved the gates matrix check into a separate unit test (https:…
38d9067
plonk: added correction in the copy-constraints permutation, accordin…
960506b
plonk: added edits in comments
7fb0106
plonk: added a wrapper for plonk_srs_derive_from_usrs_custom_PI_indic…
f748170
plonk: addressed latest PR #97 comments: function renaming, comments …
f2a21f2
Merge pull request #97 from clearmatics/89-plonk-helper-prepare-matrix
dtebbs 26cfe45
Merge branch 'develop' into plonk
be86180
plonk: added dummy transcript hasher specialized for all curves; adde…
3603f95
plonk: removed unused method buffer_size (https://github.com/clearmat…
cf7910d
Merge pull request #107 from clearmatics/103-plonk-simple-circuit-all…
dtebbs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,3 +50,5 @@ libsnark/zk_proof_systems/zksnark/ram_zksnark/tests/test_ram_zksnark | |
|
|
||
| build | ||
| *~ | ||
| TAGS | ||
| .dir-locals.el | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule libff
updated
40 files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /** @file | ||
| ***************************************************************************** | ||
| * @author This file is part of libff, developed by Clearmatics Ltd | ||
| * (originally developed by SCIPR Lab) and contributors | ||
| * (see AUTHORS). | ||
| * @copyright MIT license (see LICENSE file) | ||
| *****************************************************************************/ | ||
|
|
||
| #ifndef LIBSNARK_TRANSCRIPT_HASHER_TRANSCRIPT_HASHER_HPP_ | ||
| #define LIBSNARK_TRANSCRIPT_HASHER_TRANSCRIPT_HASHER_HPP_ | ||
|
|
||
| // // interface for a common transcript_hasher class used to implement | ||
| // // functionality for hashing the communication transcript in ZK proof | ||
| // // systems under ./zk_proof_systems | ||
| // template<typename ppT> class transcript_hasher | ||
| // { | ||
| // public: | ||
| // transcript_hasher(); | ||
| // | ||
| // // add an Fr element to the transcript buffer for hashing | ||
| // void add_element(const libff::Fr<ppT> &element); | ||
| // // add the coordinates of a G1 curve point to the transcript buffer for | ||
| // // hashing | ||
| // void add_element(const libff::G1<ppT> &element); | ||
| // // add the coordinates of a G2 curve point to the transcript buffer for | ||
| // // hashing | ||
| // void add_element(const libff::G2<ppT> &element); | ||
| // // return the hash value of the communication transcript | ||
| // libff::Fr<ppT> get_hash(); | ||
| // }; | ||
|
|
||
| #endif // LIBSNARK_ZK_PROOF_SYSTEMS_PLONK_SRS_HPP_ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.