Youssef El Housni
36305e7247
Implement ed_on_bn254 curve (baby-jubjub) ( #230 )
2020-07-01 12:25:02 -07:00
Dev Ojha
a83914af50
Add mul_by_inverse to FieldGadget ( #227 )
2020-06-19 12:45:51 -07:00
Dev Ojha
75439b9b4d
Add constant folding to FpGadget<F> ( #226 )
2020-06-19 11:43:25 -07:00
Weikeng Chen
885e9d7bad
Add constraints for Edwards curves over MNT4 ( #221 )
2020-06-14 21:51:56 -07:00
Pratyush Mishra
9391b1fd04
Rename to ed_on
2020-06-12 18:37:04 -07:00
Pratyush Mishra
7a0177e8c7
Re-export edwards_on_cp6_782 as edwards_on_bw6_761
2020-06-12 18:37:04 -07:00
Pratyush Mishra
40e89254e0
Fix no-std compilation
2020-06-12 18:37:04 -07:00
Pratyush Mishra
1959a3de63
Rename curves
2020-06-12 18:37:04 -07:00
ValarDragon
349407faef
Speed up exp_by_const
2020-06-09 16:07:45 -07:00
ValarDragon
c555535605
Improve invalid namespace error msg
2020-06-09 11:08:46 -07:00
Pratyush Mishra
75c55f7bee
Change from_repr to output Option<Self>
2020-05-29 00:34:22 -07:00
Georgios Konstantopoulos
ecf863f541
expose function which enforces a <= (p-1)/2
2020-05-07 08:48:16 -07:00
Georgios Konstantopoulos
ea2adb4f7f
fix(fp-cmp): use enforce unchecked in enforce unchecked function
2020-05-06 09:10:28 -07:00
Bruno França
bbb7d75ec8
Implement conditional_check_verify for NIZKs ( #195 )
...
* Implement `ToBitsGadget` for `UInt8` and `Vec<UInt8>`
* Add `kary_or` function to `Boolean`.
2020-04-22 13:30:33 -07:00
Kobi Gurkan
5cc094be6b
Adds alloc_constant to AllocGadget ( #189 )
...
* adds alloc constant to AllocGadget
* fmt
* fmt
* more alloc constant impls
* fmt
* even more impls
* fixes type
* fixes alloc_constant in gm17
* uses alloc_constant from field gadget in group gadgets
* fmt
* handle most comments
2020-04-18 16:03:33 -07:00
Pascal Berrang
c486e15f0e
Add test cases for COFACTOR and generalize SW tests
2020-04-09 11:04:50 -07:00
Pratyush Mishra
5659b0d9ea
Fix CI to test more code in no_std
2020-04-08 18:57:39 -07:00
Pratyush Mishra
33a9da08f8
Switch to stable cargo formatting options
2020-04-07 19:30:27 -07:00
Pratyush Mishra
456f30a849
Fix #172 and improve squaring code for deg-3 extensions ( #174 )
2020-04-07 19:29:54 -07:00
Pascal Berrang
8631f883c4
MNT4/6 curves and recursive SNARKs ( #150 )
...
* Add mnt6_753 curve
Generalize mnt6 curve model
* Add mnt4 curves
* Use resampled generators
* Calculate correct G2 cofactors
* Add fields to r1cs-std
* Add pairings
* Improve reusing of Fq/Fr among MNT curves
* Add instantiations of curves
Fix Fp6_2over3
Rebase code to current master
* Add test for recursive NIZK proof verification
* Address comments in PR
* Improve test case and port to GM17
Also fix a minor bug in to_field_vec
2020-04-04 10:50:46 -07:00
Kobi Gurkan
c58fc31119
fmt and docs
2020-03-30 01:42:20 -07:00
Kobi Gurkan
ded3d687cc
removes unused struct + fmt
2020-03-30 01:42:20 -07:00
Kobi Gurkan
8cd0999431
moves cmp to be under FpGadget
2020-03-30 01:42:20 -07:00
Kobi Gurkan
60058b2186
changes test name
2020-03-30 01:42:20 -07:00
Kobi Gurkan
bd86eb4563
uses core instead of std
2020-03-30 01:42:20 -07:00
Kobi Gurkan
b0f266de1e
fmt
2020-03-30 01:42:20 -07:00
Kobi Gurkan
7ed38fe4a6
makes API cmp-like
2020-03-30 01:42:20 -07:00
Kobi Gurkan
ccbb5ef553
adds a smaller than gadget
2020-03-30 01:42:20 -07:00
Weikeng Chen
33f7d3988f
Update uint64.rs
2020-03-26 18:50:09 -07:00
weikeng
a205f191f7
used AllocGadget for UInt64
2020-03-26 18:50:09 -07:00
Georgios Konstantopoulos
0ffa409ec1
Apply suggestions from code review
...
Co-Authored-By: Pratyush Mishra <pratyushmishra@berkeley.edu >
2020-03-25 09:29:49 -07:00
Georgios Konstantopoulos
f4e030793c
test: ensure the Counter and the System match
2020-03-25 09:29:49 -07:00
Georgios Konstantopoulos
695df979b5
chore: add helper
2020-03-25 09:29:49 -07:00
Georgios Konstantopoulos
951a6226c9
feat: TestConstraintCounter
2020-03-25 09:29:49 -07:00
Pratyush Mishra
b1913a9ca7
Change default to_bits and to_bytes functions to the safe versions
2020-03-18 23:24:54 -07:00
ValarDragon
20af44e3c9
fix fmt check
2020-03-12 09:21:01 -07:00
ValarDragon
23c6bb4bd0
Rename arguments to CondSelectGadget for code clarity
2020-03-12 09:21:01 -07:00
Weikeng Chen
6c0ee7ffbc
Follow the nightly's suggested fmt change
2020-03-05 10:55:54 -08:00
weikeng
e524e46d0b
Add UInt64 used for representing Merkle tree node locations
2020-03-05 10:55:54 -08:00
Pratyush Mishra
0df0a15e1b
Blake PRF & R1CS Boolean Refactor ( #132 )
...
* refactor(r1cs-std/boolean): expose enforcing value less than functionality
* fix(r1cs-std/boolean): ensure num_bits is calculated correctly from the arg
* feat(primitives/blake2s): allow creating Blake2s with custom params
2020-03-05 10:51:59 -08:00
ValarDragon
78e08aed97
Fix lint
2020-02-28 21:00:23 -08:00
ValarDragon
cba74c09d9
Fix error
2020-02-28 21:00:23 -08:00
ValarDragon
3cb1ed06d6
Fix linter errors
2020-02-28 21:00:23 -08:00
Pratyush Mishra
77837b4a1b
Fix ns issue
2020-02-28 21:00:23 -08:00
ValarDragon
cb1bcb1cbf
Fix ns
2020-02-28 21:00:23 -08:00
ValarDragon
b63d255ea3
Update to use bit iterator
2020-02-28 21:00:23 -08:00
ValarDragon
8cce6501b8
Add exponentiation by constant to Fp
2020-02-28 21:00:23 -08:00
Pratyush Mishra
7adcc69799
Generalize FFT infrastructure to work with group elements as well
2020-02-28 18:10:00 -08:00
Pratyush Mishra
8bf042a029
Refactor algebra API, split into algebra and algebra-core. ( #100 )
2020-02-26 21:42:04 -08:00
Pratyush Mishra
bd501440cf
Add new additive and multiplcative ops for fields
2020-02-14 14:38:04 -08:00