You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I believe that there is a problem in derivation and some time doesn't work well. I made some tests with testnet and validate results with https://iancoleman.io/bip39/ and it doesn't match.
I found that in the file BitcoinKitPrivate.m (line 147) you save new private key like this (and some times data length is less than 32 bytes)
result = [NSMutableData dataWithLength:numBytes];
BN_bn2bin(privateKey, result.mutableBytes);
and I believe that you need to save new private key like this
result = [NSMutableData dataWithLength:32];
BN_bn2bin(privateKey, &result.mutableBytes[32-numBytes]);
Regards
The text was updated successfully, but these errors were encountered:
I tried that site and compared the result for 1000 addresses.
But the results of BitcoinKit was completely equal to those of https://iancoleman.io/bip39/ without applying your change.
3 out of 1000 result was not equal with your change.
So, I guess current implementation is okay, but if you still have the problem, give me more specific test case please.
Hi, I believe that there is a problem in derivation and some time doesn't work well. I made some tests with testnet and validate results with https://iancoleman.io/bip39/ and it doesn't match.
I found that in the file BitcoinKitPrivate.m (line 147) you save new private key like this (and some times data length is less than 32 bytes)
and I believe that you need to save new private key like this
Regards
The text was updated successfully, but these errors were encountered: