Commit Graph

1253 Commits

Author SHA1 Message Date
str4d
b5523f610e
Merge pull request #194 from str4d/ct-invert
Constant-time field inversion in ff_derive using pow_vartime
2019-12-19 14:33:41 -06:00
Jack Grigg
56999d0f73
Constant-time field inversion in ff_derive using Field::pow_vartime
This is around 2.5-3x slower than the non-constant-time inversion. We
can regain some of this speed later by dynamically generating addition
chains.
2019-12-19 12:25:39 -06:00
Jack Grigg
26ef9c9842
Pass modulus to prime_field_constants_and_sqrt by reference 2019-12-19 12:18:09 -06:00
ebfull
f5914fe804
Merge pull request #192 from str4d/ff-pow_vartime-and-no_std
ff::Field::pow_vartime and no_std support
2019-12-19 08:56:02 -07:00
Jack Grigg
ec2c304efd
no_std support for ff crate 2019-12-14 12:55:34 +00:00
Jack Grigg
1c9f5742fa
Improve Field::pow API and impl
Renamed to Field::pow_vartime to indicate it is still variable time with
respect to the exponent.
2019-12-14 12:27:48 +00:00
str4d
e88e2a9dc2
Merge pull request #191 from str4d/ff-ct-inv-and-sqrt-apis
Constant-time APIs for ff::Field::[invert, sqrt]
2019-12-13 22:29:50 +00:00
Jack Grigg
3d2acf48ce
Constant-time field square root
WARNING: THIS IS NOT FULLY CONSTANT TIME YET!

This will be fixed once we migrate to the jubjub and bls12_381 crates.
2019-12-13 20:13:30 +00:00
Jack Grigg
40749da9a7
Constant-time field inversion
WARNING: THIS IS NOT ACTUALLY CONSTANT TIME YET!

The jubjub and bls12_381 crates will replace our constant-time usages,
but we NEED to fix ff_derive because other users will expect it to
implement the Field trait correctly.
2019-12-13 19:46:04 +00:00
str4d
e85a9f309f
Merge pull request #190 from str4d/ff-more-ops
More ff::Field operator refactoring
2019-12-13 18:53:07 +00:00
Jack Grigg
662be3551f
impl ConditionallySelectable for Field 2019-12-12 23:15:48 +00:00
Jack Grigg
cded08b0c5
Make Field::square take &self and return Self 2019-12-12 23:09:28 +00:00
Jack Grigg
9dac748224
Make Field::double take &self and return Self 2019-12-12 22:59:18 +00:00
Jack Grigg
91c32f1c7c
Move from Field::negate to Neg operator 2019-12-12 22:52:17 +00:00
str4d
4a3350bc31
Merge pull request #189 from str4d/ff-std-ops
Move Field operations to operator-backed traits
2019-12-12 22:32:32 +00:00
Jack Grigg
27c8f34601
Move Field operations to operator-backed traits
The ff_derive, pairing, zcash_primitives::jubjub, and bellman dummy_engine
changes are minimally implemented on top of the existing *_assign()
functions.
2019-12-12 21:19:46 +00:00
str4d
2f7dd6094c
Merge pull request #188 from ebfull/bls12_381_and_jubjub
New BLS12-381 and Jubjub implementations
2019-12-12 19:56:31 +00:00
Sean Bowe
6eddfb11ba
Update Travis CI configuration for Rust version 2019-12-12 11:49:53 -07:00
Sean Bowe
96f602e452
cargo fmt 2019-12-12 11:46:05 -07:00
Sean Bowe
a4f7c4eef3
Include jubjub and bls12_381 crates in the workspace. 2019-12-12 11:40:48 -07:00
Sean Bowe
281cfe1912 Merge commit 'd029ddea8396d7a39910028dd5ae436a3bd3e9bb' as 'jubjub' 2019-12-12 11:32:47 -07:00
Sean Bowe
d029ddea83 Squashed 'jubjub/' content from commit 9987ddf
git-subtree-dir: jubjub
git-subtree-split: 9987ddf8d17a87bd2b14627665768e4038b657c4
2019-12-12 11:32:47 -07:00
Sean Bowe
f5217b56d7 Merge commit 'dbd9bd1b9b43038e60bda8f14576580e51924ea0' as 'bls12_381' 2019-12-12 11:32:35 -07:00
Sean Bowe
dbd9bd1b9b Squashed 'bls12_381/' content from commit a9c2c4e
git-subtree-dir: bls12_381
git-subtree-split: a9c2c4e27b36c94b91aa37ddbad0e9ff4b2c5dc6
2019-12-12 11:32:35 -07:00
Sean Bowe
01ab2bd3df
Start relying on Rust 1.39.0 2019-12-12 11:31:00 -07:00
str4d
18aceea225
Merge pull request #50 from zancas/mv_tests_extract_data
Mv tests extract data
2019-12-12 17:46:38 +00:00
zancas
0aa127d7b1
refactor to manage test code and data in separate modules 2019-12-11 23:58:13 +00:00
str4d
8626cc7f26
Merge pull request #186 from str4d/multicore-feature-flag
Pass bellman's multicore feature flag through to zcash_proofs
2019-12-11 20:04:45 +00:00
Jack Grigg
eed7e8199f
Pass bellman's multicore feature flag through to zcash_proofs
This enables someone using zcash_proofs to disable multicore.
2019-12-11 18:46:47 +00:00
str4d
c3f9e2d73c
Merge pull request #180 from str4d/mmr-cleanups
MMR API cleanups
2019-12-05 16:35:28 +00:00
Jack Grigg
cca1670248
Clarify length of return buffer for appended leaves 2019-12-05 14:33:03 +00:00
Jack Grigg
f1619f896c
Clearer variable names in MMR tests 2019-12-05 14:29:08 +00:00
Jack Grigg
edcd884fe8
Simplify short array copies 2019-12-05 14:24:31 +00:00
Jack Grigg
583a04b4de
Pass array references correctly in MMR tests 2019-12-05 14:23:59 +00:00
Jack Grigg
573510115d
Clean up remainder of MMR code 2019-12-05 11:11:32 +00:00
Jack Grigg
8ad33e50a6
Use explicit sizes for pointers to arrays in FFI 2019-12-05 11:09:55 +00:00
Jack Grigg
fb8c73c950
Use iterators in construct_mmr_tree 2019-12-05 11:06:26 +00:00
Nikolay Volf
9ea0427678 MMR trees API (#118)
The main design goals of this mmr implementation were

1. Avoid database callbacks. As it is implemented, calling side must just smartly pre-load MMR nodes from the database (about log2(tree length) for append, twice as much for deletion).

2. Reuse as much code/logic between rust and c++ clients.

3. Close to zero memory consumption.
2019-12-04 21:24:26 +00:00
ebfull
dd112813a1
Merge pull request #174 from str4d/152-nu-awareness
Network upgrade awareness
2019-12-04 10:42:16 -07:00
str4d
0907adf608
Merge pull request #176 from str4d/156-scan_transaction
zcash_client_backend::decrypt_transaction
2019-12-03 23:15:17 +00:00
Nikolay Volf
e2c131fdc3
Merge pull request #5 from NikVolf/review-fixes
Review and other fixes
2019-11-29 01:10:27 -08:00
NikVolf
9059f53873 fix review notes and other issues 2019-11-28 15:36:39 +03:00
NikVolf
26be46573e add hash of the node method 2019-11-28 10:31:16 +03:00
str4d
7820548ea3
Merge pull request #173 from gregdhill/bvk-to-cv_sum
rename bvk to cv_sum
2019-11-27 20:42:54 +00:00
Jack Grigg
d5ed684701
zcash_client_backend::decrypt_transaction 2019-11-27 15:45:13 +00:00
Jack Grigg
e6a8630b35
impl TryFrom<u32> for BranchId 2019-11-27 13:18:31 +00:00
Jack Grigg
cd326f2b6a
Consensus parameters for network upgrades 2019-11-27 13:18:30 +00:00
Jack Grigg
c24024b8e1
Create a consensus::BranchId enum for type safety
Includes all currently-known consensus branch IDs for the Zcash network.
2019-11-25 21:04:20 +00:00
Gregory Hill
7eb4a6d1d9
rename bvk to cv_sum
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
2019-11-25 14:28:19 +00:00
str4d
141821d3c1
Merge pull request #157 from adityapk00/transparent_compile_fix
Compile Fix: Add missing sighash declaration
2019-11-14 19:03:59 +00:00