Cryptoforge
2981c4d286
use u32 instead of consesus::BranchID for transaction building. Enables multichain useage.
2020-10-12 15:01:31 -07:00
Cryptoforge
0883d7f3fc
add set_fee to tx builder
2020-07-30 21:37:54 -07:00
Cryptoforge
1ce4e97632
use zero consensus ids
2020-07-12 22:31:27 -07:00
adityapk00
ff0ffc3d1b
Merge pull request #4 from adityapk00/update
...
Update librustzcash June 2020
2020-06-06 17:52:03 -07:00
Aditya Kulkarni
a69806cca3
Fix lint
2020-05-16 22:32:27 -07:00
Aditya Kulkarni
4f129e6a83
Add transparent address decode
2020-05-16 22:24:05 -07:00
Aditya Kulkarni
a0384d4fac
Update master
2020-05-16 21:44:34 -07:00
str4d
41d9f293d4
Merge pull request #229 from therealyingtong/106-hardcode-sapling-circuit-hashes
...
Hard-code Sapling circuit hashes in zcash_proofs crate
2020-05-14 17:06:07 +12:00
Jack Grigg
f446b45af5
cargo fmt
2020-05-14 16:06:58 +12:00
ying tong
6845154d88
Update zcash_proofs/src/lib.rs
...
Co-authored-by: str4d <thestr4d@gmail.com>
2020-05-14 11:30:13 +08:00
therealyingtong
d480a3840a
Hard-code Sapling circuit hashes in zcash_proofs crate
...
Define the spend_hash, output_hash, sprout_hash circuit hashes as constants in the load_parameters function, so we don't have to take them as function arguments.
2020-05-13 22:36:21 +08:00
str4d
37270776be
Merge pull request #228 from str4d/ff-more-trait-refactoring
...
ff: More trait refactoring
2020-05-13 09:18:11 +12:00
Jack Grigg
c597db59a6
ff: Rename PrimeField::into_repr -> PrimeField::to_repr
2020-05-02 18:55:13 +12:00
Jack Grigg
9114c367f4
ff_derive: Generate modulus representation with correct endianness
...
Now that PrimeField::ReprEndianness exists, users can obtain a
known-endianness representation from the output of PrimeField::char
(which is a PrimeField::Repr, and should return a representation with
the same endianness as PrimeField::into_repr).
2020-05-02 18:54:02 +12:00
Jack Grigg
15e229509a
ff: Move pow_vartime back into Field trait
...
The only places we don't use constant u64 limbs, we use PrimeField::char
instead (except in a single test where we use a field element).
2020-05-02 18:54:02 +12:00
Jack Grigg
fb31d09218
ff: Remove Ord bound from PrimeField
...
ff_derive still implements Ord and PartialOrd for the fields it
implements, because pairing::bls12_381 internally assumes that those are
implemented. Once we delete that implementation, we will remove the Ord
and PartialOrd implementations from ff_derive.
2020-05-02 18:54:02 +12:00
Jack Grigg
38f87c2e73
ff: Add PrimeField::ReprEndianness associated type
...
This enables generic code to reliably operate on the bits of an encoded
field element, by converting them to and from a known (little)
endianness.
The BitAnd and Shr bounds on PrimeField are now removed, as users can
perform these operations themselves as needed.
2020-05-02 18:54:02 +12:00
Jack Grigg
55568b4d6e
ff: Remove frobenius_map from Field trait
...
It is only used internally in the bls12_381 crate, and field extensions
aren't exposed anywhere in the Zcash stack.
2020-05-02 16:07:48 +12:00
Jack Grigg
1761ebfb35
ff: Remove SqrtField trait
...
The sqrt() function is now part of the Field trait. ff_derive returns an
error on fields for which it does not support generating a square root
function.
Note that Fq6 and Fq12 in pairing::bls12_381 leave the function
unimplemented. They will be dropped once the migration to the bls12_381
crate is complete. The equivalent structs in that crate are not exposed.
2020-05-02 16:07:48 +12:00
str4d
b02cf3b467
Merge pull request #223 from str4d/remove-primefieldrepr
...
Remove ff::PrimeFieldRepr
2020-05-01 08:59:41 +12:00
Jack Grigg
49f119fb03
ff: Remove PrimeFieldRepr trait
...
The ff::PrimeField::Repr associated type now has the minimal necessary
bounds, which can be satisfied by a newtype around a byte array.
2020-04-23 18:15:14 +12:00
Jack Grigg
1fe3e3784c
ff: Add Ord bound to PrimeField
2020-04-23 17:31:33 +12:00
Jack Grigg
1a40cfd39c
zcash_primitives: Make jubjub::Fs::invert constant time
2020-04-23 16:23:24 +12:00
Jack Grigg
08500ee712
ff: PrimeField: BitAnd<u64, Output = u64> + Shr<u32, Output = Self>
2020-04-23 16:23:24 +12:00
Jack Grigg
1fdca393bb
ff: PrimeField::{is_even, is_odd}
2020-04-23 16:23:24 +12:00
Jack Grigg
232f0a50b8
ff: Rework BitIterator to work with both u8 and u64 limb sizes
...
This enables BitIterator to be used with both the byte encoding and limb
representation of scalars.
2020-04-23 16:23:24 +12:00
Jack Grigg
fd79de5408
ff: Add PrimeField: From<u64> constraint
2020-04-23 16:23:24 +12:00
str4d
b82dac13d9
Merge pull request #221 from adityapk00/binding_sig
...
Add binding signature only if needed
2020-04-16 13:46:26 +12:00
Aditya Kulkarni
3ccadf3017
Add binding signature only if needed
2020-04-04 10:29:30 -07:00
Aditya Kulkarni
7dba253ad5
partial test
2020-04-04 10:27:51 -07:00
Aditya Kulkarni
98f9bda329
Add binding signature only if needed
2020-04-04 08:21:06 -07:00
Jack Grigg
b6457a905b
ff: Move pow_vartime into a trait that is generic over the limb size
...
The trait is implemented by default for u8 and u64, allowing pow_vartime
to be used with both the byte encoding and limb representation of field
elements.
2020-03-28 00:27:59 +13:00
Jack Grigg
69c60530d4
group: Rewrite wNAF to remove dependency on ff::PrimeFieldRepr
...
Adapted from Scalar::non_adjacent_form in curve25519-dalek.
2020-03-26 22:32:17 +13:00
Jack Grigg
6e53cf3c4c
group: Take scalar by reference in CurveProjective::recommended_wnaf_for_scalar
2020-03-26 19:00:46 +13:00
str4d
97c21e0c1a
Merge pull request #219 from str4d/remove-lockfile
...
Remove Cargo.lock
2020-03-26 07:54:05 +13:00
Jack Grigg
c1b5a80304
Add Cargo.lock to .gitignore
2020-03-25 17:24:50 +13:00
Jack Grigg
3cc32aacbc
Remove Cargo.lock
...
Now that the librustzcash crate has been removed from the repository and
workspace, there are no crates that generate binary artifacts, and cargo
ignores Cargo.lock when publishing library crates.
2020-03-25 17:19:27 +13:00
ebfull
ce39a3c48e
Merge pull request #196 from str4d/pow-fixed
...
Speed up Field::invert and SqrtField::sqrt in ff_derive with addition chains
2020-03-14 09:44:02 -06:00
str4d
8a737f5441
Merge pull request #218 from str4d/remove-librustzcash
...
Remove librustzcash crate
2020-03-14 16:08:22 +13:00
Jack Grigg
2942e9a7e6
Generate addition chains inside Field::invert and SqrtField::sqrt
2020-03-14 10:54:22 +13:00
Jack Grigg
232fb4b7a3
Procedural macro for fixed-exponent variable-base modular exponentiation
...
Uses the addchain crate to obtain an addition chain for the exponent,
and then generates the corresponding constant-time square-and-multiply
algorithm.
2020-03-14 10:54:22 +13:00
Jack Grigg
16ba891726
Remove librustzcash crate
...
This crate now lives in https://github.com/zcash/zcash , which is the
sole intended consumer of the C FFI.
2020-03-14 10:50:04 +13:00
Jack Grigg
2df2a2b2f2
Merge branch 'develop'
2020-03-14 10:36:58 +13:00
str4d
53bd5d4724
Merge pull request #216 from ebfull/crate-updates
...
Crate updates
2020-03-13 12:04:12 +13:00
Sean Bowe
100878cd14
Version bump of all crates (except librustzcash)
2020-03-12 15:59:19 -06:00
Sean Bowe
f3f8964001
Remove Sized for RngCore
...
Co-authored-by: Weiliang Li <to.be.impressive@gmail.com>
2020-03-12 15:32:44 -06:00
ebfull
d9ac7bd19b
Merge pull request #214 from ebfull/manifest-updates
...
Update manifest for zcash_history
2020-03-04 10:05:44 -07:00
Sean Bowe
0f0d84e9ca
Update manifest for zcash_history.
2020-03-04 09:28:56 -07:00
ebfull
49459d030f
Merge pull request #213 from str4d/zip-221-change
...
Update zcash_history with ZIP 221 change
2020-03-04 09:04:14 -07:00
Jack Grigg
cafbe61eba
Commit to number of Sapling transactions instead of shielded transactions
2020-03-04 18:25:35 +13:00