lnd.xprv/keychain
Olaoluwa Osuntokun e86babe133
keychain: extend DerivePrivKey to derive based on pubkey+KeyFamily
In this commit, we extend the DerivePrivKey method to allow callers that
don't know the full KeyLocator information to attempt to derive a
private key via a brute force mechanism. If we don't now the full
KeyLoactor, then given the KeyFamily, we can walk down the derivation
path and compare keys one by one. In order to ensure we don' t enter an
infinite loop when given an unknown public key, we cap the number of
keys derived at 100k.

An upcoming feature to lnd that adds static channel backups will utilize
this feature, as we need to derive the shachain root given only the
public key and key family, as we don't currently store this KeyLocator
on disk.
2019-01-04 14:41:41 -08:00
..
btcwallet.go keychain: extend DerivePrivKey to derive based on pubkey+KeyFamily 2019-01-04 14:41:41 -08:00
derivation.go keychain: extend DerivePrivKey to derive based on pubkey+KeyFamily 2019-01-04 14:41:41 -08:00
interface_test.go keychain: extend DerivePrivKey to derive based on pubkey+KeyFamily 2019-01-04 14:41:41 -08:00