Kris Nuttycombe
2f1d3da26d
Update changelogs.
2022-01-27 16:25:01 -07:00
Kris Nuttycombe
4057b066bd
ExtendedFullViewingKey::chain_code should not be public.
2022-01-27 16:18:26 -07:00
Kris Nuttycombe
6e11f2d11a
Validate ZIP 321 request by roundtrip through the URI format.
...
Co-authored-by: str4d <jack@electriccoin.co>
2022-01-27 16:08:04 -07:00
Kris Nuttycombe
544c4ed6bb
Remove unused zcash_address dependency.
2022-01-27 16:08:04 -07:00
Kris Nuttycombe
a1e693d15f
Remove the Wif type; it should not be used.
...
We should attempt to avoid passing spending keys back and forth
across the FFI entirely, but in any case this is no longer the
correct type to use at this boundary; we should use the encoding
of the transparent component of a unified spending key instead.
2022-01-27 16:08:04 -07:00
Kris Nuttycombe
3a20176092
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2022-01-27 15:00:37 -07:00
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
Kris Nuttycombe
81c69dd0a9
Merge pull request #472 from nuttycom/zip_244/hw_wallet_commitments
...
Make transparent signatures commit to all input amounts & scripts.
2022-01-19 09:13:47 -07:00
Kris Nuttycombe
eaa3ec56d0
Apply suggestions from code review
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 08:32:59 -07:00
Kris Nuttycombe
7b2f9e27ae
Rename script_code to script_pubkey in zip244 test vectors.
2022-01-19 08:32:59 -07:00
Kris Nuttycombe
fc82801d3d
Update v5 transparent signature hashes to always commit to scriptPubKey
2022-01-19 08:32:59 -07:00
Kris Nuttycombe
3c6e19f4e4
Update test vectors.
2022-01-19 08:32:59 -07:00
Kris Nuttycombe
37fdf88462
Make hash_type a property of the SignableInput::Transparent
2022-01-19 08:32:59 -07:00
Kris Nuttycombe
145d1a57f7
Make transparent signatures commit to all input amounts & scripts.
...
Transparent UTXOs are referred as pair of previous txid and index. In
order to verify UTXO's amount in HWW (hardware wallet), whole previous
transaction containing this UTXO must be streamed into the device. This
increases complexity of signing process significantly.
zcash/zips#574 identifies this problem and suggests a modification
to ZIP-244 to resolve this issue, by adding three new fields to
section S.2 of the signature hash.
2022-01-19 08:32:59 -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