2

I was reading the BIP 39, and noticed that it does not refer to how the mnemonic sentence, used for seed calculation, is composed from mnemonic words. This is actually troublesome because in case of Japanese, the bip39 npm package joins the mnemonics with IDEOGRAPHIC SPACE(U+3000), the space character typically used as space for Japanese. It seems that copay is using this library and thus follow this rule. Some other implementation may decide to use (more machine-friendly) space(U+20), or something else, which makes remembering just the mnemonic words in sufficient for wallet recovery (in other wallet).

Question:

  • Is there any standard of how mnemonic sentence is composed from mnemonic words?
2

From bip39:

To create a binary seed from the mnemonic, we use the PBKDF2 function with a mnemonic sentence (in UTF-8 NFKD) used as the password and the string "mnemonic" + passphrase (again in UTF-8 NFKD) used as the salt. The iteration count is set to 2048 and HMAC-SHA512 is used as the pseudo-random function. The length of the derived key is 512 bits (= 64 bytes).

When normalizing unicode in NFKD form, characters that look the same become the same, so U+3000 becomes U+20. This may also cause length to change as composite characters are broken down into their constituent parts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.