Commit Graph

624 Commits

Author SHA1 Message Date
Deirdre Connolly 21eca164d8 Refine Output description ephemeral_key to jubjub::AffinePoint
And impl Arbitrary for Output to support better generation of those points in proptests.
2020-04-18 22:05:13 -04:00
Deirdre Connolly 7a4be955be Remove todo 2020-04-18 22:05:13 -04:00
dependabot-preview[bot] 83ee4c2ca3 Bump hyper from 0.13.4 to 0.13.5
Bumps [hyper](https://github.com/hyperium/hyper) from 0.13.4 to 0.13.5.
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v0.13.4...v0.13.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-18 08:43:40 +00:00
Deirdre Connolly b53be18c8f Remove unused From<[u8; 32]> for SpendAuthorizingKey 2020-04-18 04:40:31 -04:00
Deirdre Connolly 630d021886 Remove unused From<[u8; 32]> for ProofAuthorizingKey 2020-04-18 04:40:31 -04:00
Deirdre Connolly d445799626 Remove the Deref's and make the From's consistent for all key types 2020-04-18 04:40:31 -04:00
Deirdre Connolly 37337c9e44 Remove some impl Deref's and PartialEq's that weren't used
Add some impl From<T> for [u8; 32] 's
2020-04-18 04:40:31 -04:00
Deirdre Connolly f8022442cf Remove some currently unused From impls for [u8; 32] 2020-04-18 04:40:31 -04:00
Deirdre Connolly 252acd85d8 Tidy imports 2020-04-18 04:40:31 -04:00
Deirdre Connolly 2156c6143b Complete impl Arbitrary for TransmissionKey 2020-04-18 04:40:31 -04:00
Deirdre Connolly abcca2c76b Finish Sapling keys roundtrip proptest 2020-04-18 04:40:31 -04:00
Deirdre Connolly 001b39c588 Impl PartialEq for AuthorizingKey and FullViewingKey 2020-04-18 04:40:31 -04:00
Deirdre Connolly 5d430cff12 Do not try to make a jubjub extended point work as a scalar in redjubjub PublicKey From impl 2020-04-18 04:40:31 -04:00
Deirdre Connolly 94c6d74ecb Add sapling key derivation bech32 encoding roundtrip proptest
And fix SpendingKey Display impl bug.
2020-04-18 04:40:31 -04:00
Deirdre Connolly 9daa1ba3c8 Impl PartialEq for some Sapling keys 2020-04-18 04:40:31 -04:00
Deirdre Connolly ba3ba6d2d9 Impl From<SpendingKey> for Diversifier
This is the _DefaultDiversifier_ method.
2020-04-18 04:40:31 -04:00
Deirdre Connolly 16f1e3061f Impl From<(AuthorizingKey, NullifierDerivingKey)> for IncomingViewingKey 2020-04-18 04:40:31 -04:00
Deirdre Connolly e508d09e9b Move sapling key tests to own module, test key derivation against test vectors
Impl a few From<[u8; 32]>'s for a few key types.
2020-04-18 04:40:31 -04:00
Deirdre Connolly ce1415a8ee Add generated test vectors from zcash-hackworks/zcash-test-vectors 2020-04-18 04:40:31 -04:00
Deirdre Connolly f01ea1b4fa Fix some Sprout key doc/message nits 2020-04-18 04:40:31 -04:00
Deirdre Connolly adab7335b6 Impl From<[u8; 32]>/Display/FromStr for Sapling SpendingKey, including network field 2020-04-18 04:40:31 -04:00
Deirdre Connolly 68c281c590 Impl Display/FromStr for Sapling IncomingViewingKey, including network field 2020-04-18 04:40:31 -04:00
Deirdre Connolly cdfcdc4751 Tidy imports 2020-04-18 04:40:31 -04:00
Deirdre Connolly 3eeb9925eb Impl Debug, Display, and FromStr for Sapling FullViewingKey 2020-04-18 04:40:31 -04:00
Deirdre Connolly c30a5a64b2 Get Sapling zaddr encoding roundtrip proptest working for now
TransmissionKey is just the jubjub affine point identity for now. :/
2020-04-18 04:40:31 -04:00
Deirdre Connolly aa18937b60 Add network, impl Display and FromStr for SaplingShieldedAddress 2020-04-18 04:40:31 -04:00
Deirdre Connolly ef9ab8b0ab Remove Debug test 2020-04-18 04:40:31 -04:00
Deirdre Connolly 01599a0735 Fix unneeded initial value and mut 2020-04-18 04:40:31 -04:00
Deirdre Connolly 23cd346f28 Add missing doc comment for sapling addresses 2020-04-18 04:40:31 -04:00
Deirdre Connolly 43e60fd9a9 Lots of doc improvements 2020-04-18 04:40:31 -04:00
Deirdre Connolly 33821d427d Add a lazy derive_keys_and_addresses test 2020-04-18 04:40:31 -04:00
Deirdre Connolly f9d6625fae All Sapling key derivation looks to be working
Modulo actual test vectors! Currently testing with random data each time to
just see if all the types derive without panicking.
2020-04-18 04:40:31 -04:00
Deirdre Connolly b7bd642910 Clippy pass 2020-04-18 04:40:31 -04:00
Deirdre Connolly bc13bccb8d Add a bunch of stuff for JubJub GroupHash, FindGroupHash, etc
Until it can be imported into the jubjub crate and upstreamed.
It has been ported from the types used in zcash_primitives and cleaned up
but still needs testing.
2020-04-18 04:40:31 -04:00
Deirdre Connolly 4acce5aa30 Remove static lifetime on some constants 2020-04-18 04:40:31 -04:00
Deirdre Connolly 7e2ae70d66 Wrap AuthorizingKey around redjubjub::PublicKey<SpendAuth>
And derive From's and Into's for it, halfway through full key derivation via a test case.
2020-04-18 04:40:31 -04:00
Deirdre Connolly 8388b13ac9 Turn all type aliases into wrapper types with impl Deref 2020-04-18 04:40:31 -04:00
Deirdre Connolly b9deef2956 Break out crh_ivk() and invoke in IncomingViewingKey derivation
There is only one invocation of this PRF but it's nice to keep it consistent with
the PRF^expand ones we have too.
2020-04-18 04:40:31 -04:00
Deirdre Connolly 786677e07b Add and use prf_addr() for sprout key derivation 2020-04-18 04:40:31 -04:00
Deirdre Connolly 13f2c229d9 Add prf_expand() and use that in sapling key derivation 2020-04-18 04:40:31 -04:00
Deirdre Connolly b3db623e29 Fill out SaplingShieldedAddress impls and some tests 2020-04-18 04:40:31 -04:00
Deirdre Connolly 451e592b28 Tidy keys::sapling, add commented out Arbitrary impl for now 2020-04-18 04:40:31 -04:00
Deirdre Connolly 7402a54379 Add bech32 2020-04-18 04:40:31 -04:00
Deirdre Connolly 743330fd0b Make several types wrap jubjub types and impl Deref 2020-04-18 04:40:31 -04:00
Deirdre Connolly 145afb7bda 2 Blakes, 2 Serious 2020-04-18 04:40:31 -04:00
Deirdre Connolly 39278a3095 Parameterize AuthorizingKey as PublicKeyBytes<SpendAuth> 2020-04-18 04:40:31 -04:00
Deirdre Connolly 097d4617df Update sapling keys derived from spending key via blake2b 2020-04-18 04:40:31 -04:00
Deirdre Connolly b167a3b96e Create our own Scalar alias for now 2020-04-18 04:40:31 -04:00
Deirdre Connolly 8add92445c Add jubjub, replace blake2 with blake2b_simd 2020-04-18 04:40:31 -04:00
Deirdre Connolly 1219f1b552 Improve FullViewingKey doc comment 2020-04-18 04:40:31 -04:00