Skip to content
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

Result differs from Mnemonic #673

Open
catching641 opened this issue May 1, 2024 · 3 comments
Open

Result differs from Mnemonic #673

catching641 opened this issue May 1, 2024 · 3 comments

Comments

@catching641
Copy link

catching641 commented May 1, 2024

My apologies if the issue has happened because I have used the webpage incorrectly but I was using the webpage to verify a checksum of the code I was programming in Python and the results are different.

Then I checked my results with the mnemonic library and both are the same, so I guess there is no problem in my code, so probably I was using the site incorrectly and it was a misunderstanding. It would be nice if the webpage would clarify this.

Attached is the image of the web page with the calculated checksum and the code from Mnemonic that I used.

webpage

`from mnemonic import Mnemonic

bits = "1110011010100110111100111101000010110101100001101110011000100101111100110000100111111000001001110110010001100001010111010101011000110011110110100110100100001011101111100010111010011000000000000001001101000010010011111100100101001000101101101111001000111101"
bytes = int(bits, 2).to_bytes((len(bits) + 7) // 8, byteorder='big')
mnemo = Mnemonic("english")
mnemonic = mnemo.to_mnemonic(bytes)
print(mnemonic)`

@samuel-lope
Copy link

I also identified the same issue, and I'm curious to know if I'm misusing the tool.

@iancoleman
Copy link
Owner

For 'Mnemonic Length' try selecting 'Use Raw Entropy (3 words per 32 bits)`

Use Raw Entropy checksum for the bits in original post: 00101111
24 words checksum for the bits in the original post: 00011100

The reason is the entropy is hashed unless the Use Raw Entropy option is selected.

Does this different option for Mnemonic Length give the desired result?

@RodrigoSKohl
Copy link

image
I tested here and saw that node.js bip39 lib uses Raw Entropy, I returned hexademical entropy and tested it on the website and it returned the same words.
image

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

4 participants