Commit Graph

34 Commits

Author SHA1 Message Date
Deirdre Connolly e024e43896 Support nullifier derivation from borrowed Spending, NullifierDeriving keys 2020-08-14 02:04:12 -04:00
Deirdre Connolly b2584c4a8f A space 2020-08-14 02:04:12 -04:00
Deirdre Connolly 0f46a9b6a8 NoteCommitments, renames, ValueCommitment, strategies, stub commit() 2020-08-14 02:04:12 -04:00
Deirdre Connolly fa053e2b0b Derive a Sprout nullifier from a nullifier seed (rho) and spending key 2020-08-14 02:04:12 -04:00
Deirdre Connolly 2c285985c8 Move nullifiers to respective note modules, pull in existing types from keys 2020-08-14 02:04:12 -04:00
Jane Lusby 4a2d2a359c
add cargo fmt to ci (#403)
* add cargo fmt to ci

* rebase on main

* switch to stable

Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-05-27 19:12:25 -07:00
Jane Lusby b6b35364f3 cleanup warnings throughout codebase 2020-05-27 15:42:29 -04:00
Deirdre Connolly 6ed6ccd62e Clean up imports and some doc comments 2020-04-29 22:42:52 -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 f01ea1b4fa Fix some Sprout key doc/message nits 2020-04-18 04:40:31 -04:00
Deirdre Connolly b7bd642910 Clippy pass 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 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