Derive a non-hardened, child HD public node from an HD public node.
Because hardened derivation also requires knowledge of the parent private
node, it's not possible to use an HD public node to derive a hardened child
HD public node. (See deriveHdPath or deriveHdPublicNode.)
Though private keys cannot be derived from HD public keys, sharing HD public
keys still carries risk. Along with allowing an attacker to associate wallet
addresses together (breaking privacy), should an attacker gain knowledge of a
single child private key, it's possible to derive all parent HD private
keys. See crackHdPrivateNodeFromHdPublicNodeAndChildPrivateNode
for details.
This function has a less than 1 in 2^127 probability of producing
an invalid result (where the resulting public key is not a valid Secp256k1
public key). While this scenario is unlikely to ever occur without a weakness
in HMAC-SHA512, the returnInvalidNodes parameter can be set to true to
return the resulting HdPrivateNodeInvalid rather than an error
(defaults to false).
An optional object containing implementations of sha256, sha512,
ripemd160, and secp256k1 compressed public key "tweak addition"
(application of the EC group operation).
If false, invalid derivations (probability less than 1 in 2^127) will
return an error rather than an HdPublicNodeInvalid (defaults
to false). To return the invalid node rather than throwing an error,
throwErrors must also be set to false.
Derive a non-hardened, child HD public node from an HD public node.
Because hardened derivation also requires knowledge of the parent private node, it's not possible to use an HD public node to derive a hardened child HD public node. (See deriveHdPath or deriveHdPublicNode.)
Though private keys cannot be derived from HD public keys, sharing HD public keys still carries risk. Along with allowing an attacker to associate wallet addresses together (breaking privacy), should an attacker gain knowledge of a single child private key, it's possible to derive all parent HD private keys. See crackHdPrivateNodeFromHdPublicNodeAndChildPrivateNode for details.
This function has a less than 1 in 2^127 probability of producing an invalid result (where the resulting public key is not a valid Secp256k1 public key). While this scenario is unlikely to ever occur without a weakness in HMAC-SHA512, the
returnInvalidNodes
parameter can be set totrue
to return the resulting HdPrivateNodeInvalid rather than an error (defaults tofalse
).