Post
Topic
Board Development & Technical Discussion
Re: Which seed should i choose?
by
ranochigo
on 09/05/2024, 01:42:13 UTC
1) Generate (and carefully save) a BIP39 mnemonic code (offline) using this:
https://github.com/trezor/python-mnemonic
Indeed, Electrum wallet doesn't generate Bip39 mnemonic and i would prefer
to have one.
I tested the few lines of code and it worked.
Still there is something i don't understand:
entropy = mnemo.to_entropy(words)
I guess the aim of this line is to check the randomness of the list of words.
However, i got this:
>>> entropy = mnemo.to_entropy(words)
>>> entropy
bytearray(b'\x18\xe2\xa9=\x82\xd4$\x915D\x98....................................\xb4\x7f\x02\x90f\xdf\x8b')
>>>
How this should be understood?
The entropy is the raw bytes before it was converted into your mnemonics. It is not useful to you.

Entropy is random, and you cannot exactly measure randomness, or at least to any accurate extent. Seemingly random strings can be deterministic and vice-versa. You can safely stop at generating the mnemonics without going further.

I haven't seen the code yet and I can't comment much on it. I would recommend just using another wallet that generates BIP39 instead of going with a less well-known script, or just go with Electrum. No downsides there.