Commit Graph

2143 Commits

Author SHA1 Message Date
Kris Nuttycombe 132df78a31 Add serialization and deserialization for AccountPubKey 2022-01-27 08:52:12 -07:00
Kris Nuttycombe 6fcdfda69e Derive OVKs from transparent account-level key, not child keys.
This also renames a number of legacy key types to better reflect
their intended use.
2022-01-26 13:36:27 -07:00
Kris Nuttycombe 47fc12704b Fix doctest compilation. 2022-01-25 10:01:48 -07:00
Kris Nuttycombe 0b43535203 Move OutgoingViewingKey to zcash_primitives::keys 2022-01-25 08:53:51 -07:00
Kris Nuttycombe f58d191439 Move transparent account keys to zcash_primitives. 2022-01-25 08:53:51 -07:00
Kris Nuttycombe 72c2e54a7b Add explicit serialize and deserialize methods to ExternalPubKey
The serialization defined by HDWallet for the fields of ExtendedPubKey
is in the opposite field order from what is defined in ZIP 316.
2022-01-24 16:25:06 -07:00
therealyingtong 8b0c1c4ab2 transparent::ExternalPubKey: impl TryFrom for &[u8; 65]. 2022-01-24 14:41:40 +08:00
Kris Nuttycombe 4068075ffd Merge remote-tracking branch 'upstream/non-consensus-changes-on-branchid-37519621' into autoshield-poc-daa 2022-01-22 23:10:47 -07:00
Kris Nuttycombe cec128b8c7
Merge pull request #480 from zcash/transparent-ovk
[ZIP 316] Transparent internal and external ovk
2022-01-22 23:03:12 -07:00
Kris Nuttycombe 4dac37ffde Ensure that transparent input functionality is correctly feature-flagged. 2022-01-22 22:33:22 -07:00
therealyingtong a7ea5f0bc1 Implement TryFrom<&[u8] for ExternalPubKey. 2022-01-22 22:29:45 -07:00
therealyingtong 6f776aacc3 zcash_primitives::zip316::transparent: Parse Ufvk from zcash_address. 2022-01-22 22:29:45 -07:00
therealyingtong c9fe8402e2 Use transparent internal ovk in shield_transparent_funds(). 2022-01-22 22:29:45 -07:00
therealyingtong 5033d29d2f zip316::transparent: Implement ZIP 316 transparent internal ovk. 2022-01-22 22:29:45 -07:00
therealyingtong a4c9f53a3a Move ExternalPrivKey, ExternalPubKey to zcash_primitives. 2022-01-22 22:29:45 -07:00
therealyingtong 1f9b9fc147 zcash_primitives: Do not gate secp256k1 on transparent-inputs feature flag. 2022-01-22 22:04:32 -07:00
Kris Nuttycombe 40377dd9ab
Merge pull request #475 from zcash/sapling-internal-keys
Derive Sapling internal keys.
2022-01-22 20:06:40 -07:00
Kris Nuttycombe 54cca8081b Update zcash_primitives/CHANGELOG.md with change key derivation methods. 2022-01-22 19:35:01 -07:00
Kris Nuttycombe 15eb5aab50 Fix a minor naming error in AccountPubKey 2022-01-21 19:08:26 -07:00
Kris Nuttycombe 7d873e9d79 Fix test compilation errors related to UFVK construction. 2022-01-21 19:01:32 -07:00
Kris Nuttycombe 574ca4e180 Add accessors to UnifiedSpendingKey 2022-01-21 18:20:12 -07:00
Kris Nuttycombe 281a4d5c16 Add accessors for the ExtendedPrivKey wrapped by AccountPrivKey 2022-01-21 18:07:23 -07:00
Kris Nuttycombe 7c03dbdc95 Add convenience method for amount sums. 2022-01-21 16:48:53 -07:00
Kris Nuttycombe 00aee09662 Add accessors for the ExtendedPubKey wrapped by AccountPubKey 2022-01-21 14:02:51 -07:00
Kris Nuttycombe dec395a5b0 Add unified spending keys. 2022-01-21 13:54:23 -07:00
Kris Nuttycombe 8f408354b9 Remove cyclic dev dependency between zcash_client_backend and zcash_client_sqlite. 2022-01-20 21:50:26 -07:00
Kris Nuttycombe f75ffb0eaf Document wallet database initialization. 2022-01-20 20:20:58 -07:00
Kris Nuttycombe 79bd2f7733 Add missing documentation & rustfmt. 2022-01-20 20:14:44 -07:00
Kris Nuttycombe ffc4d0cefb Add newtypes for transparent keys at the account & external levels.
This updates UnifiedFullViewingKey to conform to ZIP 316, and
adds types that facilitate this support. These types should likely
be factored out from `zcash_client_backend` into `zcash_primitives`
along with the remainder of the existing unified address support.
2022-01-20 20:03:20 -07:00
therealyingtong eb80138cf9 Document new APIs for deriving internal keys. 2022-01-21 10:49:17 +08:00
Kris Nuttycombe 82c1d87dcd
Fix incorrect length of blake2b hashes for internal key derivation.
Co-authored-by: str4d <jack@electriccoin.co>
2022-01-20 18:08:01 -07:00
Kris Nuttycombe 37e6d3a2bc Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Co-authored-by: ying tong <yingtong@z.cash>
2022-01-20 16:43:57 -07:00
Kris Nuttycombe 3dd1f310d9 Merge remote-tracking branch 'upstream/non-consensus-changes-on-branchid-37519621' into autoshield-poc-daa 2022-01-20 13:54:38 -07:00
Kris Nuttycombe da3833f906 Fix missing use of `dk` in derivation of sapling internal FVK.
Also, factor out sapling internal fvk derivation so that it only
requires (fvk, dk) since we may not have the full extfvk.
2022-01-20 13:50:12 -07:00
therealyingtong f6f5096ae4 Derive Sapling internal full viewing key.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-20 13:50:12 -07:00
therealyingtong a98010a684 Derive Sapling internal spending key.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-20 13:50:12 -07:00
Squirrel c910ffdb41
Remove unused dependencies (#479)
Remove unused dependencies

Co-authored-by: Kris Nuttycombe <kris.nuttycombe@gmail.com>
Co-authored-by: str4d <thestr4d@gmail.com>
2022-01-18 12:04:14 -07:00
Kris Nuttycombe 7801dddf35
Merge pull request #474 from nuttycom/enforce_typecode_order
Unified container parsing enforces typecode order.
2022-01-04 16:09:55 -07:00
Kris Nuttycombe 8d34e62114 Clean up proptest generation for unified containers. 2022-01-04 15:31:20 -07:00
Kris Nuttycombe e3c67ffee6 Pin pprof version 2022-01-04 11:48:59 -07:00
Kris Nuttycombe 6065c07003 Update test vectors to respect item ordering. 2022-01-04 11:48:23 -07:00
Kris Nuttycombe 2fa73ed368 Remove `Ord` instances for sealed items.
There are two canonical orderings for sealed items: preference
order and encoding order. Removing the `Ord` instances means
that a user can't accidentally choose the wrong ordering;
these orderings are replaced by explicit `preference_order`
and `encoding_order` comparison functions.
2022-01-04 11:48:23 -07:00
Kris Nuttycombe e413f12fb5 Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-04 11:48:23 -07:00
Kris Nuttycombe 4c4c0b1e63 Makes unified container parsing enforce typecode order.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-04 11:48:23 -07:00
str4d 5622b060b1
Merge pull request #471 from zcash/update-deps
Update dependencies
2021-12-18 00:08:40 +00:00
Jack Grigg fe05d2dc11 pprof 0.6 2021-12-17 23:47:00 +00:00
Jack Grigg 07a95d70c9 incrementalmerkletree 0.2 2021-12-17 23:46:00 +00:00
Jack Grigg d5a375919d blake2{b,s}_simd 1 2021-12-17 23:44:06 +00:00
str4d 34bc61da0b
Merge pull request #470 from zcash/zcash_note_encryption-0.1.0
`zcash_note_encryption 0.1.0`
2021-12-17 23:43:39 +00:00
Jack Grigg 36db7634a0 orchard 0.1.0-beta.1 2021-12-17 22:22:25 +00:00