A user’s initial transaction with bitcoin or other altcoins generates a pair of unique identifiers called a “private key” and a “public key”. The private key is a cryptographically encoded unique string of numbers and characters that only the owner knows. The public key is a cryptographic code that is used to prove that transactions are coming from (digitally signed by) a user’s private key.
The keys are stored in a wallet which has a public address. It’s kind of like a locked mailbox where people can insert mail, but nothing can be retrieved without the key. A wallet can hold multiple private keys. If a user loses or can’t remember their private key, they lose access to the currency located at that public address forever. A public key CAN be recreated with the user’s private key.
The public key is a very long string of numbers, and in order to create a public address, this string is compressed and shortened (hashed). Essentially, the private key generates a public key which in turn generates a public address. To continue the mailbox analogy, the public address is like the address of the mailbox and can safely be shared. The mailbox itself (the public key) can be shared so people can send things to it. The private key is what is needed to retrieve things from the wallet in order to sell, withdraw, or transfer.
Cold Storage Wallets
Wallets which store private key information offline are called cold storage. Private keys can be stored on paper wallets which are documents that have the private key and a QR code that can be scanned whenever a transaction is initiated.
Private keys can also be stored in a hardware wallet which is usually on a smartcard or on a USB device.
An offline software wallet is another option that is installed on your computer, and stores private keys in the offline partition but also has an online partition that stores public keys.
The disadvantage of cold storage wallets is that physical devices can break down or be stolen or hacked. The advantage of a hardware wallet that is kept offline is that it can’t be hacked and your keys and bitcoin cannot be stolen.
Hot Storage Wallets
A hot wallet stores private keys on devices or systems that are connected to the internet. This includes desktop wallets, mobile wallets, and web-based wallets. Online wallets and most desktop wallets have mobile versions that are available as apps for your smartphone.
Online wallets can be vulnerable but are the easiest and most convenient choice. Many serious bitcoin investors have more than one type of wallet, keeping the bulk of their bitcoin in an offline wallet, and keeping their spending balance in a mobile account.