The introduction of deterministic wallets has improved the functionality and security from original digital wallets. Deterministic wallets are a serious improvement because they have introduced the use of a “master seed.” A master seed makes keeping track of all of your transactions much more manageable because it uses deterministic and hierarchical functions.
Here we will go through:
- How do cryptocurrency wallets work?
- What are the qualities of a deterministic wallet?
- What is the value of deterministic and hierarchical functions?
In order to use and send others your cryptocurrency, you first need a wallet. All a wallet is a digital file which stores your bitcoins. It is also the place where you store your cryptocurrency when it is held online. You can also use a hard wallet to store your currency offline.
Sending cryptocurrency is similar to sending an email. To send an email you need the address of the recipient. You also need your password to get into your email. The difference is that digital wallets and cryptocurrency transactions are much more secure than sending an email; as you would hope!
The wallet works by holding your cryptocurrency and create addresses for you to send and receive payments. It also creates a private key that gives you access to your transactions from your wallet.
Also like your email account that stores all of your emails, a wallet stores the history of your transactions. This is a crucial function, but also its limitation.
Bitcoin Address, plus, Private Key, equals, Cryptocurrency Wallet
Each time you make a transaction from your wallet a pair of address is created: a public address to share, and a private address which you must keep secret (addresses are often also referred to as keys).
When you send a transaction from your wallet, a pair of keys are randomly generated. With typical wallets, you must back up every transaction you make. Backing up is essential in the event that your transactions are lost. Typically the user will need to save a record of all the pairs of keys; that’s every transaction you make.
Because this a cumbersome and tedious practice, the alternative to backing up was to reuse the same address for all transactions. Reusing the same address mitigates the problems of losing your transaction history. However, reusing an address obviously has some limitations and can compromise the security of your wallet.
HD Wallets: Hierarchical Deterministic Wallets
HD wallets offer a partial resolution to the problem of record keeping and lost data. I say “partial” only because nothing is perfect, and there are always attackers waiting to take advantage of the system. If you want to go into further detail about how HD wallets can be undermined, then I suggest you read, Deterministic Wallets, Their Advantages, and their Understated Flaws.
Nevertheless, deterministic wallets have some very real advantages.
Rather than needing to back up every address/key, HD wallets use a “seed key.” And the seed key is the only key you ever need to back up.
All of the addresses are derived from a seed key. A seed key, or seed, is typically a serialization of a common, word or phrase. The advantage is that addresses are generated from a known pseudo-sensical phrase, rather than being a randomly generated string of seeming nonsense.
Master seed keys for HD wallets are 12-word sentences. The seed is appended (joined) with new variables at its end. The seed thus derives addresses which are both hierarchical and sequential.
To recover any transactions, all one needs is the seed key. That means; YOU MUST BACK UP THE SEED KEY.
Deterministic wallets function with a master key and the one-way SHA-256 hash algorithm. What this means is that if you enter the same variables you are always going to have the same output or address. This is an important feature of deterministic wallets, and just like Bitcoin transactions. Determinism is crucial for security if one could get different outcomes using the same function, then the system would not be secure. Instead, transactions and addresses would face the problem of guessing private keys and double-spending.
Because all addresses are derived from the master seed key, another quality of an HD wallet is that it is hierarchical. 0
You can think of hierarchy kind of like a tree; HD wallets produce a hierarchical tree-like structure of keys which start from the seed master key.
The seed that grows a tree with branches all initiates from the original seed. There are going to many branches and off-shoots, which are the multiple addresses all originating from the seed. If you want to plant another tree you just need its original seed, but all things are going to return to the origin.
This is how the hierarchy of the HD wallet works; everything originates from one place, so you always know how to get back to the original seed. So when you restore an HD wallet with the seed key, the wallet processes all of the private keys from that seed. Once this scan is done, your transactions and funds will be recovered.
Two HD Wallets: Electrum & BIP32
Both Electrum and BIP32 wallets use a similar algorithm which allows them to maintain ownership and control over the master public key. The difference is that Electrum wallets are not necessarily hierarchical, but this is a feature that can be added. Whereas BIP32 wallets already include the hierarchical feature.
The Master Public Key
Another feature of hierarchical wallets is a master public key. A master public key is a key that is generated from the wallet’s master private key. Sometimes a master key is the same as the seed, other times it is a derivative of the seed. The distinction of a master key is that has the power to generate all of the addresses in a wallet, but it cannot generate the private keys.
This is a useful feature because it means that someone with access to a master public key can access the balance of a deterministic wallet. However, unless they have the seed they cannot spend the balance because they cannot generate the private key necessary for each address.
Another feature of a master key is that all of the private keys generated from a master private key are themselves master private keys. That means that they can be treated as deterministic wallets on their own.
Conclusion and Advantages of Deterministic Wallets
- All of the addresses are derived from a single master seed. So only the master seed/seed needs to be backed up in the event that a recovery is necessary. This is what makes the wallet is Hierarchical Deterministic.
- You must back up your seed key! If you lose this you and lose your transaction history and you will not be able to recover them.
- HD Wallets are more secure because they generate many receiving addresses for every transaction.
- Deterministic wallets function with a master key and the one-way SHA-256 hash algorithm.
- Typical wallets require all transactions with addresses and private keys to be backed up in the event of their loss.
The use of a seed key for deterministic wallets is what makes their functionality innovative. This does not mean that they are invulnerable to savvy attackers, nor does it mean that you do not need to keep a record of your seed key. But with deterministic wallets transactions are managed and stored more efficiently and recovered with greater ease. The ease of managing an HD wallet will make a big difference, especially if you make regular transactions.
Here are a few Popular HD Wallets
This is just a list of a few wallets and not an endorsement of anyone in particular. Be sure to do the research to find which one is best for you.