What’s covered: transactions, wallets, and exchanges
Prerequisites: Part 1
Expected outcomes: after this you will understand more of how to own your own cryptocurrency, what happens when you make a transaction with someone, and where you can go to trade your cryptocurrency for other currencies.
Time to completion: 10m
Transactions
In Part 1 we talked a bit about transactions via a trivial example of Susan giving Bob some of her Bitcoin in return for some good or service. I mentioned there is some information bundled in this transaction. Namely the sender address, recipient address, the amount being sent, and a signature from the sender (generated by sender’s private password) which validates this transaction. Think of addresses like bank account numbers.
But how does this work? How does the transaction signature get validated without knowing the senders password to begin with? A lot of this involves cryptography, hence where the term cryptocurrency came from.
Public and Private Keys
Key pairing is an implementation detail, if the above paragraph of what makes up a transaction satisfies your curiosity, feel free to skip to the next section.
Let’s ignore computers for a bit and focus on something more tangible. Let’s say you are mailing a letter to someone with some very sensitive information. A physical letter. You are concerned that the receiver may not trust that the letter originated from you. So you sign it with your one of a kind unique signature. You can think of this signature as your password or your key. There are a few problems with this. First, you have to tell the recipient what you expect your signature to look like so they can cross reference it’s you. Worse, you can’t be certain that someone doesn’t intercept your letter on its way to the intended recipient and thereby learning your secret signature. In either case, if your signature authenticates your identity, anyone who sees it can then pretend to be you! So how can you prove that you are who you say you are without exposing your unique signature?
This is the problem that public and private key pairs resolve. Some very smart mathematicians came up with a way for you to have two keys. One you give out freely (public) and the other you hold in secret (private), never showing anyone. Both keys are very tightly related but their relationship is impossible, at least in a timescale that matters, to figure out. In other words, you can’t infer the private key from the public key even though they have a relationship. When you “sign” your letter you use your private key to generate a unique one of-a-kind signature. For validation, your associated public key is computed against this unique signature and is able to confirm whether or not the unique signature was generated from the associated private key while never being able to know what the private key actually is. There is another component that private/public keys aid in, and it involves scrambling the characters in the message (encrypting) and unscrambling them at a later point (decrypting) which is similar but different than signing. For these purposes, it goes beyond what we need to know for now. If you want to learn more, follow this youtube link for an in depth explanation
Fun fact, public and private key pair cryptography is not unique to cryptocurrency. It’s how we “trust” that the webpages we visit are who they say there and it’s how we make it hard for people to sniff out your gmail password when you enter it in your browser and send it to google.com. It’s used all over technology and to the best minds on this planet, no computing power will be able to crack it in any time period that matters.
Okay, so going back to cryptocurrency transactions. The same applies as the letter example. You generate a unique signature in the transaction using your super secret private key (password), approving some amount of coins to go from you to someone else. The ledger (blockchain), is then updated and validated across the world by using your public key against the unique signature in the transaction. All of this happens behind the scenes by the “mining” process outlined in Part 1. That’s it. At a conceptual level, that’s what happens.
Wallet
One question you may have at this point is, where do you get your own public key, private key, and total balance from?
This is where wallets come in. Let’s take a physical wallet. Wallets generally do a few things.
- Stores your ID
- Holds your business cards
- Shows your balance available (cash)
In that regard, this is exactly what a cryptocurrency based wallet does. Your ID is your private key. You keep this in your wallet. Your business cards are all copies of your public key. You hand this out to everyone you want to do transactions with. The cash in your wallet is your cryptocurrency balance. Except one thing. Your balance is derived from evaluating your past historical transactions in the blockchain (ledger). Your wallet just tells you what your current balance is based on the total sum of all your transactions.
So how is a digital currency wallet created? Well there are many types. They range in a few ways:
- security
- coins they support: e.g. Bitcoin, Ethereum, etc
- platform they support: e.g. Windows, MacOS, Android, iOS, Web, and even paper!
- cost
Security is the most important. In this regard there are three types of wallets:
Hot
A hot wallet is a wallet where your private key is stored and managed remotely, most often by a third party. So for example, you may create a wallet from a website, they store your private key on their end, and you trust them to manage it. For this trust, you have some conveniences. Namely, you need to manage less and you can access your wallet from any computer.
Warm
This is where you create a wallet on a specific platform, e.g. your Windows laptop or MacBook. Your private key is stored on your harddrive. Slightly less convenient but if you practice good basic security and you always have access to your computer of choice, only you will have access and know your private key, unlike a hot wallet as again, in a hot wallet you are entrusting a third party with it.
Cold
Cold wallets is where you have a dedicated device. A physical piece of hardware that holds your private key. You connect this device, e.g. to a USB port in your computer, and the device will send a signal to your computer when you use your private key. The important thing here is that your private key never leaves the device and the device can not connect to the internet. This makes it much much more secure. The downside is that these wallets cost money.
There are a number of services that will create wallets for you within these three categories. We will create one for learning purposes in Part 4 and then if you decide to get serious, we will look at a cold option in Part 7.
Exchanges
Finally, we have exchanges. This one is pretty self explanatory. Just like a stock or fiat (e.g. USD, CAD, EU) based exchange, there are cryptocurrency based exchanges. It is here where you can exchange your USD, CAD, EU, money for Bitcoin, Ethereum, Litecoin, etc. Similiarly, it is also where you can exchange one cryptocurrency for another. At the time of this writing (April, 2018) there are over 1500 different cryptocurrencies.
Up next..
At this point, you now should have a high level understanding of the main concepts behind cryptocurrency. In Part 3 we will cover how different cryptocurrencies differ from one another. Then, in Part 4, you will put these concepts to practice by creating your first wallet. If you feel motivated to do so, in parts 5-7 we will walk through the steps of buying your first coin, conducting your first transaction, trading one coin for another on an exchange, and finally, how to be more secure should you decide to get serious.
Continue on to Part 3 where we discuss the difference between digital currencies