metaverse icon indicating copy to clipboard operation
metaverse copied to clipboard

mnemonic to seed should have salt phrase.

Open betachen opened this issue 6 years ago • 1 comments

mnemonic to seed should have salt phrase.

betachen avatar Mar 23 '18 06:03 betachen

In the BIP-39: 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).

Use passphrase as salt can protect the mnemonic. Different passphrases can generate different seeds. But this cannot make the seed more anti-collision, because the generated private-key is also 256 bits.

chengzhpchn avatar Apr 08 '18 10:04 chengzhpchn