When you start learning about Bitcoin, it doesn’t take a lot of time, until you come across the term “wallet”. Simply put, a Bitcoin wallet has the same purpose, as any ordinary wallet, in the sense that its used to carry the currency, albeit digital in this case. In the following text, you’ll learn about how a Bitcoin wallet works, why you need it and what are the differences between different types of wallets.
What is a Bitcoin wallet?
As stated in Bitcoin basics, there are two key pairs for the administration of the coins at Bitcoin. A private key and a public key. The public key is mathematically coherent to the private one, which itself is generated randomly. The Bitcoin wallet address is the hash of the public key. Both keys and the wallet address are very long, lack sequence or order, and thus are hard to remember. Because of that, we need programs to overtake the administration of the key pairs. Those are called wallets. Bitcoin wallets can store a lot of such key pairs.
Usually, when you set up a wallet for the first time, you get a so-called seed. It is deterministic in nature and can derive the private key. This seed should be stored carefully in a safe place. Because if you forget the key pairs, you can restore them with the seed. It is recommended to note the seed on a piece of paper or to save it on a USB-stick in a notepad file. To be very certain: do both. When you’ve completed this part of the process, you need to determine a secure password that you will type in, when accessing the private key (signing transactions or texts).
The wallet creates a new key pair for every bitcoin deposit. This helps to increase the privacy of the user. When sending out bitcoins, in certain circumstances, the wallet is able to use several addresses.
Example: Let’s assume you get 1 BTC on your address A. Later, you get another 1.5 BTC on your address B and another 2 BTC on address C. Now you want to transfer 3 BTC, so the wallet creates a new address D, takes all the addresses as the input and the destination address D as the output. Now 3 BTC go to the destination address and the remaining 1.5 BTC to address D. All this happens in the background, without the user noticing anything. The wallet shows the account balance, as a sum of the amounts of coins stored on all addresses.
To increase usability, smartphone wallets normally create QR codes for the addresses. For example, when you want to transfer Bitcoins from wallet A to wallet B, B creates a receipt transaction with the requested amount. The wallet creates a QR-code. A user scans it with his camera and now the transaction details (recipient address and amount) are entered. This negates the need for manual entry, which is inconvenient and prone to costly errors.
What types of wallets exist?
In general, there are two types of wallets, the software and the hardware wallets. Software wallets are computer programs or apps, while hardware wallets are separate devices (usually USB based) that save the key pairs. Hardware wallets are safer than software wallets. The private keys never leave the device. When executing a transaction, the part of the transaction that needs to be signed is given to the hardware wallet, gets signed in the device and after that, the signature leaves the device again. So hardware wallets grant very good protection against hacking attacks. But a hardware wallet should also be handled with care. Restoring-codes and passwords need to be stored safely. The hardware wallets Ledger and Trezor are recommended.