Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify Child key parent relation #13

Open
Pierozi opened this issue Sep 16, 2019 · 2 comments
Open

Verify Child key parent relation #13

Pierozi opened this issue Sep 16, 2019 · 2 comments

Comments

@Pierozi
Copy link

Pierozi commented Sep 16, 2019

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 👏

@freespiriter
Copy link

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

@Pierozi
Copy link
Author

Pierozi commented Jun 20, 2020

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants