50 Commits

Author SHA1 Message Date
Nicholas Ward
fa06cc5509 fix 2021-07-28 17:37:26 -07:00
Nicholas Ward
17217f1143 addressed nit 2021-07-28 17:34:41 -07:00
Nicholas Ward
2fd9ce2114 fixes to exp functions 2021-07-28 13:38:41 -07:00
Nicholas Ward
247fa39386 exponentiation gadget 2021-07-28 10:56:12 -07:00
wborgeaud
f325586beb Replace exp_from_complement_bits with simpler method 2021-07-23 14:58:41 +02:00
wborgeaud
6f8053cc37 Forgot to exponentiate from bits in computation of subgroup_x. Saves 80 gates. 2021-07-23 08:53:00 +02:00
wborgeaud
a70e97befc Fix merge issues 2021-07-23 08:21:55 +02:00
wborgeaud
9a1c289f8e Merge branch 'main' into remove_acc_in_gmimc
# Conflicts:
#	src/gadgets/arithmetic.rs
2021-07-23 08:16:23 +02:00
wborgeaud
47b9936487 PR feedback 2021-07-23 08:15:13 +02:00
wborgeaud
0541956942 Remove useless clone 2021-07-22 16:22:23 +02:00
wborgeaud
1d92191227 Make exp_complement_bits take an iterator to avoid cloning. 2021-07-22 16:18:13 +02:00
wborgeaud
b65e792ff3 - Remove useless rotation gadgets
- rotate.rs -> select.rs
- Added `select()` and `select_ext`
- Optimize to use just one gate
2021-07-22 11:58:29 +02:00
wborgeaud
be2e870aee PR feedback 2021-07-22 06:50:07 +02:00
wborgeaud
db0121d74a Update comment 2021-07-21 20:38:23 +02:00
wborgeaud
a54a4e5830 Merge branch 'main' into avoid_rotating 2021-07-21 20:02:22 +02:00
wborgeaud
59494ff8d1 Merge branch 'main' into optimize_mul_many
# Conflicts:
#	src/gates/arithmetic.rs
2021-07-21 17:47:38 +02:00
wborgeaud
6e305f0a3e Change {add|mul}_many and cube 2021-07-21 17:41:22 +02:00
Daniel Lubarov
ac1872a8c8
FRI tweaks (#111)
- Call `exp_power_of_2` instead of manual squaring
- Replace `evaluations[i]` with `evals`
2021-07-20 12:49:02 -07:00
wborgeaud
925c0bcb5c Replace rotation with exp in compute_evaluation 2021-07-20 15:25:03 +02:00
Daniel Lubarov
9c17a00c00
Division related changes (#99)
* Division related changes

- Simplify `div_unsafe_extension` using virtual targets
- Add methods for inversion and safe division

As a followup I'll switch some calls to safe division.

* Test safe division also

* add_virtual_extension_target
2021-07-18 23:05:57 -07:00
Daniel Lubarov
519533d4b7
Benchmark tweaks (#83)
- Configure FRI with a list of arities that's more appropriate for a 2^14 instance. The previous config resulted in a huge final polynomial.
- Log the blinding factors, and other logging tweaks.
2021-07-01 10:53:42 -07:00
wborgeaud
2f06a78cb1 Simplify exp_u64 2021-06-25 16:53:11 +02:00
wborgeaud
42db0a31c1 Clippy 2021-06-25 16:49:29 +02:00
wborgeaud
fc4738869d Rearrange files 2021-06-25 16:45:02 +02:00
wborgeaud
b62c2e6990 Supplant ArithmeticGate with ArithmeticExtensionGate 2021-06-25 16:31:10 +02:00
wborgeaud
8a119f035d Working ReducingFactorTarget 2021-06-25 16:27:20 +02:00
wborgeaud
beadce72fc Add ZeroOutGenerator 2021-06-25 15:11:49 +02:00
wborgeaud
6652b38b99 Remove ArithmeticGate 2021-06-25 13:53:14 +02:00
wborgeaud
8796c73362 Change MulExtensionGate to ArithmeticExtensionGate and change gadgets to use the new wires in this gate. 2021-06-23 18:04:43 +02:00
wborgeaud
bfd5f06384 Hardcode Plonk polynomials indices and blinding flags. 2021-06-17 11:54:31 +02:00
wborgeaud
4437012d2a Add num_bits to exp. 2021-06-16 08:56:58 +02:00
wborgeaud
5200d70cf0 Add interpolation gadgets 2021-06-11 16:22:29 +02:00
wborgeaud
4b1f368e89 Use Frobenius optimization in the circuit 2021-06-11 14:16:40 +02:00
wborgeaud
1eb372326a Add CircuitConfig::large_config() for tests. 2021-06-11 09:44:19 +02:00
wborgeaud
bb551092a0 Remove mul_extension_naive 2021-06-09 21:12:15 +02:00
wborgeaud
89761ef22a Added in-circuit reverse_bits and exp. 2021-06-09 17:39:45 +02:00
wborgeaud
9adf5bb43f Use ExtensionAlgebra + new CircuitBuilder::mul_extension 2021-06-09 10:51:50 +02:00
wborgeaud
8cf2758b6c Division gadget for extension field 2021-06-07 17:55:27 +02:00
wborgeaud
a8da9b945e Working MulExtensionGate 2021-06-07 17:09:53 +02:00
wborgeaud
6f2275bc6d Progress 2021-06-07 11:19:54 +02:00
wborgeaud
f5dfe95b2e Added recursive powers 2021-06-04 17:36:48 +02:00
Daniel Lubarov
cb7f8c8b8c
Draw challenge points from the extension field (#51)
* Draw challenge points from the extension field

* Now building

* Misc

* Default eval_unfiltered_base

* fmt

* A few field settings

* Add to Sage

* Display tweak

* eval_filtered_base

* Quartic in bench

* Missing methods

* Fix tests

* PR feedback
2021-05-30 13:25:53 -07:00
Daniel Lubarov
d3ac365667 Recursive evaluation of GMiMCGate
If we did it all with `ArithmeticGate`s, the main loop (with ~101 iterations of cubing and a couple adds) would be fairly expensive, so this uses a (much smaller) custom gate called `GMiMCEvalGate` which does all the computations for one iteration of that loop.
2021-04-27 13:16:24 -07:00
Daniel Lubarov
af4c8734ce Address some clippy warnings 2021-04-23 12:35:19 -07:00
Daniel Lubarov
b7bc1bf313 Seed Challenger with a hash of the instance
I think this is the recommended way to apply Fiat-Shamir, to avoid any possible attacks like taking someone else's proof and using it to prove a slightly different statement.
2021-04-22 16:38:49 -07:00
wborgeaud
4b75f16efd Merge master 2021-04-22 22:27:55 +02:00
wborgeaud
6b407e45ef Progress on FRI 2021-04-21 22:31:45 +02:00
Daniel Lubarov
41e1b64623 Basic arithmetic methods 2021-04-21 11:48:17 -07:00
Daniel Lubarov
4086b2b447 Arithmetic & permutation gadgets 2021-04-02 15:29:21 -07:00
Daniel Lubarov
f42120482a No more polynomial programming abstraction
It was too expensive.
2021-03-28 19:52:01 -07:00