Weikeng Chen
b7874406ec
Upgrade to work with latest `ark-ff` ( #90 )
Co-authored-by: Sun <huachuang20@gmail.com>
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
3 years ago
Pratyush Mishra
b6e7e94521
Introduce `mul_by_inverse_unchecked`, and use it ( #75 )
3 years ago
Weikeng Chen
1ad210462c
Implement the `Sum` trait for `FpVar` ( #71 )
* impl sum for fpvar
* fmt
* grammar
* update the CHANGELOG
3 years ago
Dev Ojha
f88d7c6ea3
Make `mul_by_inverse` use one constraint ( #42 )
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
4 years ago
jon-chuang
905e7284b2
Reduce density of `ThreeBitCondNegLookup`
4 years ago
Weikeng Chen
f4691621ee
Add ToConstraintFieldGadget for ProjectiveVar ( #13 )
4 years ago
Weikeng Chen
8dca325042
Make ToBitsGadget for FpVar's output constant-length ( #12 )
This is related to a Zexe issue https://github.com/scipr-lab/zexe/issues/289
Basically, ToBitsGadget for FpVar may produce shorter output for a constant value, which is undesired for a few reasons.
4 years ago
Kobi Gurkan
e5ec2e66d3
fix: fix wrong constant case detection in three_bit_cond_neg_lookup
4 years ago
Pratyush Mishra
636f93a3e5
Update to `arkworks` libraries ( #3 )
Co-authored-by: Nicholas Ward <npward@berkeley.edu>
4 years ago
Pratyush Mishra
99e489cac7
`R1CSVar`: `Option::None` -> `ConstraintSystemRef::None` ( #281 )
4 years ago
Pratyush Mishra
3a18ecee0d
Add examples and doctests for instantiated curves
4 years ago
Pratyush Mishra
370fbcdd3b
Document `r1cs-std`
4 years ago
Weikeng Chen
c21d0b2796
Add `ToConstraintFieldGadget` ( #278 )
4 years ago
Pratyush Mishra
40ce981801
Fix integer conversions and log2
4 years ago
Pratyush Mishra
5e00793999
Switch to `tracing`-based constraint debugging
4 years ago
Pratyush Mishra
e22ab36f7e
Fix nits
4 years ago
Pratyush Mishra
6cca9327be
Refactor bit iteration infrastructure:
* `to_bits` -> `to_bits_le`
* `BitIterator` -> `BitIteratorLE` + `BitIteratorBE`
* `found_one`/`seen_one` -> `BitIteratorBE::without_leading_zeros`
4 years ago
Pratyush Mishra
8022b598fb
Update field variables in `r1cs-std`
4 years ago
Weikeng Chen
61c70ed644
Prepare Zexe for recursion ( #241 )
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
4 years ago
Dev Ojha
75439b9b4d
Add constant folding to FpGadget<F> ( #226 )
4 years ago
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
5 years ago
Pratyush Mishra
33a9da08f8
Switch to `stable` cargo formatting options
5 years ago
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
5 years ago
Kobi Gurkan
ded3d687cc
removes unused struct + fmt
5 years ago
Kobi Gurkan
8cd0999431
moves cmp to be under FpGadget
5 years ago
Pratyush Mishra
b1913a9ca7
Change default `to_bits` and `to_bytes` functions to the safe versions
5 years ago
ValarDragon
23c6bb4bd0
Rename arguments to CondSelectGadget for code clarity
5 years ago
Marek Kotewicz
9621bd34a4
r1cs-std works with no-std ( #92 )
5 years ago
François Garillot
f1d8b122fc
Use operator syntax
eliminate a few redundant references
5 years ago
François Garillot
b42d5f8d36
Simplify a few "if" structures
5 years ago
Kobi Gurkan
581f3df55f
Adds Bowe-Hopwood hash
5 years ago
Pratyush Mishra
b617d217a1
Move ConstraintVar to r1cs-core
5 years ago
Pratyush Mishra
e00d667330
Move snark-gadgets to r1cs-std
5 years ago