Commit Graph

202 Commits

Author SHA1 Message Date
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 caa06c901d Update zebra-chain/src/addresses/sprout.rs doc comment
Co-Authored-By: Daira Hopwood <daira@jacaranda.org>
2020-03-28 02:42:13 -04:00
Deirdre Connolly 66b33172e4 Impl Arbitrary for SproutShieldedAddress and add roundtrip test 2020-03-28 02:42:13 -04:00
Deirdre Connolly fae9da7dd9 Impl PartialEq and Eq for SproutShieldedAddress 2020-03-28 02:42:13 -04:00
Deirdre Connolly a7e5d37296 Use updated RustCrypto/hashes source of sha2 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 c836dcf3b6 Docs 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 01afa09575 Move magic bytes to nested private modules for t-addrs 2020-03-28 02:42:13 -04:00
Deirdre Connolly 1e71793357 Filling out Sprout and Sapling Shielded Addresses 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 b4832ab7cb Add x25519-dalek as dependency 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 ea773c7a4b Add module-level doc comment for keys/transparent.rs 2020-03-28 02:42:13 -04:00
Deirdre Connolly 532bbaf460 Impl zcash_deserialize for secp256k1::PublicKey 2020-03-28 02:42:13 -04:00
Deirdre Connolly 3fbfd10f2c Finish migration of TransparentAddress out of addresses.rs 2020-03-28 02:42:13 -04:00
Deirdre Connolly 7ea39fbdce Use secp256k1 serde flag to make keys serializable 2020-03-28 02:42:13 -04:00
Deirdre Connolly bd247067ae Move TransparentAddress stuff to its own module 2020-03-28 02:42:13 -04:00
Henry de Valence 824193eeeb Add block 434873 with a bad version field. 2020-03-18 21:34:02 -04:00
Henry de Valence 6ec934a8d7 impl FromStr for BlockHeaderHash
This is very convenient for putting block hashes in the source code.
2020-03-18 21:34:02 -04:00
Henry de Valence dd8ba287bf Correct block version parsing. 2020-03-18 21:34:02 -04:00
Deirdre Connolly 2a155cadfc Fix some clippy lints 2020-03-12 22:02:17 -04:00
Deirdre Connolly b9240971fd Add impl Arbitrary for TransparentAddress and a roundtrip proptest
addresses.rs is now large with just transparent stuff, i am already planning to break this up
further in the addresses/ module.
2020-03-12 22:02:17 -04:00
Deirdre Connolly 4b53c2eac3 Remove AddressPayloadHash, move hashing to TransparentAddress method 2020-03-12 22:02:17 -04:00
Deirdre Connolly a5f4db7528 Move just the Network enum to -chain, keep everything else in -network 2020-03-12 22:02:17 -04:00
Deirdre Connolly b68e1e2d55 Move Network, Magic, and magics to zebra-chain 2020-03-12 22:02:17 -04:00
Deirdre Connolly 14120cf828 Clean up comments 2020-03-12 22:02:17 -04:00
Deirdre Connolly 27d960c61e Remove an answered XXX 2020-03-12 22:02:17 -04:00
Deirdre Connolly 5602ed66a9 Add tests, use Base58Check, not Base58 2020-03-12 22:02:17 -04:00
Deirdre Connolly f11821fcc8 base58 to string 2020-03-12 22:02:17 -04:00
Deirdre Connolly 9887b7c8b7 Fix up TransparentAddresses 2020-03-12 22:02:17 -04:00
Deirdre Connolly 16ee53a909 Impl zcash_(de)serialize for TransparentAddress 2020-03-12 22:02:17 -04:00
Deirdre Connolly 72ddc7d7a1 Add AddressPayloadHash type
Includes From impls for Script, secp256k1::PublicKey
2020-03-12 22:02:17 -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
Deirdre Connolly db86ef6e8b Pull in secp256k1 wrapper crate as a dep 2020-02-28 13:19:47 -05:00
Henry de Valence ff3efd504c Add Zebra logo to all workspace crates.
Also add html_root_url attributes.
2020-02-26 21:25:35 -08:00
Deirdre Connolly af455f9896 Refine Note types a little more 2020-02-22 22:24:26 -05:00
Deirdre Connolly a6a3a640ca Tidied up some note encryption types 2020-02-22 18:33:51 -05:00
Deirdre Connolly 8aefadd00f Add multiple types to lay out NotePlaintext's for sprout and sapling 2020-02-22 18:33:51 -05:00
Deirdre Connolly 1a10975389 Add memo test vector for invalid utf8 bytes 2020-02-22 18:33:51 -05:00
Henry de Valence afa2c2347f fmt 2020-02-21 06:48:25 -05:00