<p>Just as a side note: What you get from 12 words is a seed of 512 bit length because it was stretched with PBKDF2. The entropy is only 128 bit with 12 words (each word represents 11 bits of information ~= 132 bit with 4 bit checksum).</p>

<p>If you look at a library like <a href="https://github.com/bitcoinjs/bip39/blob/master/src/index.js" rel="nofollow noreferrer">https://github.com/bitcoinjs/bip39/blob/master/src/index.js</a> for example, you see that the spaces between the words aren't removed. If you paste the original words into the PBKDF2 tool you get the correct seed.</p>

CC BY-SA 4.0
2020-01-17T02:42:05.370Z
Thanks for your reply!

However, I don't think you have answered my question.
In BIP32:
`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).`

It indicates that using mnemonic sentense as the password and string "mnemonic" + passphrase as the salt.
Mooooo
CC BY-SA 4.0
2020-01-17T02:53:55.827Z
In point 3, I still can't generate the right 512-bits seed out with "9c76470ecfc577bc325ddf3949d844d6".
Mooooo
CC BY-SA 4.0
2020-01-17T08:57:59.637Z
Sorry, you are right. What I described was BIP32 (which does use HMAC-SHA512). I forgot that BIP39 also does key stretching already. I edited my answer.
guggero
CC BY-SA 4.0
2020-01-16T14:36:35.790Z
2020-01-17T08:57:01.140Z
2020-01-17T08:57:01.140Z
guggero
<p>I have a question.
I used the website (<a href="https://www.mobilefish.com/download/ethereum/bip39.html" rel="nofollow noreferrer">https://www.mobilefish.com/download/ethereum/bip39.html</a>) to generate a 12-words mnemonic(English word list) without password and got below:</p>

<p>"organ rate senior panel first task siren room deer excite bachelor project"</p>

<p>And the 512-bits seed is like:
"53329c51c9416d4d2fe46ecd8edab1c9a5289b3366c98bb6ee843e7bd4242ee46b6be686aef697d23278062d8c033cf2788df96cc4f24375682f36eb9a66996d"</p>

<p>However, I tried to generate 512-bits seed by myself but failed.</p>

<p>I used online PBKDF2 SHA-512 Hashes: <a href="https://stuff.birkenstab.de/pbkdf2/" rel="nofollow noreferrer">https://stuff.birkenstab.de/pbkdf2/</a></p>

<p>And entered like below but got wrong result.
Message: organrateseniorpanelfirsttasksirenroomdeerexcitebachelorproject
Salt: mnemonic
Iterations: 2048
Key length: 64</p>

<p>What I got is: 559c3427c333595e3ef78cc19d7f412452a763a09b66c8c7da2b49ecf12cd5d51ae7cb9bffe9d33ca358a421e984b626053192eea36ba909d307df0fa9ceda60</p>

<p>Please help to answer it....
Thanks!</p>

CC BY-SA 4.0
2020-01-19T15:22:58.443Z
I see your question was answered and you got it working, but for those who may see this question later on I would like to point out that the Message in the PBKDF2 function is the Mnemonic Words **separated by spaces**, not concatenated one after the other.
Septem151
<mnemonic-seed><seed>
Implementation of BIP39, I want to generate a BIP39 512-bits seed from 12 mnemonics but failed
Mooooo
# Implementation of BIP39, I want to generate a BIP39 512-bits seed from 12 mnemonics but failed

(Asked by: username_0 on 2020-01-16)

I have a question.
I used the website (<https://www.mobilefish.com/download/ethereum/bip39.html>) to generate a 12-words mnemonic(English word list) without password and got below:

"organ rate senior panel first task siren room deer excite bachelor project"

And the 512-bits seed is like:
"53329c51c9416d4d2fe46ecd8edab1c9a5289b3366c98bb6ee843e7bd4242ee46b6be686aef697d23278062d8c033cf2788df96cc4f24375682f36eb9a66996d"

However, I tried to generate 512-bits seed by myself but failed.

I used online PBKDF2 SHA-512 Hashes: <https://stuff.birkenstab.de/pbkdf2/>

And entered like below but got wrong result.
Message: organrateseniorpanelfirsttasksirenroomdeerexcitebachelorproject
Salt: mnemonic
Iterations: 2048
Key length: 64

What I got is: 559c3427c333595e3ef78cc19d7f412452a763a09b66c8c7da2b49ecf12cd5d51ae7cb9bffe9d33ca358a421e984b626053192eea36ba909d307df0fa9ceda60

Please help to answer it....
Thanks!

**Tags:** mnemonic-seed, seed

> **Comments:**
> **username_1**: I see your question was answered and you got it working, but for those who may see this question later on I would like to point out that the Message in the PBKDF2 function is the Mnemonic Words **separated by spaces**, not concatenated one after the other.  

---

## 1 answers

### Answer by username_2 on 2020-01-16. Score: 2 | Accepted answer

Just as a side note: What you get from 12 words is a seed of 512 bit length because it was stretched with PBKDF2. The entropy is only 128 bit with 12 words (each word represents 11 bits of information ~= 132 bit with 4 bit checksum).

If you look at a library like <https://github.com/bitcoinjs/bip39/blob/master/src/index.js> for example, you see that the spaces between the words aren't removed. If you paste the original words into the PBKDF2 tool you get the correct seed.

> **Comments:**
> **username_0**: Thanks for your reply!  However, I don't think you have answered my question. In BIP32: `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).`  It indicates that using mnemonic sentense as the password and string "mnemonic" + passphrase as the salt.  
> **username_0**: In point 3, I still can't generate the right 512-bits seed out with "9c76470ecfc577bc325ddf3949d844d6".  
> **username_2**: Sorry, you are right. What I described was BIP32 (which does use HMAC-SHA512). I forgot that BIP39 also does key stretching already. I edited my answer.  

---

