Closed wighawag closed 1 year ago
No. Non-hardened keys have reduced security, we don't support it.
Thanks for the quick reply
In the mean time I managed to get following working and now I am confused:
const publicOnlyKey = HDKey.fromExtendedKey(hdkey.publicExtendedKey);
const derivedFromPublic = publicOnlyKey.derive("m/0/2147483647/1").publicKey;
const derivedFromPrivate = hdkey.derive("m/0/2147483647/1").publicKey;
is that not supposed to work in this library ?
I don't see fromExtendedKey
in https://github.com/paulmillr/ed25519-keygen/blob/main/src/hdkey.ts
Oh sorry, I was reading the doc from there but was using https://github.com/paulmillr/scure-bip32
So I guess for bip32 it is fine
I am looking in generated keys from a parent hd key both from its private key and public key, so that the resulting keys matches
The api seems to only work on keys where the private key is known. any pointer to get non-hardened keys ?
I want something like the function
deriveFromPublicKey
in the followingderive(parent private key).publickey = deriveFromPublicKey(public key)