Hi everyone and thank you for the excellent feedback. Just to be sure I understand things properly, I’ve gone ahead and outlined my understanding in a step by step write up for an example of how I believe that one could calculate their 12 word BIP 39 seed. Please let me know if I got this correct.
A few key points I took away from you all are:
* You need 128 bits of entropy for BIP39 for a 12 word seed phrase
*Each BIP 39 word has an 11 bit code (earth = # 555 or 1000101011 in binary) that I believe is located here:
https://github.com/hatgit/BIP39-wordlist-printable-en The 128 bits of entropy for BIP39 also requires and additional 4 bits for a checksum in the 12th word. This checksum is placed in the last 4 bits of the 11 bit word.
*To obtain the additional 4 bits for the checksum you need to perform a SHA256 hash on the 128 bits of entropy and then take the first 4 bits of this hash and append it to the 128 bits which gives you a total of 132 bits.
*Once this 132 bits has been created, you then deconstruct them into 12, 11 bit groupings and then identify the valid BIP 39 words that correlate to their bit patterns.
*The 12th word can have several different possible words as all that needs to be present in the last word is the four bits of the 11 bit pattern for the 12th word.
With all that said, here is what I did to confirm my understanding of the above. Please let me know if there are any obvious errors. Note that this is just an example entropy and nothing I will ever use to generate my own seed. Thank you all for your help!
1) I first generated a random 128 bit entropy as such:
1111001010110001011100111100010111010101101010101111111111101011101110000000010
0001001011111111101011111111000100000010101111100
2) I next performed a hash of the entropy by saving it in a notepad.txt file then performing the following command: certutil -hashfile test.txt SHA256
3) The resulting hash is:
bc4f595b36de2533832a47bf66535612688d81594449693bed9414180ab7cad4
4)
The first 4 bits of the hash would be 1011. This is my understanding as I believe that when converting from hexadecimal to binary you must always represent each binary value with four bits.
In this example, b is converted to binary as 1011. 5) Next I appended the 4 bites derived from the first placeholder of the hexadecimal hash value converted as follows ENT+CS = 1111001010110001011100111100010111010101101010101111111111101011101110000000010
00010010111111111010111111110001000000101011111001011
6) Divide the resulting 132 bits into the following lists:
11110010101
10001011100
11110001011
10101011010
10101111111
11110101110
11100000000
10000100101
11111111010
11111111000
10000001010
11111001011 (BIP 39 word "west")
So if I understand it right then, the only requirement for a valid 12th word for this 12 word BIP 39 phrase would have to contain 1011 at the end of their bit pattern. That would mean that in addition to the BIP 39 word "west" that I chose two other options could have been either “earth” number 555 decimal / 1000101011 binary and also the word “maximum” number 1099 / binary 10001001011 Is this correct?
Also with respect to the way I computed the the hash of the 128 bits, I did the following: I entered in all the 1s and 0s into a notepad file and saved in a .txt extension. I then performed the CertUtil on said file that provided me the above digest in SHA256. Does this produce the correct hash file of the binary stream? I’m not sure if I did this correctly. Thank you.