-
Notifications
You must be signed in to change notification settings - Fork 298
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
hdkeychain: alternate strict BIP32 child derivation method #2845
Conversation
a5ed31b
to
e0f2da2
Compare
This is working with decred/dcrdex#1341, so setting ready for review. |
It occurred to me that https://github.com/decred/dcrd/blob/master/hdkeychain/doc.go could use a mention of the new method and how it differs from |
Good point. Probably the |
New text reads well. |
34d2721
to
ec3ba65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Just had a few minor nonfunctional comments inline.
ec3ba65
to
6ce6d1e
Compare
You can squash it. Github has the ability to see changes on a rebase too. EDIT: I've reviewed the updates now too and they look good. |
// Test for referential equality. | ||
if pubKey != pubKey.Neuter() { | ||
t.Errorf("Neuter of extended public key returned " + | ||
"different object address") | ||
return | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestBIP0032Vectors
provided the template for TestBIP0032Vector4
, but it was cleanest not to force them into one test as vector 4 is specific to the difference between "standard" bip32 and our modified variant.
I updated the typo and the unnecessary return here though.
This creates a new ExtendedKey child derivation method, ChildBIP32Std, which creates an ExtendedKey with leading zeroes retained for strict compliance with BIP32. This is not intended for Decred wallet use.
6ce6d1e
to
d508528
Compare
Updates look good to me as well. |
This creates a new child derivation method,
ChildBIP32Std
, which createsExtendedKeys
with leading zeroes retained, and whos child derivation methods will generate private keys according to BIP32.