Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

BIP32 private derivation doesn't include key validity checks #93

Open
axic opened this issue Sep 11, 2016 · 0 comments
Open

BIP32 private derivation doesn't include key validity checks #93

axic opened this issue Sep 11, 2016 · 0 comments

Comments

@axic
Copy link

axic commented Sep 11, 2016

It seems that the BIP32 derivation code (https://github.com/bitpay/bitcore-lib/blob/master/lib/hdprivatekey.js#L193) doesn't do any checks against the validity of the generated private key.

https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#private-parent-key--private-child-key:

In case parse256(IL) ≥ n or ki = 0, the resulting key is invalid, and one should proceed with the next value for i. (Note: this has probability lower than 1 in 2127.)

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

No branches or pull requests

1 participant