Skip to content

BIP32 derives invalid private keys on pure Dart #5

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

Open
2 tasks
brickpop opened this issue Oct 26, 2020 · 0 comments
Open
2 tasks

BIP32 derives invalid private keys on pure Dart #5

brickpop opened this issue Oct 26, 2020 · 0 comments

Comments

@brickpop
Copy link
Contributor

When comparing the generated private keys between Rust and Dart, there may be mismatches from time to time.

  • Try detecting the error on bip32
  • Find a replacement otherwise

Comparison

Mnemonic: return guide exotic stem lazy cancel stamp company purse useless pact affair ripple intact destroy finish kite muffin

Dart

Using BIP32 on pub.dev

  • Seed: c5a8442eb1f5d2d884c8747b881bd8b2f5ffe3267b242fe253774442d2afe991ed6b7893ef8dea8cb88101cdfc69e71548a298eeeb6d833a124d7b79b572ad87
  • Root key: cdb16d8b08beb6559981dd9da07b9ece699e8e66021116f61c4415c440ed09f0
  • Derived private key: 61419a134920f7d5f35db36b01a3149b2633ca59ba7adc87cb59bcd5cd2d4064

Seems to be abandoned since 2018. The original repository does not even exist.

Rust

  • Seed: 0xC5A8442EB1F5D2D884C8747B881BD8B2F5FFE3267B242FE253774442D2AFE991ED6B7893EF8DEA8CB88101CDFC69E71548A298EEEB6D833A124D7B79B572AD87
  • Private key: c6fd4b75573df00fd8713c5cce929ec41c57398fe9de99eece6b9807132a3b6b

Ethers.js

wallet = Wallet.fromMnemonic("return guide exotic stem lazy cancel stamp company purse useless pact affair ripple intact destroy finish kite muffin")
wallet.signingKey.keyPair.privateKey
> '0xc6fd4b75573df00fd8713c5cce929ec41c57398fe9de99eece6b9807132a3b6b'

Web

https://iancoleman.io/bip39/

  • Private key: 0xc6fd4b75573df00fd8713c5cce929ec41c57398fe9de99eece6b9807132a3b6b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant