Pratyush Mishra
9391b1fd04
Rename to ed_on
2020-06-12 18:37:04 -07:00
Pratyush Mishra
d5e7d8bb36
Compilation fix
2020-06-12 18:37:04 -07:00
Pratyush Mishra
1959a3de63
Rename curves
2020-06-12 18:37:04 -07:00
Sergey Vasilyev
67196d8371
Formatting fix
2020-05-06 18:07:47 -07:00
Sergey Vasilyev
0b87c84cdd
Merkle tree panics when there's a single leaf - fix
2020-05-06 18:07:47 -07:00
Sergey Vasilyev
4e0d92a6ec
Merkle tree fails to compute the root when there's no need in dummy nodes - fix
2020-05-06 18:07:47 -07:00
Sergey Vasilyev
97ca70b854
Merkle tree panics when there's a single leaf - test
2020-05-06 18:07:47 -07:00
Sergey Vasilyev
f4e2039d61
Merkle tree fails to compute the root when there's no need in dummy nodes - test
2020-05-06 18:07:47 -07:00
Pascal Berrang
3708a444a2
Give Travis more time
2020-04-23 02:42:50 -07:00
Pascal Berrang
13b9c6c6fe
Split FpParameters/PrimeField and add FFT related traits
2020-04-23 02:42:50 -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
d4a2d31d07
Fix Vec imports for no_std
2020-04-09 11:04:50 -07:00
Pratyush Mishra
33a9da08f8
Switch to stable cargo formatting options
2020-04-07 19:30:27 -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
Pratyush Mishra
81f3105a91
Fix MerkleTree leaf index calculation
2020-04-02 08:53:31 -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
dependabot-preview[bot]
b24e705527
Update derivative requirement from 1 to 2 ( #140 )
2020-03-16 15:25:12 -07:00
dependabot-preview[bot]
9ca5a94f2e
Update digest requirement from 0.7 to 0.8 ( #141 )
...
* Update `digest` and `blake2` requirement from 0.7 to 0.8
Updates the requirements on [digest](https://github.com/RustCrypto/traits ) to permit the latest version.
- [Release notes](https://github.com/RustCrypto/traits/releases )
- [Commits](https://github.com/RustCrypto/traits/compare/digest_v0.7.2...digest-v0.8.1 )
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu >
2020-03-16 15:22:10 -07: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
Pratyush Mishra
faf179c43d
Export algebra-core::error
2020-02-28 08:29:03 -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
d4896ade47
crypto-primitives no-std ( #96 )
2020-02-20 11:35:53 -08:00
howardwu
02e6b32d7d
Cargo fmt
2020-02-16 12:34:26 -08:00
howardwu
2949c0ef9d
Adds NIZK benchmarking, updates crypto-primitives benchmarks
2020-02-15 18:16:19 -08:00
ValarDragon
5e57ac5621
Fix blake2s table alighnments
2020-01-28 08:31:20 -08:00
François Garillot
a4a8116f1d
Update dependencies
2020-01-27 19:57:25 -08:00
François Garillot
b26867f267
Runs rustfmt on the repo
2020-01-27 11:44:23 -08:00
Pratyush Mishra
762793ccbd
Update Cargo.toml
2020-01-18 18:26:45 -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
François Garillot
f1d8b122fc
Use operator syntax
...
eliminate a few redundant references
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
d71bc5a675
Prefer to return error rather than ? them,
...
avoid return when it cant be early (in a simple if-else)
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
Kobi Gurkan
da0de7c7f2
Adds license files as links
2019-10-21 18:57:39 -07:00
Kobi Gurkan
d292f637aa
Update crypto-primitives/src/nizk/groth16/mod.rs
...
Co-Authored-By: Pratyush Mishra <pratyushmishra@berkeley.edu >
2019-10-21 18:57:39 -07:00
Kobi Gurkan
e3d2ff1c04
Update crypto-primitives/src/nizk/groth16/mod.rs
...
Co-Authored-By: Pratyush Mishra <pratyushmishra@berkeley.edu >
2019-10-21 18:57:39 -07:00
Kobi Gurkan
7c5271a212
Update crypto-primitives/src/nizk/groth16/mod.rs
...
Co-Authored-By: Pratyush Mishra <pratyushmishra@berkeley.edu >
2019-10-21 18:57:39 -07:00
Kobi Gurkan
fb87c421e7
Runs cargo fmt
2019-10-21 18:57:39 -07:00
Kobi Gurkan
98416f6b2e
Adds Groth16
2019-10-21 18:57:39 -07:00
Pratyush Mishra
2a86b59138
Merkle Tree name refactors
2019-10-11 19:25:53 -07:00
Pratyush Mishra
42893ee3b6
Remove unused file
2019-10-11 19:25:53 -07:00
Pratyush Mishra
cb2ff3b412
Add ToConstraintField impls for some primitives
2019-10-11 19:25:53 -07:00
Pratyush Mishra
1b6f681cdb
Fix Blake2s gadget test
2019-10-11 19:25:53 -07:00
Pratyush Mishra
d318e70dd3
Fix benches
2019-10-11 19:25:53 -07:00
Pratyush Mishra
a244e719d1
Initial commit to extract crypto-primitives to new crate
2019-10-11 19:25:53 -07:00