Closed dabura667 closed 8 years ago
Note: this PR requires #39 which is why it is failing.
These vectors I believe originally came from: https://github.com/trezor/python-mnemonic/blob/master/vectors.json It may be useful to follow up upstream as well?
Yes, I created these using python by replacing existing code with Japanese (rather than adding supprt for multiple languages). Then I ran those tests manually against my own javascript implementation based off early versions of bip39 (bitcoinjs-lib), but again, no upstream support. https://bip32jp.github.io/english/
I just added Japanese in a pr to bip39 the other day. https://github.com/bitcoinjs/bip39/pull/24
I should also add the vectors to python-mnemonic.
How did you produce the seed hex values?
Did you run python3 generate_vectors.py
from https://github.com/trezor/python-mnemonic
I believe I just used the same as English.
I was running https://github.com/bitpay/bitcore-mnemonic/pull/39 with vectors generated from python3 generate_vectors.py
. Even though the vectors committed in the python-mnemonic repository only include English vectors, the script will also generate Japanese, and was able to get it to work with a few modifications. However I needed to replace the ideographic spaces that was generated with 0xe38080
, and wasn't able to verify the toSeed()
hex strings.
@braydonf thats because the generate_vectors uses passphrase TREZOR whereas mine use a japanese passphrase
I tried using that one as well, and didn't have any luck.
@braydonf I just tried again, and suddenly forgot how to get python to cooperate with UTF-8...
I struggled for a while, and decided to quit. However, the vectors I have here I have verified against the python reference implementation... though I forget how I did it.
I even tried using a VM with Ubuntu, still was getting ASCII errors crying about \u3000...
I used python3, and the generate_vectors.py
worked (except for the ideographic space issues mentioned earlier), I had issues when trying to use python2.7.
(Note: changed this PR to only contain JP test vectors)
This will add Japanese test vectors to the library.