A hash function is a computer program that takes an input of data and returns a verifiable result, called a checksum. The input can be any source of data, and running the same hash function again will always return the same checksum as the result. For example, running your random source data of 128 bits of entropy through a hash function will always return the same result as the checksum. If you change anything in that source data, you will get a different result from the hash function. In this step, the random source data is run through a SHA256 hash function. The first X digits of the checksum are then added to the random source data/entropy, where X is equal to: (amount of bits of entropy / 32). 256 bits of entropy (256/32 = 8) - add the first 8 bits of the checksum to the random data 224 bits of entropy (224/32 = 7) - add the first 7 bits of the checksum to the random data 192 bits of entropy (192/32 = 6) - add the first 6 bits of the checksum to the random data 160 bits of entropy (160/32 = 5) - add the first 5 bits of the checksum to the random data 128 bits of entropy 128/32 = 4) - add the first 4 bits of the checksum to the random data It's important to note that BIP39 generates the seed phrase from binary code, which is made up of 0's and 1's. However, the SHA256 hash function returns the checksum as a sequence of numbers and letters, called a hexadecimal. So in order to get the seed phrase, you have to convert the checksum from hexadecimal format to binary format. Here's the next step: We slice the result into 11-bit chunks of data. Each 11-bit chunk of data will map to a word from the BIP39 word list You have seen the word "bit" used a few times in this article. A bit represents 0's and 1's. It is the smallest representation of data we have, and it is expressed in a language our computers understand. Your original source of random data (or entropy) plus the SHA256 checksum is divisible by 11. The BIP39 word list contains 2048 words, and each word on the list maps to 11 bits of data. In this next step, you break your entropy+checksum combo into sequential chunks of 11 bits. It is important that you slice the 11-bit chunks in sequential order. This means going from left to right, every 11 bits is grouped together. Every 11 bits represents a word in your seed phrase, and the order of the words has to be correct. The next step is to convert your 11-bit sequence into decimal format. This will give you a number that maps to the BIP39 word list. Now, in the correct order, map each 11-bit sequence to the matching word in the BIP39 word list. Finally, this is your seed phrase! It's important to highlight that some word lists for BIP39 might start with 1. In code, the first number is always 0. This means that 2048 words are listed as 0-2047, not 1-2048. If your BIP39 word list starts with 1 instead of 0, you will need to subtract 1 from the word list numbers to get the correct word.