Commit Graph

25 Commits

Author SHA1 Message Date
ValarDragon
23c6bb4bd0 Rename arguments to CondSelectGadget for code clarity 2020-03-12 09:21:01 -07: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
8bf042a029 Refactor algebra API, split into algebra and algebra-core. (#100) 2020-02-26 21:42:04 -08:00
Marek Kotewicz
9621bd34a4 r1cs-std works with no-std (#92) 2020-02-05 13:55:38 -08:00
François Garillot
b26867f267 Runs rustfmt on the repo 2020-01-27 11:44:23 -08:00
Pratyush Mishra
40cf13b7b8 num_traits:: -> algebra:: 2020-01-18 18:26:45 -08:00
François Garillot
722a901ae7 [RFC] Convert identity functions in Field, Group, and {Projective,Affine}Curve traits with One/Zero traits from num_traits.
- contributes to #50,
- depends on #53 and builds on it,
- due to coherence & requirements of `num_traits::{Zero, One}` to implement `std::ops::Add<Self, ..>` and (resp.) `std::ops::Mul<Self, ..>`, I've had to replace the afferent `impl<'a, P: ..> (Add|Mul)<&'a Self> for Group(Affine|Projective)<P>` by direct implementations on `Self`,
- I did not have to fight the borrow checker for this conversion => I think this hints arithmetic operations are called in contexts where the operand is owned,
- hence should this end up on a merge track, we may want to open an issue to convert the `impl<'a, P:..> (Neg|Sub|..)<&'a Self> for ..<P>` trait usage to direct `impl<P:..> (Neg|Sub|..)<Self> for ..<P>`
- the `impl AddAssign for GroupAffine<P>` in curves/models/short_weierstrass_jacobian.rs is provided to fit trait bounds, and without any guarantee of suitability for any particular purpose
- and that, even though I don't think it's used.
2020-01-17 11:22:41 -08:00
Kobi Gurkan
b8a81b5dcb r1cs-std: makes extension field to_bits create namespaces for the individual elements 2020-01-16 09:54:50 -08:00
François Garillot
ab65b01478 Clean up a few loop bounds 2019-12-02 09:54:14 -08:00
François Garillot
f1d8b122fc Use operator syntax
eliminate a few redundant references
2019-12-02 09:54:14 -08:00
François Garillot
b42d5f8d36 Simplify a few "if" structures 2019-12-02 09:54:14 -08:00
François Garillot
53a51eb4dc Use built-in iteration functions more 2019-12-02 09:54:14 -08:00
François Garillot
c42c7dd98a Remove a few unnecessary clones 2019-12-02 09:54:14 -08:00
François Garillot
10c6e85c1a Remove a few unnecessary .into_iter() explicit calls, and some cloning.
See https://rust-lang.github.io/rust-clippy/master/#explicit_into_iter_loop
2019-12-02 09:54:14 -08:00
Kobi Gurkan
581f3df55f Adds Bowe-Hopwood hash 2019-11-17 09:07:23 -08:00
Pratyush Mishra
0a507b0a5f Upgrade ff-fft, gm17, and r1cs-std 2019-09-17 01:35:23 -07:00
Pratyush Mishra
b617d217a1 Move ConstraintVar to r1cs-core 2019-08-14 13:13:33 +03:00
Pratyush Mishra
c610ecbcc5 Update r1cs-std tests 2019-08-14 13:13:33 +03:00
Pratyush Mishra
e00d667330 Move snark-gadgets to r1cs-std 2019-08-14 13:13:33 +03:00