Dev Ojha
f88d7c6ea3
Make `mul_by_inverse` use one constraint ( #42 )
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
3 years ago
William Lin
2432ff4f88
Implement ToConstraintFieldGadget for Vec<UInt8> ( #36 )
* Implement ToConstraintFieldGadget for Vec<UInt8>
* Add documentation and implementation for slice
* Update documentation
3 years ago
Pratyush Mishra
20bd452cd9
Construct `FpVar` from bits ( #35 )
3 years ago
Pratyush Mishra
0162ef18bc
More efficient scalar multiplication for Short Weierstrass curves ( #33 )
* When a group element is a constant, precompute multiples of powers of two, and perform simple conditional additions (no doubling!).
* For short weierstrass curves, addition with a constant now uses mixed addition, which results in lower constraint weight.
* For short weierstrass curves, scalar multiplication now uses mixed addition, saving 1 constraint per bit of the scalar, along with lower constraint weight (at the cost of a small constant number of constraints to check for edge cases)
3 years ago
Pratyush Mishra
262fac3e83
Loosen restrictions
3 years ago
Pratyush Mishra
a44643ed76
Fix `mul_by_inverse` for constants
3 years ago
Pratyush Mishra
f52b866e59
Fix documentation links ( #28 )
3 years ago
Pratyush Mishra
1e935b0b94
Fix `to_non_unique_bytes` for `BLS12::G1Prepared`
3 years ago
Pratyush Mishra
0fd45d3d83
Reduce allocations in `UInt`s
4 years ago
jon-chuang
905e7284b2
Reduce density of `ThreeBitCondNegLookup`
4 years ago
Weikeng Chen
68f08b94d2
Add UInt128 for u128 ( #21 )
4 years ago
Nirvan Tyagi
77dfd7dac6
'cargo +stable fmt'
4 years ago
Nirvan Tyagi
45a4c3b326
'cargo fmt'
4 years ago
Nirvan Tyagi
957ac48da4
Apply suggestions from code review
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
4 years ago
Nirvan Tyagi
0abb3a7dfe
CondSelectGadget for UInts
4 years ago
Weikeng Chen
edc9a8ce02
Allow CS being none for into_edwards ( #16 )
* allow cs being none for into_edwards
4 years ago
Weikeng Chen
18824c0c83
Allow CS being none for into_edwards ( #15 )
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
Pratyush Mishra
6077f51c97
*Actually* fix `to_affine` for SW points.
The prior PR (#9 ) multiplied by `self.z` instead of `self.z.inverse()`.
4 years ago
Pratyush Mishra
ceec513f62
Fix SW `to_affine` ( #9 )
Adds constraints to check that the conversion to affine coordinates happened correctly.
4 years ago
Kobi Gurkan
e5ec2e66d3
fix: fix wrong constant case detection in three_bit_cond_neg_lookup
4 years ago
yelhousni
2e2df52f79
replace frob(6) by unitary_inverse in bls12
4 years ago
Pratyush Mishra
636f93a3e5
Update to `arkworks` libraries ( #3 )
Co-authored-by: Nicholas Ward <npward@berkeley.edu>
4 years ago