script to find the checksum word in a bip39 seed made of 12 or 24 words

If you didn’t know you can create a bip39 seed picking whatever words you want from the bip39 words list for the first 11 (12 words seed) or 23 words (24 words seed).

The last word is a checksum word and can’t be everything. In a 12 words seed it can be only 128 words of all the 2048 in the words list, while in a 24 words seed there are only 8 possible candidates.

This mean you could create a seed randomly (if it’s not random your seed will be cracked easily) picking 11 or 23 words from a hat. It is a perfectly fine method to create a seed as long that your hat contains all the 2048 bip39 words and you pick them up really randomly.

But now you need to know the checksum word (last word). It can’t be picked randomly.

I made a python script opensource that giving it all the words you picked up in the correct order, it will calculate all the possible candidates checksum word for you seed.

It also gives you a sequence of bits for each of the candidates so that you can randomly pick one flipping a coin (7 times for a 12 words seed and 3 times for a 24 words seed) where 1 is head and 0 is tail. The sequence you get, the word you find. So also the checksum word is random.

DISCLAIMER: Don’t trust the script I made and don’t use it with your real seed if you are not able to review the whole code and understand what it does!!! Use it only in a safe environment offline, like tails! Again: don’t use it if you can’t read and understand the whole code!

This is a link to the script: https://github.com/91DarioDev/bip39-checksum-words-finder

submitted by /u/91DarioASR
[link] [comments]