ebellocchia / bip_utils

Generation of mnemonics, seeds, private/public keys and addresses for different types of cryptocurrencies
MIT License
292 stars 83 forks source link

Brain wallet #89

Closed BillPantini closed 1 year ago

BillPantini commented 1 year ago

Good day Is it possible to change the code in such a way as to generate an address from a mnemonic with a length of less than 12 words?

ebellocchia commented 1 year ago

Hi, It depends what you need to do. If you need to use an existent algorithm (e.g. BIP39) with a custom mnemonic length, you can manually comment the checks for the mnemonic and entropy lengths for that specific algorithm, but the generated mnemonic will always be compliant to that spec (e.g. for BIP39, it will use the BIP39 words with a length multiple of 3). If you need a different algorithm that is not currently implemented in the library, it shall be written. If you have a link to a page that explains how it works, I can take a look.

Regards, Emanuele

BillPantini commented 1 year ago

hello again:) Can you tell me how to get rid of the protection from 'extra' spaces in mnemonic? Example: 'vital enact tattoo enough collect minute oil cram reflect month dry diesel' and 'vital enact tattoo enough collect minute oil cram reflect month dry diesel' give the same result

P.S. I just noticed that for some reason both phrases are the same, apparently there is the same protection :D In the second example, there are two spaces between the words, not one