The journey of a transaction begins in a wallet, which is a software application that enables you to interact with your bitcoin.
● The terminology is a bit unfortunate, as “wallet” implies that the bitcoin someone owns is stored here, which is not the case. The bitcoin someone owns exists on the blockchain, which acts as an open ledger displaying who owns what amount.
● A software wallet can create the private key(s), public key(s) and addresses, and assists in signing outgoing transactions (using private keys).
Hierarchical Deterministic Wallets
Today’s wallets are usually “Hierarchical Deterministic” (HD-wallet) in nature, “Hierarchical” means that the keys and corresponding addresses are organized into a tree, and “Deterministic” means that the keys and corresponding addresses are reproducible with the same starting input, or “seed”.
The way HD-wallets work is as follows: A very large randomly-generated (binary) number is created from entropy. The “Entropy” refers to the level of randomness of the generated number, which is then put through a hashing function (SHA256), receives a checksum (which detects human transcription errors later on), and split into 11-binary-digit parts (with 24 parts total), which are converted into decimal numbers. To make it more user-friendly, a standard was introduced, suggesting that we all use a list of protocol-defined words, 0- 2047 words in total, with each word being given a number from 0- 2047. That’s where the “seed words” stem from. you can view the word list on github (the words are numbered from 1- 2048, whereas it should be 0 - 2047, meaning that every displayed number is too high by 1. In order to find the corresponding word, subtract 1).
Instead of having to back-up the private key of each- and every address someone uses, the user now only has to back-up the words (mnemonic sentence) he receives in numerical order when creating the wallet, commonly referred to as “seeds” or “seed words”.
How, you may ask ? Once the “mnemonic sentence” is created, it is put through a hashing function (PBKDF2) through which the seed (not to be interchanged with the “Mnemonic sentence”) is created. From this “seed”, the master extended keys are generated, from which in turn the child individual keys are generated.
● Whether a passphrase is used or not, the process of creating the “seed” remains the same. The only thing that would change is the input on the hashing function ; “mnemonic sentence” + passphrase.
Everything’s linked together, which makes it possible to recover each and every private key, public key and address from the mnemonic sentence.
reply