Created
June 11, 2014 19:16
-
-
Save maraoz/8393f72a998bae58d585 to your computer and use it in GitHub Desktop.
bip32 non-deterministic derivation bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hk = new HierarchicalKey('tprv8ZgxMBicQKsPdSF1avR6mXyDj5Uv1XY2UyUHSDpAXQ5TvPN7prGeDppjy4562rBB9gMMAhRfFdJrNDpQ4t69kkqHNEEen3PX1zBJqSehJDH'); | |
console.log(hk.derive('m/45/0/0/0').extendedPrivateKeyString()); | |
console.log(hk.derive('m/45/0/0/0').extendedPrivateKeyString()); | |
console.log(hk.derive('m/45\'/0/0/0').extendedPrivateKeyString()); | |
console.log(hk.derive('m/45\'/0/0/0').extendedPrivateKeyString()); | |
Outputs: | |
tprv8iDdrJ7doYBh2MpWDAPHopqUZ8jftExnk3v98yGFfEJPAfUBszoswxqg5doKrQS7whF6q5Q4cdK2Bdn3HWA4tURnjdPyPv83fpuamjELFmP | |
tprv8iDdrJ7doYBh2MpWDAPHopqUZ8jftExnk3v98yGFfEJPAfUBszoswxqg5doKrQS7whF6q5Q4cdK2Bdn3HWA4tURnjdPyPv83fpuamjELFmP | |
tprv8hJwoLPPDxbToSDevAzN7ram5E1iCHik4fXauZWCU5rH3rPU2kwtmDdFZMLQZkqEyoUAnarUhZpNX2fTNbwE3mfFs4w9ga18Hb7oQiuukhN | |
tprv8hdWreosLBRoGsH7kZktHJpbC59ap16zWnMp65UAq5Jv4L43vYGpfQ54wqx6PeFMyHQmxXTtrKiN3LHwTZc3bDbiiGGivJSBAuLecgS6WtU |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
node> HierarchicalKey = require('bitcore').HierarchicalKey
copy + paste
Outputs on Mac:
tprv8iDdrJ7doYBh2MpWDAPHopqUZ8jftExnk3v98yGFfEJPAfUBszoswxqg5doKrQS7whF6q5Q4cdK2Bdn3HWA4tURnjdPyPv83fpuamjELFmP
tprv8iDdrJ7doYBh2MpWDAPHopqUZ8jftExnk3v98yGFfEJPAfUBszoswxqg5doKrQS7whF6q5Q4cdK2Bdn3HWA4tURnjdPyPv83fpuamjELFmP
tprv8hNNDKK3rxTTC3vTfJJrnFVUB5DEge1bVL725T3PnmDUXDJBPRutKfuRgTCUhh6f85iFnbdyxgxPPUykf1hQHU393yG6GNq5JugcDKWwTDF
tprv8hNNDKK3rxTTC3vTfJJrnFVUB5DEge1bVL725T3PnmDUXDJBPRutKfuRgTCUhh6f85iFnbdyxgxPPUykf1hQHU393yG6GNq5JugcDKWwTDF