"The aim of this repo is to show all the steps to get from a random (or not) number to a BIP_39 mnemonic phrase"
/!\ There is a GUI version in the branch section ( edit(06/09/2021): GUI not working at all, front-end gives me headache)
./mnemonic_gen [nbits] [dict_path] [entropy]
nbits & dict_path are both optional
default nbits is 128 /!\ (nbits modulo 32 should be 0)
default dict is BIP39_EN
entropy is also optional and should only be used when nbits and dict_path are manually set.
default entropy is an cryptographically secure pseudorandom number provided by the secrets library.
nbits | nwords
128 | 12
160 | 15
192 | 18
224 | 21
256 | 24
./mnemonic_gen
./mnemonic_gen 128
./mnemonic_gen 160 ./BIP_39_Wordlists/BIP39_FR
./mnemonic_gen 256 ./BIP_39_Wordlists/BIP39_FR 14235
- python3.x
- binascii :
pip3 install binascii
- secrets :
pip3 install secrets
Thanks to https://learnmeabitcoin.com/ for all the informations needed to understand the Bitcoin Protocol.