1338 Commits

Author SHA1 Message Date
wborgeaud
49e4307820 Comments + test for reducing 100 extension elements 2021-11-15 13:35:21 +01:00
wborgeaud
3efe2068bc Minor 2021-11-15 11:59:54 +01:00
wborgeaud
f787c5385f Simplify 2021-11-15 11:50:41 +01:00
wborgeaud
a54db66f68 Use arithmetic gate for small reductions 2021-11-15 11:39:24 +01:00
wborgeaud
66719b0cfc Remove comments 2021-11-15 10:33:27 +01:00
wborgeaud
d44cb96744 Merge branch 'main' into reducing_ext_gate 2021-11-15 09:22:35 +01:00
Daniel Lubarov
7185c2d7d2
Fix & cleanup partial products (#355)
My previous change introduced a bug -- when `num_routed_wires` was a multiple of 8, the partial products "consumed" all `num_routed_wires` terms, whereas we actually want to leave 8 terms for the final product.

This also changes `check_partial_products` to include the final product constraint, and merges `vanishing_v_shift_terms` into `vanishing_partial_products_terms`. I think this is natural since `Z(x)`, partial products, and `Z(g x)` are all part of the product accumulator chain.
2021-11-14 11:58:44 -08:00
Daniel Lubarov
fe1e67165a
256 bit salts (#352)
I believe I was mistaken earlier, and hash-based commitments actually call for `r = 2*security_bits` bits of randomness.

I.e. I believe breaking a particular commitment requires `O(2^r)` work (more if the committed value adds entropy, but assume it doesn't), but breaking one of `n` commitments requires less work.

It seems like this should be a well-known thing, but I can't find much in the literature. The IOP paper does mention using `2*security_bits` of randomness though.
2021-11-14 11:58:14 -08:00
Daniel Lubarov
26a222bbdf
Fewer wires in PoseidonGate (#356)
Closes #345.
2021-11-14 11:57:36 -08:00
Nicholas Ward
ad42104e65
Merge pull request #354 from mir-protocol/smaller_tests
Reduced test sizes
2021-11-12 12:32:37 -08:00
Nicholas Ward
4a5123de81 reduced test sizes 2021-11-12 12:12:58 -08:00
Daniel Lubarov
857b74bac5
Bring back the base field arithmetic gate (#343)
* Bring back the base field arithmetic gate

* fix
2021-11-12 09:48:27 -08:00
wborgeaud
72ef58c19d Add ReducingExtGate 2021-11-12 18:24:08 +01:00
wborgeaud
a48eb2f81d
Merge pull request #346 from mir-protocol/partial_product_chain
Use chain structure to compute partial products
2021-11-12 09:39:17 +01:00
wborgeaud
21d3b127e3 Cargo fmt 2021-11-12 09:15:37 +01:00
Daniel Lubarov
9139d1350a
Minor refactor of partial product code (#351) 2021-11-11 07:16:16 -08:00
Nicholas Ward
137c6d341c
Merge pull request #281 from mir-protocol/nonnative
Non-native field arithmetic
2021-11-10 12:46:13 -08:00
Nicholas Ward
f2ec2cadf4 new fmt 2021-11-10 12:14:23 -08:00
Nicholas Ward
bd427cd629 fixed failing tests 2021-11-10 12:10:32 -08:00
Nicholas Ward
dd945ef5b7 addressed comments 2021-11-10 11:19:06 -08:00
Nicholas Ward
9043a47e1b more fixes 2021-11-10 11:15:00 -08:00
Nicholas Ward
ea4f950d6e fixes and fmt 2021-11-10 10:54:35 -08:00
Nicholas Ward
270521a17d addressed comments 2021-11-10 09:58:16 -08:00
Nicholas Ward
7336aa0917 fmt 2021-11-10 09:58:16 -08:00
Nicholas Ward
3f619c704c made test_list_le random 2021-11-10 09:58:16 -08:00
Nicholas Ward
6164796898 rename 2021-11-10 09:58:16 -08:00
Nicholas Ward
db31b9f662 sub_nonnative fix 2021-11-10 09:58:16 -08:00
Nicholas Ward
656f052b79 addressed nits 2021-11-10 09:58:16 -08:00
Nicholas Ward
cf3b6df0e4 addressed nits 2021-11-10 09:58:16 -08:00
Nicholas Ward
c861c10a5b nonnative neg 2021-11-10 09:58:16 -08:00
Nicholas Ward
e838096940 use map; and TODOs 2021-11-10 09:58:16 -08:00
Nicholas Ward
1d4bb3950d FFTarget uses BigUintTarget 2021-11-10 09:58:16 -08:00
Nicholas Ward
6ab01e51f3 u32 arithmetic check for special cases 2021-11-10 09:58:16 -08:00
Nicholas Ward
237a1fad1d addressed comments 2021-11-10 09:58:16 -08:00
Nicholas Ward
bd0164c7ef fmt 2021-11-10 09:58:16 -08:00
Nicholas Ward
a3d957fa42 addressed comment: more tests for multiple_comparison 2021-11-10 09:58:16 -08:00
Nicholas Ward
6705d81fbd nit 2021-11-10 09:58:16 -08:00
Nicholas Ward
5dd4ed3e1c addressed comments 2021-11-10 09:58:16 -08:00
Nicholas Ward
244543578b fixes to subtraction tests, and documentation 2021-11-10 09:58:16 -08:00
Nicholas Ward
2d9f8d9719 fix 2021-11-10 09:58:16 -08:00
Nicholas Ward
c664eba3e6 sub test 2021-11-10 09:58:16 -08:00
Nicholas Ward
72134a3eb0 mul test 2021-11-10 09:58:16 -08:00
Nicholas Ward
8f8d03951b uncomment 2021-11-10 09:58:16 -08:00
Nicholas Ward
4c5f2383fe fixes to tests 2021-11-10 09:58:16 -08:00
Nicholas Ward
bbcda969e5 nonnative tests 2021-11-10 09:58:16 -08:00
Nicholas Ward
ee5619b847 fmt 2021-11-10 09:58:16 -08:00
Nicholas Ward
f7ce33b7ae using refs in right places; and lots of fixes 2021-11-10 09:58:16 -08:00
Nicholas Ward
bfe201d951 fmt 2021-11-10 09:58:16 -08:00
Nicholas Ward
87d8129034 reduce 2021-11-10 09:58:16 -08:00
Nicholas Ward
6232aa68fb fix 2021-11-10 09:58:16 -08:00