Post
Topic
Board Development & Technical Discussion
Re: BIP32 Child Derivation Function - Can't Find My Mistake
by
RealityRipple
on 30/03/2018, 21:52:32 UTC
Before you do the adding, can you print out what you get for
Code:
Point::mul($il, $secp256k1_G)
and
Code:
$this->ECpub

Make sure that those are what you expect them to be.

The only thing that can be wrong here is that either you are adding the wrong things or Point::add is broken.
I already did. They're in the final quote under the names il * G  and m's ECpub respectively.

Also, Point::add and Point::mul are used in my recoverPubKey function for verifying signed messages, which I'm already sure works correctly for multiple coin types. However, I can't completely rule out the possibility of an issue, which is why I'd like verification on the numbers and the results, as you say.