206 Commits

Author SHA1 Message Date
wborgeaud
7d302aac34 Merge pull request #44 from mir-protocol/fri-extension-field
FRI with extension fields
2021-05-19 09:46:09 +02:00
wborgeaud
e806d86f86 Remove custom primitive_root_of_unity in extension fields by modifying the generators. 2021-05-19 09:35:39 +02:00
wborgeaud
1cbd12edbd Fixes based on PR comments 2021-05-18 22:22:15 +02:00
wborgeaud
8737c8d5b9 revert extension field order 2021-05-18 16:37:21 +02:00
wborgeaud
4f6f2192ab Minor fixes 2021-05-18 16:23:44 +02:00
wborgeaud
96a880193c Clippy 2021-05-18 16:09:22 +02:00
wborgeaud
9cd00532ce Generic tests 2021-05-18 16:06:47 +02:00
wborgeaud
adf5c2d4ec Const generics everywhere 2021-05-18 15:44:50 +02:00
wborgeaud
37f6ee53cc Merge branch 'main' into fri-extension-field 2021-05-18 15:28:42 +02:00
wborgeaud
a2cf2c03b6 Working FRI with field extensions 2021-05-18 15:22:06 +02:00
Daniel Lubarov
cb4c420dcf Merge pull request #43 from mir-protocol/poly_inv_fix
Fix intermittent inv_mod_xn failure
2021-05-17 12:31:43 -07:00
Daniel Lubarov
1e5dfa405b Fix intermittent inv_mod_xn failure
My recent change made `padded` panic if the padded length is less than the current length. I figured that might indicate that something unexpected was going on, so might be good to fail fast.

It looks like `inv_mod_xn` was relying on the old `padded` behavior, and it seems correct AFAIK, i.e. in this case it wasn't a symptom of anything going wrong.

We could also restore the old behavior of `padded` if you prefer; let me know if you have a preferennce.
2021-05-17 10:37:43 -07:00
BGluth
ecce373b2a Merge pull request #41 from mir-protocol/os_rng_to_thread_rng
Switched over from OsRng --> thread_rng
2021-05-17 09:15:54 -06:00
Daniel Lubarov
bd20ffa52d cargo fmt 2021-05-16 17:24:45 -07:00
BGluth
949fb879cc Switched over from OsRng --> thread_rng
- At least on my Linux machine, a signiciant amount of time (> 50%) was spent inside
  OsRng.
- Likely due to blocking behaviour of the rng devices on Linux.
- thread_rng should not block, but at the same time should provide good
  enough rng.
2021-05-14 20:15:03 -06:00
Daniel Lubarov
de0b382fb6 Merge pull request #39 from mir-protocol/three_zeta
Use num_checks zetas
2021-05-14 08:07:34 -07:00
Daniel Lubarov
7ff5496308 num_checks -> num_challenges 2021-05-14 08:07:00 -07:00
Daniel Lubarov
13fc0c2261 Merge pull request #40 from mir-protocol/move_timed
Move timed! and call from ListPolynomialCommitment
2021-05-14 08:04:22 -07:00
Daniel Lubarov
b14328c2df Move timed! and call from ListPolynomialCommitment 2021-05-14 07:35:09 -07:00
Daniel Lubarov
17b51dc16e Merge pull request #38 from mir-protocol/more_poly
Finish merging in old_polynomial
2021-05-14 06:50:11 -07:00
Daniel Lubarov
f45c8d9520 Remove old field search code
We've moved on to better options.
2021-05-13 22:45:46 -07:00
Daniel Lubarov
78af8830cb Old TODO 2021-05-13 21:36:25 -07:00
Daniel Lubarov
a04bed282d Use num_checks zetas
The soundness error is (degree of combined constraints)/|F|, so three zetas should be appropriate for all practical circuit sizes.
2021-05-13 21:32:08 -07:00
Daniel Lubarov
7f445686ee Tweaks 2021-05-13 15:44:36 -07:00
Daniel Lubarov
6d03dd06f5 Finish merging in old_polynomial 2021-05-13 15:35:26 -07:00
Daniel Lubarov
18d59ec9de Fix minor post-merge conflicts 2021-05-12 11:26:21 -07:00
Daniel Lubarov
51114e4ef6 Missing import 2021-05-12 11:21:31 -07:00
Daniel Lubarov
b7acdb36ca Merge pull request #36 from mir-protocol/poly_port
Some cleanup related to the two polynomial APIs
2021-05-12 10:55:43 -07:00
Daniel Lubarov
22a625e86d trim b 2021-05-12 10:33:36 -07:00
wborgeaud
ec5416344c Merge pull request #37 from mir-protocol/extension-field
Extension field
2021-05-11 21:08:36 +02:00
wborgeaud
1e45b0b1c0 Move Frobenius to default trait implementation. 2021-05-11 20:58:04 +02:00
wborgeaud
75711f1d3f Merge branch 'main' into extension-field 2021-05-11 15:28:25 +02:00
wborgeaud
f1d812812e Added field order test 2021-05-11 15:26:20 +02:00
wborgeaud
04664a54ee Binary extension fields 2021-05-11 14:21:21 +02:00
wborgeaud
5e86e7dc06 Rand + fix mul + tests 2021-05-11 14:06:35 +02:00
wborgeaud
e670ec3ff0 Multiplication + Frobenius + Inverse 2021-05-11 11:46:01 +02:00
wborgeaud
306fb8ef0d Merge pull request #34 from mir-protocol/batch-list-polycommits
Batched polynomial commitments + changes to PLONK prover
2021-05-11 10:03:26 +02:00
wborgeaud
cdbac76149 Fixes based on PR comments 2021-05-11 10:01:35 +02:00
wborgeaud
ce0507ba12 Blinding parameter can be set differently for each Merkle tree in a FRI proof. 2021-05-11 09:56:21 +02:00
Daniel Lubarov
4d5ea83325 polynomial_long_division -> polynomial_division 2021-05-10 14:32:17 -07:00
Daniel Lubarov
8b309fef41 Tweak 2021-05-10 14:30:18 -07:00
Daniel Lubarov
44a5e0be1b Some cleanup related to the two polynomial APIs
Porting over some code from `old_polynomial`, and changing `ListPolynomialCommitment` to use the newer API.

There's one remaining use of `old_polynomial` for long division; I think that can eventually go away when we switch to doing values-only FRI (unless another use comes up).
2021-05-10 13:10:29 -07:00
wborgeaud
5abcd85f84 Started extension field implementation 2021-05-10 18:45:48 +02:00
wborgeaud
ed805453c3 Minor 2021-05-10 13:10:40 +02:00
wborgeaud
f8f65cb942 Merge branch 'main' into batch-list-polycommits 2021-05-10 13:02:29 +02:00
wborgeaud
d529afcdef Minor 2021-05-07 16:49:27 +02:00
wborgeaud
6ca1b28f7c Fix bug 2021-05-07 16:22:13 +02:00
wborgeaud
6f13263d56 Minor 2021-05-07 11:32:15 +02:00
wborgeaud
1bae3a02f6 Batch open for PLONK 2021-05-07 11:30:03 +02:00
wborgeaud
ea7926bd95 Update PLONK prover. 2021-05-06 23:14:37 +02:00