Hello!
I am not new when it comes to Cryptocurrencies and stuffs but I don't have enough knowledge about Cryptography. May I ask if how a private key is generated with a seed phrase?
Someone told me I can use SHA256 to hash and get the output which is 64 characters(256 bits) and that is the private key. But I tried it on one of my unused wallets and used its mnemonic, and then used the SHA256 method but the hash generated is not the same with the original private key of the wallet. So how is a private key really generated from a mnemonic phrase?
P.S. I used a 12 word seed phrase.
It's right but it's only the very first step of the process
First, an initial entropy of ENT bits is generated. A checksum is generated by taking the first ENT / 32 bits of its SHA256 hash.
This checksum is appended to the end of the initial entropy.
Next, these concatenated bits are split into groups of 11 bits, each encoding a number from 0-2047, serving as an index into a wordlist.
Finally, we convert these numbers into words and use the joined words as a mnemonic sentence.
https://github.com/bitcoin/bips/blob/master/bip-0039.mediawikiFor a mnemonic sentence of 12 words you have 128bits of entropy(ENT)
128/32=4
That is to say only the 4 first bits of the SHA256 hash are important because you will need them for the checksum of your seed.
| | aaaaaaaaaaaa | |