maciejhirsz/tiny-bip39

Some spanish mnemonics are invalids when they should be valid

mrbianchi opened this issue · 2 comments

Some spanish mnemonics are invalids when they should be valid

@mrbianchi provided a test vector for this issue upstream.

Mnemonic: "camello pomelo toque oponer urgente lástima merengue cutis tirón pudor pomo barco"
Expected seed: 062c9762ba2032ea10618f4c7c86dafd4f11aaaebf83690f9d81c89de897ecc21fef228ba44d5288de2386cffaeb1443ec528b4e838554b7cde4eedb0ce90f91

I confirmed the seed on https://iancoleman.io/bip39/#spanish and found that the InvalidWord exception is caused by the mnemonic not being normalized to NFKD. The Spanish wordlist is properly normalized, so only the input needs to be as another existing upstream issue describes.

@maciejhirsz I have sent you #12 using https://github.com/unicode-rs/unicode-normalization#unicode-normalization