Implement Bip32 for seed-phrase/passphrase signing (backport #16942) (#17018)

* Implement Bip32 for seed-phrase/passphrase signing (#16942)

* Add Keypair helpers for bip32 derivation

* Plumb bip32 for SignerSourceKind::Ask

* Support full-path querystring

* Use as_ref

* Add public wrappers for from_uri cases

* Support master root derivations (and fix too-deep print

* Add ask:// HD documentation

* Update ASK elsewhere in docs

(cherry picked from commit 694c674aa6)

# Conflicts:
#	programs/bpf/Cargo.lock

* Fix conflict

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
This commit is contained in:
mergify[bot]
2021-05-04 03:58:23 +00:00
committed by GitHub
parent 32fc4e3d0f
commit 6157860c0a
11 changed files with 471 additions and 65 deletions

View File

@@ -610,6 +610,16 @@ dependencies = [
"subtle 2.2.2",
]
[[package]]
name = "crypto-mac"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58bcd97a54c7ca5ce2f6eb16f6bede5b0ab5f0055fedc17d2f0b4466e21671ca"
dependencies = [
"generic-array 0.14.3",
"subtle 2.2.2",
]
[[package]]
name = "crypto-mac"
version = "0.10.0"
@@ -767,6 +777,19 @@ dependencies = [
"zeroize",
]
[[package]]
name = "ed25519-dalek-bip32"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "057f328f31294b5ab432e6c39642f54afd1531677d6d4ba2905932844cc242f3"
dependencies = [
"derivation-path",
"ed25519-dalek",
"failure",
"hmac 0.9.0",
"sha2 0.9.2",
]
[[package]]
name = "either"
version = "1.5.3"
@@ -816,6 +839,7 @@ version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86"
dependencies = [
"backtrace",
"failure_derive",
]
@@ -1179,6 +1203,16 @@ dependencies = [
"digest 0.9.0",
]
[[package]]
name = "hmac"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "deae6d9dbb35ec2c502d62b8f7b1c000a0822c3b0794ba36b3149c0a1c840dff"
dependencies = [
"crypto-mac 0.9.1",
"digest 0.9.0",
]
[[package]]
name = "hmac"
version = "0.10.1"
@@ -3382,6 +3416,7 @@ dependencies = [
"derivation-path",
"digest 0.9.0",
"ed25519-dalek",
"ed25519-dalek-bip32",
"generic-array 0.14.3",
"hex",
"hmac 0.10.1",