everything goes well until now, i have the seed, i have the entropy, etc, and everytime i generate an new one it can be verified at https://iancoleman.io/bip39/ and it works correctly, but the issue im having is what i do after getting the seed to generate the master private key ? thats what i aint understanding, how can i use the seed above to generate an key? which functions should i use? thanks and sorry if this sounds confusing
First compute HMACSHA512(data=seed, key="Bitcoin seed") then split the 64-byte result into two 32 byte parts. The first part is the master key and the second part is the chain-code.
From this point to derive a child key you perform a similar operation but change the data and key used in HMACSHA512. The key is always the parent chain-code and...
If the index is hardened => data is 0 | parent_private_key | index
If the index isn't hardened => data is parent_public_key | index
The result is again split into two parts, first 32 byte is the key and second part the new chain-code.
For example for m/44'/0'/0/1 you repeat this 4 times each time with the next index (4' then 0' then 0 and finally 1).