IntroductionMnemonic (seed) phrase are words that varies from 12 to 24 used in hierarchical determistic wallets as backup for wallet recovery. Normally, HD wallets automatically generate this words, but for the sake of knowing, some people will like to know how the words are generated. You can even make use of
iancoleman converter to generate seed phrase and in the process, the converter also generate seed, private key and the public keys that make up a wallet, you can make use of it offline which is safer. Using
iancoleman converter.
use iancoleman converter only if you have an air-gaped computer to run it on. If you plan on using the online version, only use it to verify that the process we have described above works as advertised. We do not advise inputting any mnemonic phrase you intend on actually using to back up coins into any site.
But in this case, we will generate the seed phrase ourselves which is also how wallets generate seed phrase. But this is just for the sake of knowing and not a recommended way of generating seed phrase. Seed phrase generated by hd wallet is perfect while iancoleman converter can be used by professionals.
These are the steps to generating of seed phrase.
Entropy generationThe entropy that will be generated depends on the bits used, the mnemonic must encode entropy in a multiple of 32 bits. With more entropy security is improved but the sentence length increases. We refer to the initial entropy length as ENT. The allowed size of ENT is 128-256 bits.It is allowed to be 128–256 bits to generate 12–24 phrases.
CS = ENT / 32
MS = (ENT + CS) / 11
| ENT | CS | ENT+CS | MS |
+---------+----+---------------+--------+
| 128 | 4 | 132 | 12 |
| 160 | 5 | 165 | 15 |
| 192 | 6 | 198 | 18 |
| 224 | 7 | 231 | 21 |
| 256 | 8 | 264 | 24 |
ENT= Entropy
CS= Checksum
MS= Mnemonic sentence in words
If SHA256 hash function is used, 256 bits will be produced, this is called the entropy and will be produced in hexadecimal. An example is the use of SHA256 generator.
https://passwordsgenerator.net/sha256-hash-generator/Let us assume this entropy generated using SHA256 hash function is:
B1B826D5946769D7985A0059A294CEA2FEB47AEC28B94D0EAB2E08F4357F3A5D
The entropy generated in hexadecimal is converted to binary, this link below can be used to convert hexadecimal to binary:
https://www.mathsisfun.com/binary-decimal-hexadecimal-converter.htmlInput in hexadecimal: B1B826D5946769D7985A0059A294CEA2FEB47AEC28B94D0EAB2E08F4357F3A5D
B. 1011
1. 0001
B. 1011
8. 1000
2. 0010
6. 0110
D. 1101
5. 0101
9. 1001
4. 0100
6. 0110
7. 0111
6. 0110
9. 1001
D. 1101
7. 0111
9. 1001
8. 1000
5. 0101
A. 1010
0. 0000
0. 0000
5. 0101
9. 1001
A. 1010
2. 0010
9. 1001
4. 0100
C. 1100
E. 1110
A. 1010
2. 0010
F. 1111
E. 1110
B. 1011
4. 0100
7. 0111
A. 1010
E. 1110
C. 1100
2. 0010
8. 1000
B. 1011
9. 1001
4. 0100
D. 1101
0. 0000
E. 1110
A. 1010
B. 1011
2. 0010
E. 1110
0. 0000
8. 1000
F. 1111
4. 0100
3. 0011
5. 0101
7. 0111
F. 1111
3. 0011
A. 1010
5. 0101
D. 1101
Output in binary1011000110111000001001101101010110010100011001110110100111010111100110000101101
0000000000101100110100010100101001100111010100010111111101011010001111010111011
0000101000101110010100110100001110101010110010111000001000111101000011010101111
1110011101001011101
Checksum generationThe hexadecimal output is inputted into this converter to get your SHA256 binary output:
https://www.fileformat.info/tool/hash.htm?hex=B1B826D5946769D7985A0059A294CEA2FEB47AEC28B94D0EAB2E08F4357F3A5DAfter that, scroll down, you will see a list of outputs, among the list is the SHA256. Copy just the first two digits of that hash.
SHA-256:
2d216ce0647f35edd9f5ad6b2ba4a30ee4c9f85ce3336c4254a2c2e8a6e65633
Take the first two digit and find the binary using the converter:2. 0010
d. 1101
Hexadecimal input: 2d
Binary output: 00101101
Append First 8 bits From the Hash to the Original 256 Bits to Get 264 Bits (entropy+checksum)1011000110111000001001101101010110010100011001110110100111010111100110000101101
0000000000101100110100010100101001100111010100010111111101011010001111010111011
0000101000101110010100110100001110101010110010111000001000111101000011010101111
1110011101001011101 +
00101101Divide the 264 Bits Into 24 Groups of 11 Bits10110001101
11000001001
10110101011
00101000110
01110110100
11101011110
01100001011
01000000000
01011001101
00010100101
00110011101
01000101111
11101011010
00111101011
10110000101
00010111001
01001101000
01110101010
11001011100
00010001111
01000011010
10111111100
11101001011
10100101101
Convert binary (Base 2) to decimal (Base 10)10110001101 1421
11000001001 1545
10110101011 1451
00101000110 326
01110110100 948
11101011110 1886
01100001011 779
01000000000 512
01011001101 717
00010100101 165
00110011101 413
01000101111 559
11101011010 1882
00111101011 491
10110000101 1413
00010111001 185
01001101000 616
01110101010 938
11001011100 1628
00010001111 143
01000011010 538
10111111100 1532
11101001011 1867
10100101101 1325
Finding out words, the words are listed numerically which are in decimal (base), then you will use the individual numbers to find out the words using
BIP39 word lists.
The MS in words10110001101 1421 ranch
11000001001 1545 scissors
10110101011 1451 relief
00101000110 326 chunk
01110110100 948 island
11101011110 1886 two
01100001011 779 genuine
01000000000 512 divide
01011001101 717 flower
00010100101 165 behind
00110011101 413 crime
01000101111 559 easy
11101011010 1882 twenty
00111101011 491 diary
10110000101 1413 rack
00010111001 185 blade
01001101000 616 erupt
01110101010 938 inside
11001011100 1628 slice
00010001111 143 balcony
01000011010 538 drip
10111111100 1532 satoshi
11101001011 1867 true
10100101101 1325 pitch
Warning: This is just an example for educational purposes so you can understand what your wallet is doing. It is better to let your wallet software randomly choose your seed phrase. Do not use these websites that I have used to generate your seedphrase.
ConclusionThis is a way seed phrase are generated but just for the sake of knowing, it is not the perfect way, to generate seed phrase perfectly in a way private keys and addresses are generated with it, using normal wallet is recommended but professionals can make use of
iancoleman converter, but this method option should not be used.
https://github.com/bitcoin/bips/blob/master/bip-0039.mediawikihttps://privacypros.io/wallets/mnemonic-phrase##https://github.com/bitcoin/bips/blob/master/bip-0039/english.txthttps://www.blockplate.com/blogs/blockplate/list-of-bip39-wallets-mnemonic-seedhttps://privacypros.io/wallets/mnemonic-phrase##https://medium.com/coinmonks/mnemonic-generation-bip39-simply-explained-e9ac18db9477