1444 Commits

Author SHA1 Message Date
Nicholas Ward
50db118718 Secp256K1 curve (in progress) 2021-11-30 15:31:06 -08:00
Nicholas Ward
869a5860f4 Secp256K1 scalar field 2021-11-30 15:31:06 -08:00
Nicholas Ward
db464f739e merge 2021-11-30 15:31:06 -08:00
Nicholas Ward
ebce0799a2 initial curve_types and curve_adds 2021-11-30 15:31:06 -08:00
Nicholas Ward
f9c9cc83f4 fix: run all U32SubtractionGate generators 2021-11-30 15:31:06 -08:00
Nicholas Ward
fd2e276405 merge 2021-11-30 15:31:06 -08:00
Nicholas Ward
d9868de693 merge 2021-11-30 15:31:06 -08:00
Nicholas Ward
f29b591d49 merge 2021-11-30 15:31:06 -08:00
wborgeaud
25c0614dff
Merge pull request #375 from mir-protocol/no_more_clippy
Fix all clippy lints
2021-11-30 20:35:06 +01:00
wborgeaud
a0b0a2d715 Move polynomial.rs to mod.rs 2021-11-30 20:17:34 +01:00
wborgeaud
301edf3ab5 Move clippy::eq_ip 2021-11-30 18:18:56 +01:00
wborgeaud
915f4eccc5 Fix github CI 2021-11-30 18:09:58 +01:00
wborgeaud
b3d246a7c5 Minor 2021-11-30 17:55:39 +01:00
wborgeaud
7097081e5b Add clippy to CI 2021-11-30 17:28:29 +01:00
wborgeaud
2c06309cf7 Fix all clippy lints 2021-11-30 17:12:13 +01:00
Jakub Nabaglo
549ce0d8e9
Interleaved batched multiplicative inverse (#371)
* Interleaved batched multiplicative inverse

* Minor: typo
2021-11-23 21:36:12 -08:00
wborgeaud
1fed718a70
Merge pull request #374 from mir-protocol/arity4
Low-degree interpolation gate and log-arity of 4 in recursive benchmark + 2^12 shrinking recursion with 100 security bits
2021-11-22 23:01:45 +01:00
wborgeaud
3235a21d2b 2^12 shrinking recursion with 100 bits of security 2021-11-22 22:38:37 +01:00
wborgeaud
e26eb5f4ab Merge branch 'main' into arity4
# Conflicts:
#	src/gates/mod.rs
2021-11-22 22:32:37 +01:00
wborgeaud
9cafe97731 Remove specific impls of InterpolationGate 2021-11-22 22:30:32 +01:00
wborgeaud
9bd5ac00c1
Merge pull request #373 from mir-protocol/mul_gate
Multiplication gate
2021-11-22 22:25:54 +01:00
wborgeaud
15b41ea8fb PR feedback 2021-11-22 22:13:24 +01:00
wborgeaud
172fdd3d89 Comments 2021-11-22 21:20:44 +01:00
wborgeaud
fa29db1dcb Clean low-degree interpolation gate 2021-11-22 17:54:58 +01:00
wborgeaud
5ea632f2a8 Fix size optimized test 2021-11-22 17:30:13 +01:00
wborgeaud
b7cb7e234f Minor 2021-11-22 17:06:40 +01:00
wborgeaud
e06ce5aa2f Fix proof compression test 2021-11-22 16:41:33 +01:00
wborgeaud
6aaea002ed Choose between high- and low-degree interpolation gate depending on the arity 2021-11-22 16:10:14 +01:00
wborgeaud
8522026c36 Change file structure 2021-11-22 11:39:56 +01:00
wborgeaud
442c8560b0 Under 2^12 with 27 query rounds 2021-11-22 11:16:58 +01:00
wborgeaud
0d5ba7e755 Working recursive test 2021-11-22 10:44:19 +01:00
wborgeaud
aec88a8528 First try 2021-11-19 18:11:14 +01:00
wborgeaud
22f4c18083 Comments 2021-11-19 11:48:42 +01:00
wborgeaud
4f11713c49 Remove useless test 2021-11-19 11:29:51 +01:00
wborgeaud
90a6ffd775 Use fold1 in mul_many 2021-11-19 11:24:43 +01:00
wborgeaud
939acfed96 Fix mul_many 2021-11-19 11:14:03 +01:00
wborgeaud
0de408c40f MulExtensionGate 2021-11-19 09:31:06 +01:00
Daniel Lubarov
2b4bb13ab0
Remove total_constraints (#372)
It's out of date, and unused now anyway.
2021-11-18 23:00:56 -08:00
Daniel Lubarov
9b55ff9e81
edition = 2021 (#370)
* edition = 2021

Doesn't affect anything for us as far as I've noticed.

* imports
2021-11-17 14:43:54 -08:00
Daniel Lubarov
8772073b36
Update size-optimized proof test (#368)
The 2^12 change made this outdated. We no longer need to shrink degree (since normal recursive proofs are 2^12), so we can simplify a bit. We just boost the rate, then do a size-optimized proof. (Without doing the rate boost first, the final proof would be over 2^12.)

Configured for 93 bits security for now, but the PoW settings are low so that'll be easy to increase.

~45kb with current settings.
2021-11-17 08:13:20 -08:00
Daniel Lubarov
eb15837acb tweak logs 2021-11-16 22:53:08 -08:00
Daniel Lubarov
eb27a2d2b2 warnings 2021-11-16 22:52:01 -08:00
Daniel Lubarov
8b71075154
Reduce constant_gate_size to 5 (#366)
This results in 8 constant polynomials, which means our Merkle tree containing preprocessed polynomials has leaves of size 80 + 8 = 88. A multiple of 8 is efficient in terms of how many gates it takes to hash a leaf. Saves 17 gates.
2021-11-16 09:29:22 -08:00
Daniel Lubarov
eb5a60bef1
Allow one BaseSumGate to handle 64 bits (#365) 2021-11-16 09:29:14 -08:00
Daniel Lubarov
1e66cb9aee
Route in constants from a ConstantGate (#367)
Rather than creating arithmetic gates with potentially unique constants.

Should be strictly cheaper, though it only seems to save one gate in practice.
2021-11-16 09:28:58 -08:00
Hamish Ivey-Law
909a5c2392
Fix all lint warnings (#353)
* Suppress warnings about use of unstable compiler features.

* Remove unused functions.

* Refactor and remove PolynomialCoeffs::new_padded(); fix degree_padded.

Note that this fixes a minor mistake in the FFT testing code, where
`degree_padded` value was log2 of what it should have been, preventing
a testing loop from executing.

* Remove divide_by_z_h() and related test functions.

* Only compile check_{consistency,test_vectors} when testing.

* Move verify() to test module.

* Remove unused functions.

NB: Changed the config in the gadgets/arithmetic_extension.rs::tests
module which may change the test's meaning?

* Remove unused import.

* Mark GMiMC option as allowed 'dead code'.

* Fix missing feature.

* Remove unused functions.

* cargo fmt

* Mark variable as unused.

* Revert "Remove unused functions."

This reverts commit 99d2357f1c967fd9fd6cac63e1216d929888be72.

* Make config functions public.

* Mark 'reduce_nonnative()' as dead code for now.

* Revert "Move verify() to test module." Refactor to `verify_compressed`.

This reverts commit b426e810d033c642f54e25ebc4a8114491df5076.

* cargo fmt

* Reinstate `verify()` fn on `CompressedProofWithPublicInputs`.
2021-11-16 21:18:27 +11:00
Daniel Lubarov
4769efa4dd rename 2021-11-15 19:33:03 -08:00
Daniel Lubarov
694b3d3dd5
Recursion in 2^12 gates (#364)
For now, we can do shrinking recursion with 93 bits of security. It's not quite as high as we want, but it's close, and I think it makes sense to merge this and treat the 2^12 circuit as our main benchmark, as we continue working to improve security.
2021-11-15 13:59:49 -08:00
wborgeaud
beb13af5ee
Merge pull request #363 from mir-protocol/reducing_ext_gate
Add `ReducingExtensionGate`
2021-11-15 20:47:03 +01:00
wborgeaud
799ff26e71 Avoid underflow when checking the length of terms 2021-11-15 19:46:28 +01:00