Deirdre Connolly
21a8a29404
Better doc comments for Sprout SpendingKey fields
2020-04-15 03:22:48 -04:00
Deirdre Connolly
e057e120bb
Impl Display/FromStr/ZcashSerialize/ZcashDeserialize for Sprout SpendingKey
...
Includes new field because the raw and Base58Check encoding depends on it.
2020-04-15 03:22:48 -04:00
Deirdre Connolly
e83cddf4c6
Impl Display/FromStr/ZcashSerialize/ZcashDeserialize for Sprout IncomingViewingKeys
...
To match the raw and Base58Check encodings as in
https://zips.z.cash/protocol/protocol.pdf#sproutinviewingkeyencoding
2020-04-15 03:22:48 -04:00
Deirdre Connolly
2a7838d8e5
Clear up doc comments on SpendingKey
2020-03-28 02:42:13 -04:00
Deirdre Connolly
2e063998fb
Add a new() and impl From<[u8; 32]> for SpendingKey
...
Currently fills/receives 32 random bytes and forces the top 4 bits to
zero, ala clamping. If there is a nicer way to csprng'ly fill 252 bits
without clamping, that would be nicer, less bias.
2020-03-28 02:42:13 -04:00
Deirdre Connolly
34f4bf05cd
Tidy
2020-03-28 02:42:13 -04:00
Deirdre Connolly
9a20b20070
Better doc comment for IncomingViewingKey
2020-03-28 02:42:13 -04:00
Deirdre Connolly
3bad5304b2
Explicitly use sha2::compress256
2020-03-28 02:42:13 -04:00
Deirdre Connolly
ffac1a33d7
Impl Debug for PayingKey
2020-03-28 02:42:13 -04:00
Deirdre Connolly
2fa566a35f
Impl Debug and Display for SproutShieldedAddress
2020-03-28 02:42:13 -04:00
Deirdre Connolly
720a507ba3
Use compress feature flag with hashes crate and re-exported compress256
2020-03-28 02:42:13 -04:00
Deirdre Connolly
48dbcab00e
Clippy tidy
2020-03-28 02:42:13 -04:00
Deirdre Connolly
a241cb536a
Add a TODO comment
2020-03-28 02:42:13 -04:00
Deirdre Connolly
f84a8c682a
Derive PayingKey's from SpendingKey's
...
And test that we can still derive TransmissionKey's from PayingKey's,
as they are aliases for x25519_dalek PublicKey/StaticSecret types that already
impl From<_> for each other.
2020-03-28 02:42:13 -04:00
Deirdre Connolly
ee32de2b86
Derive Sprout ReceivingKey's from SpendingKey's via SHA256Compress
...
Test is incomplete, also the type aliases block us from impl'ing Debug or Display.
2020-03-28 02:42:13 -04:00
Deirdre Connolly
bba58807bb
Pull in fork of sha2 that exposes compress256 round function
2020-03-28 02:42:13 -04:00
Deirdre Connolly
ecbd1bf825
Make ReceivingKey a type alias for x25519_dalek::StaticSecret
...
Plus some doc comments
2020-03-28 02:42:13 -04:00
Deirdre Connolly
c3700c1a37
Update SproutShieldedAddress types
...
Use magics module.
Stub out key types, including a TransmissionKey alias for x25519_dalek::PublicKey
2020-03-28 02:42:13 -04:00
Deirdre Connolly
7af9b80f3b
Add the beginnings of Sprout and Sapling key types
2020-03-28 02:42:13 -04:00
Deirdre Connolly
b03d70090f
Module-level doc comments
2020-03-28 02:42:13 -04:00
Deirdre Connolly
9a4e4e4236
Stub out transparent addresses, keys with secp256k1
2020-03-12 22:02:17 -04:00
Deirdre Connolly
0998b90392
Stub out sprout, sapling key modules
2020-03-12 22:02:17 -04:00