go-bip32
go-bip32 copied to clipboard
Verify Child key parent relation
Hello,
Did you know if it will be possible to integrate a verification method to check if a Child public key is derivated from another public key to check the parent relation?
As my understanding we must implement this algo: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#public-parent-key--public-child-key
Thanks for your library btw 👏
i think it is easy to implement the verification method to check. First you should know the public key and index(es), Then call NewChildKey. At last, check the NewChildKey.PublicKey whether equals distPublickey
Finally, This library has already implemented public parent key to public child key this function is integrated in method NewChildKey
@freespiriter I do not want to create a new key and compare it. But rather be able to know if a Child key has been derived from a master key.
For people that could be interested, I have done the implementation using the proper hash combination. https://github.com/PeerVault/PeerVault-Service/blob/master/src/crypto/crypto.go#L113