64 Commits

Author SHA1 Message Date
0xmad
0aea419a89 chore: update with upstream 2023-10-19 14:28:39 -05:00
isk
41f5895ef0 fix: replacing ffjavascript with forked @cryptkeeperzk/ffjavascript package 2023-10-19 13:57:31 -05:00
Xavier Pinsach
7164ec8779 Witness check cmd (#337)
* add wtns check tool

* add more info when checking

* remove false test

* add + detailed messages

* add check witness test & tutorial test workflow

* remove witness in tutorial.yml
2023-03-21 00:04:43 +01:00
Bhagi.eth
6995a118ca Update README.md (#327)
* Update README.md

* Update README.md
2023-03-10 11:22:04 +01:00
Jordi Baylina
5ef36ffd03 Add security note 2023-02-17 11:24:45 +01:00
Jordi Baylina
cf7b4abcb4 adjust README to FLONK 2023-02-10 19:18:36 +01:00
Xavier Pinsach
6555d901a7 Fflonk (#305)
This PR includes all the FFLONK implementation

* baby plonk added

* wip

* commands added

* fix babyplonk command calls

* refactor cmd calls

* WIP

* Add header babyplonk to zkey utils

* wip

* Wip baby plonk verifier

* Add baby plonk test

* babyplonk export verification keu aded

* wip

* refactor polynomial & add some tests

* refactor setup, extract a new class to process r1cs constraints

* improve polynomial.4T

* fix

* refactor setup

* refactor

* massive update

* Add comments to round1 and 2

* organize fflonk prover

* organize fflonk verifier

* Change format add a section for each sigma

* read sigma from each section

* add T0 polynomial computation

* mul_z transformed to a class

* add C1 polynomial computation

* add function to X^n to Polynomial class

* Add C2 polynomial computation

* typos

* added computeZ

* Add T1 polynomial computation

* T2 polynomial computation added

* Compute h1, h2, h3 and xi

* polynomial F added (wip)

* Improve comments in fflonk prover

* typo

* fix comments

* compute F(X) and L(X) polynomials added

* fflonk verifier added

* Remove QL, QR, QM, QO, QC, S1, S2 and S3 commitments in verification key and zkey because they are not used on either the verifier or the prover

* remove unused variables

* Fix in final pairing

* Add omega 3 and omega 4 in setup process and export vk process

* Add omega3 and omega4 to the prover&verifier

* omega3 and omega4 comments

* change folder name to fflonk

* fix proof messages

* change polynomial length getter to function

* change evalutions length getter to function

* dev

* fix error on sigma computings & increase ptau buffer

* fflonk setup memory improvements

* fflonk prover & verifier refactor

* wip fflonk exportcalldata & export solidity done, refactor fflonk prove and verifier

* wip

* fix r1(x) & r2(x) and refactor h1w3, h2w3 & h3w3 converted to arrays

* improve comments

* improve lagrange4

* refactoring polynomial lagrange4

* Add Lagrange polynomials interpolation methods (optimized and non optimized)

* Added polynomials methods: fromCoefficientsArray, divBy === eucledian division and changed method name fromBuffer to fromEvaluations

* Refactor polynomial.js to take in account when use BigBuffer or Uint8Array

* Add div by ZT's

* massive updates

* add polynomial zerofier test

* massive updates

* Move computation of 3th root of omega to fflonk_setup to setup

* fix: L polynomial computation

* fix: remove default parameter in evaluations

* Add logger to export verification key

* fix: several improvements

* Change evaluations.getEvaluation(i) from byte-based i parameter to index-based

* fix: first proof verified

* dev

* solidity verifier added and working with r1(y) and r2(y) inside the proof

* fflonk verifier in Solidity working

* Added zero knowledge and degree checking

* fix typo

* fix: save & load the exact SRS length string

* prover improvement

* fix: add zero knowledge

* Improve add batch inverse in lagrange polynomials computation

* wip develop part of the verifier developed in Solidity in Javascript to check if could work

* added beta version of the first fflonk verifier smart contract

* remove babyplonk references

* fix: Check if Ptau is big enough for the circuit

* remove polynomials and evakuations from memory when not used

* add fflonk tests suite

* Add fflonk full prove command

* Add readme documentation for fflonk

* fix typos

* fix: force to clean memory with globalThis.gc()

* fix: extract constant multiplication part outside of the loop for better performance

* perfomance: removed all the divisions in smart contract by sending a single evaluation from the prover and the rebuild the onverses using the Montgomery batched algorithm

* smart contract updated

* Refactor fflonk smart contract

* improve comments in smart contract

* Refactor lagrange interpolation. Specific lagrange from 4 and 6 points removed

* improve prover performance

* improve performance of the prover

* resolve conflict

* improve performance of the prover

* write fflonk tests into github action workflow tutorial.yml

* comment previous fflonk workflow

* Fix: load constraints dinamically

* fix dev

* add more comments in fflonk setup

* improve comments

* improve comments

* improve comments

* improve comments in setup process

* improve prompt comments in setup process

* dev

* change divZh() arguments, added domainSize

* dev

* fix coef.length by coef.byteLength

* fix dev

* dev

* fix dev

* add more messages

* Improve comments & add a new parameter in Evaluation::fromPolynomial to choose the extension size

* dev

* fflonk security issue fixed

* Add comments in fflonk_proer and fast divison and new method "fromPolynomial" to create a new Polynomial

* add w16 to setup and remove w3, w4 and w8

* CPolynomial added

* fix dev

* use CPolynomial class in setup and us multiexp from polynomial

* fix computeT1

* improve round 5

* fix r1cs processor

* fix r1cs process constraints

* adapt solidity verifier to new implementation

* remove unnecessary debug functions

* fix typo

* refactor computeF and computeL

* fix

* refactor computeF

* update package-lock.json
2023-02-10 17:12:08 +01:00
kirrya95
f8e1abcbae chore: Reword variable typo in example (#243) 2022-10-14 15:50:18 -07:00
Xavi Pinsach
e3bc0423bd Change node version on readme.md 2022-07-06 05:26:04 +02:00
Vivian Plasencia
2c5e04e3cc chore: Fix typo in README (#141) 2022-04-14 17:49:38 -07:00
Vivian Plasencia
ade62d90d7 chore: Fix typo in README (#140) 2022-04-14 17:49:19 -07:00
jose
2de46d5e0d Removing the witness check with snarkjs 2021-10-19 14:22:02 +02:00
jose
b10d6665f2 modifying the README.md for circom 2.0 2021-10-15 10:46:56 +02:00
Jose
89d9335158 (starting) to adapt README to new circom 2021-10-14 20:19:13 +02:00
Kobi Gurkan
236faa52ef fix readme for plonk 2021-05-31 20:38:51 +03:00
Jordi Baylina
38f9d6a284 Fix README typos 2021-05-31 13:40:51 +02:00
Jordi Baylina
b4f063b928 Merge branch 'plonk' 2021-05-31 13:21:37 +02:00
Jordi Baylina
577b3f3580 Plonk finished 2021-05-31 13:21:07 +02:00
Jordi Baylina
40cd0824d2 Add power of tau links and hashes 2021-05-24 09:45:59 +02:00
Jordi Baylina
2ce529beba Link to react example 2021-03-30 12:08:00 +02:00
Predrag Gruevski
d00aa4cec0 Update README.md to fix typos.
Just two instances of `s/contraints/constraints`.
2021-01-12 19:08:42 -05:00
Jordi Baylina
3bfab82d8b README with ptau file 2020-09-25 07:58:07 +02:00
Eduardo Antuña Díez
8927fe4a75 Added tests badges 2020-08-04 20:45:06 +02:00
Eduardo Antuña Díez
fa90a867d7 Add check snarkjs tutorial badge 2020-08-04 20:27:46 +02:00
Sacha Saint-Leger
ddf4ff1e5d Update README.md 2020-07-27 18:14:17 +02:00
Sacha Saint-Leger
74c8e3835c Update README.md 2020-07-27 18:11:21 +02:00
Sacha Saint-Leger
a611711d5b Update README.md
Minor edits
2020-07-27 18:05:54 +02:00
Jordi Baylina
f022621696 fix sectionIsEqual 2020-07-26 14:05:23 +02:00
Jordi Baylina
12ec77e9c3 Fixes in Readme and challenge word fix 2020-07-14 11:55:12 +02:00
yslcrypto
05883ed3fe edit 2020-07-14 01:42:04 +02:00
yslcrypto
00da4d4e2d edits 2020-07-14 01:39:04 +02:00
yslcrypto
97d56eab6d edits 2020-07-14 01:34:48 +02:00
yslcrypto
a370493d7e edits 2020-07-14 01:28:21 +02:00
yslcrypto
8b95c92281 edits + further resources + final words 2020-07-14 01:07:57 +02:00
yslcrypto
6156d52f9c edits 2020-07-14 00:53:21 +02:00
yslcrypto
c8de2363d2 edits 2020-07-14 00:40:00 +02:00
yslcrypto
2f5313faf2 edits 2020-07-14 00:18:25 +02:00
yslcrypto
787ae7586f edits 2020-07-13 23:59:41 +02:00
yslcrypto
9f985af23e edits 2020-07-13 23:46:51 +02:00
yslcrypto
23d088e046 add link 2020-07-13 23:43:39 +02:00
yslcrypto
f899dcdfcb add link 2020-07-13 23:42:20 +02:00
yslcrypto
bee9c70005 add clarifier 2020-07-13 23:40:06 +02:00
yslcrypto
4833f7c1da add telegram group 2020-07-13 23:35:57 +02:00
yslcrypto
7bafdfb4b0 first pass 2020-07-13 23:26:58 +02:00
yslcrypto
5791ded4d5 edits up to step 6: apply random beacon 2020-07-13 20:41:54 +02:00
yslcrypto
736db053b8 cp 2020-07-13 18:33:50 +02:00
Jordi Baylina
1d0691cb5d Fix readme 2020-07-13 09:05:25 +02:00
Jordi Baylina
b3ec4930ea solidity template dir 2020-07-13 08:37:21 +02:00
Jordi Baylina
acf2671835 deps 2020-07-13 08:10:55 +02:00
Jordi Baylina
4fcc0a3398 tutorial and many fixes 2020-07-13 07:21:03 +02:00