-
Notifications
You must be signed in to change notification settings - Fork 431
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
mnemonicToEntropy
not returning correct entropy
#70
Comments
Interesting, but, this actually isn't our fault! let buffer = Buffer.from('ea9d80e70b08bbfb6b7f2bca56c88ddb2c2d003e675a855779d81e11f3009346a', 'hex')
// <Buffer ea 9d 80 e7 0b 08 bb fb 6b 7f 2b ca 56 c8 8d db 2c 2d 00 3e 67 5a 85 57 79 d8 1e 11 f3 00 93 46> You passed a 65-byte hex string, and a 32-byte Buffer is parsed. |
Keeping open for now, as I'd like to hear your opinion, this is certainly a confusing (and unfortunate) result. |
Looking back through my console I see the issue. TLDR adding the Both the 64 and 65 char entropy strings produce the same mnemonic let a = bip39.entropyToMnemonic('ea9d80e70b08bbfb6b7f2bca56c88ddb2c2d003e675a855779d81e11f3009346')
// 'tunnel ugly degree bid merry world pupil tornado ski rent casino rent security length wet twice luxury rookie invite destroy busy leopard escape shoe'
let b = bip39.entropyToMnemonic('ea9d80e70b08bbfb6b7f2bca56c88ddb2c2d003e675a855779d81e11f3009346a')
// 'tunnel ugly degree bid merry world pupil tornado ski rent casino rent security length wet twice luxury rookie invite destroy busy leopard escape shoe' Node's So my Apologies for the false flag. Again, thanks for a great lib. 🎩 |
I found a call to
mnemonicToEntropy
which isn't returning the correct entropy. To reproduce:The returned entropy is missing an
a
at the end. This is the only case where I've found thatmnemonicToEntropy
doesn't return the correct entropy.Thanks for a great library!
The text was updated successfully, but these errors were encountered: