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

BIP32 "hardened" paths (such with ' at the end) are not working correctly #227

Open
ok2 opened this issue Apr 3, 2021 · 1 comment
Open

Comments

@ok2
Copy link

ok2 commented Apr 3, 2021

The HD addresses (BIP32) seem not to be generated correctly when using the "hardened" (or called "private" before) path. Here an example:

When I use this BIP32 extended key and generate it on https://bip32.org like that (with derivation path m/0/0).
image
(I have used here the private key xprv9s21ZrQH143K4LFT94R8McbDHwwZELYANjUeVipBx1Nbm9P9Cipv6qmSjscnJSqe7pmn2G8duf9gyzX5tsrqG83ACX5dmEqsHUbo9q2bKJ2)

And generate the same on coinb.in then I get the same result:
image

But when I use the derivation path m/0'/0 like this:
image

Then coinb.in generates a different private key:
image

It seems, that the "hardened" path is not working correctly, probably it is also the reason, why I can not generate the same addresses in coinb.in like in bitcoin-cli, because bitcoin-cli seem to use only "hardened" paths. Another reason that in the current coinb.in UI it is not possible to use "hardened" indices, they are always appended like .../0, newer like .../0'. Probably an option for that or a possibility to specify start/end indices as 0' would be good.

@ok2
Copy link
Author

ok2 commented Apr 4, 2021

I have now created a fix for it into pull request #228, what do you think about it?

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

1 participant