File tree 26 files changed +1129
-4
lines changed 26 files changed +1129
-4
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2018 0kims association
3
+
4
+ This file is part of zksnark javascript library.
5
+
6
+ zksnark javascript library is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ zksnark javascript library is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18
+ */
19
+
1
20
exports . Circuit = require ( "./src/circuit.js" ) ;
2
21
exports . setup = require ( "./src/setup.js" ) ;
3
22
exports . genProof = require ( "./src/prover.js" ) ;
Original file line number Diff line number Diff line change 4
4
"description" : " zkSnark implementation in javascript" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
7
- "test" : " echo \" Error: no test specified \" && exit 1 "
7
+ "test" : " mocha "
8
8
},
9
9
"keywords" : [
10
10
" zksnark" ,
17
17
],
18
18
"author" : " Jordi Baylina" ,
19
19
"license" : " GPL-3.0" ,
20
+ "repository" : {
21
+ "type" : " git" ,
22
+ "url" : " git+https://github.com/iden3/zksnark.git"
23
+ },
20
24
"dependencies" : {
21
25
"big-integer" : " ^1.6.34" ,
22
26
"chai" : " ^4.1.2" ,
23
27
"eslint" : " ^5.3.0"
24
28
},
25
29
"devDependencies" : {
26
- "eslint-plugin-mocha" : " ^5.1.0"
30
+ "eslint-plugin-mocha" : " ^5.1.0" ,
31
+ "mocha" : " ^5.2.0"
27
32
}
28
33
}
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2018 0kims association
3
+
4
+ This file is part of zksnark javascript library.
5
+
6
+ zksnark javascript library is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ zksnark javascript library is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18
+ */
19
+
1
20
/* global BigInt */
2
21
const bigInt = require ( "big-integer" ) ;
3
22
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2018 0kims association
3
+
4
+ This file is part of zksnark javascript library.
5
+
6
+ zksnark javascript library is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ zksnark javascript library is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18
+ */
1
19
const bigInt = require ( "./bigint.js" ) ;
2
20
const assert = require ( "assert" ) ;
3
21
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2018 0kims association
3
+
4
+ This file is part of zksnark javascript library.
5
+
6
+ zksnark javascript library is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ zksnark javascript library is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18
+ */
1
19
const bigInt = require ( "./bigInt" ) ;
2
20
3
21
module . exports = calculateWitness ;
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2018 0kims association
3
+
4
+ This file is part of zksnark javascript library.
5
+
6
+ zksnark javascript library is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ zksnark javascript library is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18
+ */
1
19
const bigInt = require ( "./bigint.js" ) ;
2
20
3
21
const __P__ = bigInt ( "21888242871839275222246405745257275088548364400416034343698204186575808495617" ) ;
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2018 0kims association
3
+
4
+ This file is part of zksnark javascript library.
5
+
6
+ zksnark javascript library is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ zksnark javascript library is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18
+ */
1
19
const bigInt = require ( "big-integer" ) ;
2
20
3
21
const F1Field = require ( "./f1field" ) ;
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2018 0kims association
3
+
4
+ This file is part of zksnark javascript library.
5
+
6
+ zksnark javascript library is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ zksnark javascript library is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18
+ */
1
19
const fUtils = require ( "./futils.js" ) ;
2
20
3
21
class F2Field {
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2018 0kims association
3
+
4
+ This file is part of zksnark javascript library.
5
+
6
+ zksnark javascript library is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ zksnark javascript library is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18
+ */
1
19
const fUtils = require ( "./futils.js" ) ;
2
20
3
21
class F3Field {
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2018 0kims association
3
+
4
+ This file is part of zksnark javascript library.
5
+
6
+ zksnark javascript library is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ zksnark javascript library is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18
+ */
1
19
const bigInt = require ( "./bigint.js" ) ;
2
20
3
21
exports . mulScalar = ( F , base , e ) => {
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2018 0kims association
3
+
4
+ This file is part of zksnark javascript library.
5
+
6
+ zksnark javascript library is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ zksnark javascript library is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18
+ */
1
19
const fUtils = require ( "./futils.js" ) ;
2
20
3
21
class GCurve {
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2018 0kims association
3
+
4
+ This file is part of zksnark javascript library.
5
+
6
+ zksnark javascript library is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ zksnark javascript library is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18
+ */
19
+
1
20
/*
2
21
This library do operations on polinomials where their coefficients are in field F
3
22
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2018 0kims association
3
+
4
+ This file is part of zksnark javascript library.
5
+
6
+ zksnark javascript library is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ zksnark javascript library is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18
+ */
19
+
1
20
const BN128 = require ( "./BN128.js" ) ;
2
21
const PolField = require ( "./polfield.js" ) ;
3
22
const ZqField = require ( "./zqfield.js" ) ;
You can’t perform that action at this time.
0 commit comments