Can I choose my own seed phrase? is it anyway possible?
You can choose your own seed phrase, but bear in mind you should consider it unsafe.
There’s a caveat, you’re not free to choose any word for the last word, you only have a subset of the words available to use as the last word (ex: only 8 possible words in a 24-words seed phrase)
What you can do is write 23 words, and than use this python script to find out about the 8 possible candidates for the last word:
https://github.com/veebch/Bip39-Dice
Why is that?
Each BIP39 word represents 11 bits (2^11 = 2048 words in the dictionary)
BIP39 seed phrases encode seeds plus a checksum:
- 12-words = 128 bits seed + checksum
- 24-words = 256 bits seed + checksum
The size of the checksum depends on the number of words used.
In a 24-words seed phrase we have 264 bits represented (24*11=264) but we only need 256, so the extra 8 bits are used as checksum for the first 256 bits.
So, the 11 bits representing the last word are bbb
+ cccccccc
where bbb
belongs to the seed, while cccccccc
are the 8 bits of the checksum. Since cccccccc
depends on bbb
, everytime you change a bit on the seed, you change the checksum.
Since there are 3 possible bits on bbb
, you can choose any of the 8 combinations (2^3 = 8) which will be translated to 8 different words.
Any other word will result in a invalid checksum which means an invalid seed phrase.
As an exercise, I’ll let you find out how many candidate words are on a 12-word seed phrase.