All of us own a wallet and we store cash in it. So, when we hear ‘Blockchain Wallet’, it seems so justified to assume that it holds cryptocurrency. Right?
A Blockchain wallet is a software that holds and manages keys that belong to a user. The keys are pair of public and private keys.
Don’t have time to read full article? Jump directly to Blockchain Wallet Infographics
Let’s talk about public and private keys for a minute.
Public keys are used to receive cryptocurrency from another user over the blockchain. They are, in fact, sent as the hashed version of your public key. This key is visible to others to make the transfer to you. Public keys can be visualized as your account number, street address or email address.
Private keys, as the name suggests, are known only to the user they belong to. When a user wishes to make a transfer to another account, he/she signs the transaction with the private key. Private keys can be thought of as pin of your account, the key to your mailbox or password of your email account.
If you lose any of those, they can still be recovered by visiting the bank, calling a locksmith or resetting an email password. In the case of blockchain, however, once a private key is lost, its lost forever. This is by design. Unlike the previous examples, there is no middle man to recover it for you.
Under no circumstances, you should reveal private keys to others, if you don’t want to risk your crypto-coins to be stolen.
It’s worth knowing that a public key is derived from the private key, mathematically. A hash function is applied on it to generate the final public key which others can see.
At this point, an obvious question captures our mind. If the public key is derived from a private key, then it should be possible to generate a private key by knowing someone’s public key. The answer is NO!
The algorithm that blockchain uses makes it very easy to generate public key from the private key but extremely hard to achieve the opposite.
The assets/cryptocurrency/tokens are recorded on the blockchain and private keys hold addresses of those blocks. Therefore, the owner of the private keys is essentially the owner of those assets/cryptocurrency/tokens.
A single wallet can store multiple private keys. In a way, a Blockchain wallet can be visualized as a keychain.
A blockchain wallet just manages the keys. It does not mean that a wallet is mandatory for making transactions. It’s the personal choice of the user to keep the keys in a wallet or somewhere else (handwritten, maybe). If a user does not like the current blockchain wallet, it can be easily changed by transferring the keys to a new blockchain wallet.
Please note that I am following the Ethereum blockchain to explain the different types of wallets that exist. The concepts are equally relevant to other blockchains such as Bitcoin blockchain.
Types of wallets
1. Non-Deterministic Wallet
This type of wallet has keys generated from different random numbers and are not related to each other in any way. ‘Just a bunch of keys’ or JBOK is another term this wallet is known by.
These types of blockchain wallets are considered inferior because they generate keys for every transaction in just in time fashion. Since keys in non-deterministic wallets are not related to each other, managing them gets too cumbersome as they grow in number. It means they need to be regularly backed up.
In the event of disk failure or stolen phone, access to keys would be lost forever, were they not backed up. For this reason, the use of non-deterministic wallet is strongly discouraged, other than testing.
2. Deterministic (Seeded) Wallet
In this type of blockchain wallet, all keys are generated from a single master key. This master key is known as ‘Seed’. Therefore, all the keys in the wallet are related to each other. As long as one has a master key, the rest of the keys can be generated. Hence, there is no need to back up all the keys of the deterministic wallet.
There is an additional layer of security that is applied to deterministic wallets by encoding the seeds as a list of words in any language. This list of words is known as mnemonic code words. These can be written down and used to generate the master key.
It’s critical not to store these mnemonic code words on the cloud, in a computer or mobile device. If someone with malicious intentions gets hold of your mnemonic code words, then your Ether (and smart contacts) can be accessed by recreating your master key. The best practice is to write it down and store it somewhere safe.
The backup in deterministic wallet is as simple as backing up seed words (same as mnemonic codewords) at creation time. The seed words are enough for the migration of all keys from one wallet to another.
The design of a deterministic wallet puts seed words to ultimate importance as exposing them leads to access to the wallet. But, focusing entire security efforts on just a single piece of data made this design a success.
3. Hierarchical Deterministic (HD) Wallet
Current and the most advanced form of Deterministic wallet is Hierarchical Deterministic (HD) wallet. In HD wallet, seed or parent key derives several child keys, each of which can further derive grandchildren keys.
The tree structure of the HD wallet can be used to express additional structural meaning in a company setting. For instance, different tree branches can be allocated to different departments, sub-units or subsidiaries of an organization for transactions.
4. Brain Wallets
The idea behind brain wallets is that mnemonic code words that generate private keys are chosen by the user, not generated randomly by the wallet. This makes mnemonic words far more secure. On the other hand, this makes mnemonics prone to guessing as well as brute force attacks. Techniques such as password stretching algorithm can be used to protect against brute force attacks, dictionary attacks, etc.
The password stretching algorithm stretches the chose mnemonic words by simply hashing them repeatedly 262,144 times. This gives the hacker, trying to brute force a passphrase, a hard time to apply 262,144 rounds of hashing for every attempted mnemonic word set.
5. Paper Wallets
As the name suggests, it’s a paper-based wallet having the key imprinted on it. They are usually stored in the form of a QR code. In order to conceal the information, a paper wallet is often folded and sealed in such a way that the content remains hidden. Paper wallet is perfect for offline storage of your private keys.
Example: Bitcoin Paper Wallet
6. Hardware Wallets
A Hardware wallet has a customized hardware design build specifically for the storage of private keys. The design makes it impossible to export the key in plain text. Only when the key is required, hardware wallet is connected to the computer.
7. Online Wallets
In online wallets, the keys are stored on the cloud. Operations such as receiving and making transactions are performed through web interface given by the service provider. An online wallet is a good choice for storing your private keys securely, given that one has complete confidence in the service provider.
8. Mobile Wallets
Mobile wallet, as the name suggests, is the blockchain wallet that is installed on the mobile phone as an android or iOS app. Transactions are usually performed by scanning QR code using the mobile camera. Although mobile wallets tend to transact faster than hardware wallets, they are usually less secure than hardware wallets (since hardware wallets feature tamper-resistant design).
Some of the popular mobile wallets are Blockchain, Jaxx, Copay, etc.
Furthermore, wallets can be categorized based on usage frequency.
9. Hot Wallets
Hot wallets are those type of blockchain wallets which are always connected to the internet. They can always send and receive cryptocurrency. Out of the blockchain wallets discussed above, you can see that except hardware wallets and paper wallets, rest are hot wallets.
10. Cold Wallets
Wallets that are not connected to the internet always are called cold wallets. Cold wallets need to be connected to the internet in order to send the cryptocurrency. They can, however, received money even when not connected to the internet. Hardware wallets and paper wallets are the type of cold wallets.
Blockchain wallet is the fundamental concept in Blockchain. It is the critical component of any client-facing blockchain applications. Not only it eases the management of keys, but it also determines the ownership of cryptocurrency (and smart contract, in case of Ethereum) as well as authorize the transactions by digitally signing them.
One must take time to reflect on the benefits of each type of blockchain wallet offer, before choosing one for use. Factors such as security, frequency of use, encryption, mnemonic words, backup mechanism, user-interface, etc must be carefully evaluated before arriving on a decision.