iancoleman / bip39

A web tool for converting BIP39 mnemonic codes
https://iancoleman.io/bip39/
MIT License
3.42k stars 1.42k forks source link

24th Word different to SeedPicker #461

Closed darrenahunter closed 3 years ago

darrenahunter commented 3 years ago

Hi - I am using the generate function of the page to generate 24 words (all else is default - ie. a clean loaded html page). I copy the first 23 words into the SeedPicker 24th Word generator page (https://seedpicker.net/calculator/last-word.html) and generate the 24th word. It is different to the original 24th word.

From my understanding the 24th word is a checksum of the first 23 words so should be consistent ? Am I missing something here? I have also asked on the SeedPicker contact.

Any help would be great

thanks Darren

iancoleman commented 3 years ago

Not all 11 bits of the last word form the checksum. So there are multiple last words that would result in a valid checksum.

From https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#generating-the-mnemonic

First, an initial entropy of ENT bits is generated. A checksum is generated by taking the first ENT / 32 bits of its SHA256 hash.

darrenahunter commented 3 years ago

many thanks Ian that makes sense to me - the SeedPicker guys also responded and (obviously taught me the same thing) they always take the same word for consistency in the page. also makes sense so if a user enters the same 23 words they will get the same 24th word.