mvondracek / PA193_mnemonic_Slytherin

BIP39 Mnemonic Phrase Generator and Verifier
0 stars 3 forks source link

is_valid_mnemonic #22

Closed mvondracek closed 4 years ago

mvondracek commented 4 years ago

Hi @sobuch, while you're working with dictionary (#12, #19), could you please implement mnemonic validation in is_valid_mnemonic?

sobuch commented 4 years ago

validating mnemonic means also calculating entropy and its hast, so in this case I would actually rather do that validation inside _mnemonic2entropy. Would that be ok?

mvondracek commented 4 years ago

We have discussed that validation would check whether words in mnemonic are from a given dictionary. But now I see that we need to check, whether given sequence of words corresponds to some possible entropy. Implement it where you see fit, but if you implement the check just inside _mnemonic2entropy, then it needs to raise exception upon error...

sobuch commented 4 years ago

superceded by https://github.com/mvondracek/PA193_mnemonic_Slytherin/issues/26