What is a blockchain wallet?
Definition
Wallets in real life are objects that we use to store money or valuables, such as credit and debit cards. On the blockchain, wallets do not hold money or coins, but keys.
Basically, wallets are softwares that are capable of creating and managing accounts on one or more blockchains, as well as signing transactions. To understand what wallets are, let’s quickly see what accounts are on a blockchain.
Blockchain accounts
Accounts are an abstraction managed by a pair of keys: a public key and a private key. This is related to asymmetric cryptography, also known as public key cryptography. The most important thing to understand is that the public key, as the name implies, is public, and can be shown to anyone. The private key must be kept secret and known only by its owner.
Think of a blockchain account like a mailbox. The mailbox has an address, which is like the public key and is known to everyone, and a key used to open the mailbox, which is the equivalent of the private key. Just as you use your mailbox key to access the items that have been sent to you, you use your private key to access the assets associated with your blockchain account.
What are these keys?
To better understand blockchain accounts, let’s understand its three elements:
- private key
- public key
- address
Asymmetric cryptography consists of a public key and a private key. In the blockchain, a third ingredient is added: the address. The address is generated from the public key and is used for security reasons and to make accounts more accessible. In blockchains, we usually use the private key and the address.
Both the private key and the account address, which is derived from the public key, are represented by a series of letters and numbers. The specific format of the address depends on the protocol being used. An example of an address on Ethereum is something like a large number in hexadecimal. For example: 0xb3084a3dAb2227e0Af962076Aa163520d872084A
.
Neo uses a different scheme to generate the address from the public key, more similar to the one used by Bitcoin. An example of a Neo address is a sequence of letters and numbers, for example: NanYZRm6m6sa6Z6F3RBRYSXqdpg5rZqxdZ
.
Types of wallets
There are many types of wallets and many ways to classify them. One way to classify them is into hot wallets and cold wallets. Hot wallets are those that are always connected to the internet, which makes them easy to use, but more vulnerable to hacker attacks. Cold wallets, on the other hand, are never connected to the internet, which makes them more secure, but it makes it necessary to send the signed transactions to another computer, where they will be propagated to the blockchain.
Within the division between hot and cold wallets there are other ways of classifying them, such as where such wallets are used. There are mobile wallets, desktop wallets, browser wallets, etc.
An example of a hot wallet is MetaMask, which exists as both a browser wallet and a mobile wallet. With it, you can create accounts and sign transactions for Ethereum and Ethereum-compatible blockchains. Other examples of hot wallets are Neo Wallet Mobile and Neo Walled Desktop, both wallets for the Neo network.
Cold wallets do not connect to the internet and their most famous example are devices that look like a flash drive, such as the Ledger Nano S, currently one of the most used. Even though they are not able to send signed transactions to the blockchain, they can sign transactions. Any software that is capable of signing transactions and is never online can be considered a cold wallet.
Hierarchical-deterministic wallets
Another classification of wallets is related to how the accounts are created. There are wallets that create unrelated private keys, and there are wallets that create private keys from a seed. Such wallets are called deterministic wallets. This is a more technical subject, and will be addressed in a future article.
For now, just let you know that when you’re given a set of words (typically 12 words) as your “key,” what you’re getting is the deterministic wallet seed; from it, it is possible to create numerous accounts (key pairs).
Who creates the accounts?
As blockchains are decentralized projects, there is no single certifying authority, and users must create their own authentication. That’s what wallets do, based on cryptography, and anyone can write the code for a wallet. There is no official wallet for the blockchain; at best, only the most used one. Care must be taken when choosing a wallet, since they maintain control over the private keys, and whoever has control over the private keys has control over the assets managed by them.
Wallets considered secure do not store your private key in plain text, only encrypted. They are also unable to decrypt the private key without entering a password, which only the user should know. Furthermore, the source code of the wallet must be open, so that users can make sure that there are no vulnerabilities or malicious code.
One last tip, which bears repeating: never forget to back up your private keys, and never share your private keys with anyone. Follow the security rules indicated by the wallet, they are very important.