Crypto Noobz: A critical concept to learn if you want to better understand cryptocurrencies as a user
Frequently when people try to explain cryptocurrencies, they end up talking about blockchain, proof of work, decentralized systems, blah, blah, blah about algorithms and you'll find yourself thoroughly confused. It's better to try to focus on learning about specific aspects of crypto and slowly develop your understanding over time, because it really is a complex and nuanced system. A fundamental concept that is important to understanding crypto is how custody works. Specifically, understanding what private and public keys (key pairs) are, what addresses are, how they are used to make transactions, and what crypto wallets do, and I'll try to do that. For the purposes of this post, you don't really need to worry about the mechanics of exactly how a blockchain is structured or what proof of work accomplishes in the system, but hopefully, you can come away from this post understanding more about how to use cryptocurrency in an informed way. I'll talk specifically about how these work in bitcoin, but it's pretty much the exact same in most cryptos.
Key Pairs and Addresses
A key pair consists of what's known as a public key and a private key. If you think of the Bitcoin network as an accounting system, rather than a currency, the key pair is the equivalent of an account on the system. Every private key has 1 corresponding public key. In most contexts, the term public key is interchangeable with 'address', and from now on, I'll do that, although it's good to know they technically aren't the same thing. Think of the address as the public key, just in a different 'mathematical' form. As the name implies, an address is the thing that someone sends bitcoin to, addresses have some 'balance'. The private key is what you need to authorize a send from an address. Using fancy math, private keys allow you to provide a 'digital signature' that can only be produced by the private key of that address, without giving away the private key. So when you make a bitcoin transaction, you are basically broadcasting a message that says "I am lowering address A by X amount, increasing address B by X amount minus the transaction fee, and increasing the address of whoever confirms this transaction by the amount of the transaction fee, here is the digital signature of this transaction which proves that I have the private key to address A". And if everything checks out, this transaction will be confirmed to the blockchain. So the blockchain essentially is a list of transactions. The blockchain doesn't store the 'balances' of every address, instead, it just stores the list of all the transactions that have occurred, and you figure out an addresses balance by going through the history of the blockchain and counting up all the transactions that an address has been involved in, giving you the final balance. This may sound tedious, but the next topic, wallets, make this trivial. You may be asking "But where do private keys come from? Who creates them and how do I get one?". The question to this answer will seem kind of odd but this is a big part of what make bitcoin interesting. Fundamentally, public and private keys are just numbers. Public keys are simply derived from the private key, using fancy math, in a way that makes it impossible to derive the private key from the public key. In other words, you can calculate the public key using the private key, but you cant calculate the private key using the public key. The private key is just a a number between the range of 1 and 115792089237316195423570985008687907852837564279074904382605163141518161494336. This number range is so large, that if you pick a random number within that range, it is effectively impossible for someone to figure it out or guess it, if they were to try, it would take thousands of years. This is how you can make a bitcoin key pair on a device that has never been online, and you can send bitcoin to it without it ever having to 'register' it, so to speak, it's just pure math. Now if you had to do all this stuff manually, it would be quite a pain in the ass, which brings us to the next topic.
Wallets
A wallet is a piece of software that essentially hides all of this stuff from you. So you don't have to worry about keeping track of each private key of each of your addresses, how to calculate the transaction fee, calculating the balance of each address, generating a secure random private key, or calculating the public key from the private key. In essence, wallets are the user interface of a cryptocurrency network. Hopefully at this point makes sense to you that it is technically incorrect to say that a wallet stores your cryptocurrency. A more precise way of saying it is: they store your private keys to your cryptocurrency addresses. Anyone who has the skills could program their own wallet, and for this reason, hundreds of wallets exist. They each have their own set of features and properties that provide them with benefits and negatives. But there are 2 main categories of wallets that you should be aware of and those are custodial vs non-custodial wallets. Non-custodial wallets store your private keys, as well as sign and broadcast your transactions on the device that the wallet is running on, giving you full control of the private keys. Custodial wallets are storing the private keys to your crypto on some external hardware, like a server, that someone else runs, so you do not have direct control of the keys. An example of a custodial wallet would be pretty much any cryptocurrency exchange, like coinbase. When you are sending bitcoin to your address on coinbase, you are sending it to an address whose private key is controlled and secured by coinbase. As you can imagine there are pros and cons to both of these wallet types. But I won't get into the details of those in this post.
I hope that this post was able to illuminate a little bit on how exactly cryptos work in a way that is understandable, it is a complex topic, so you may need to reread something or look into someone else's explanation of these topics, but I'd definitely recommend trying to get a firm understanding of these concepts. Once you understand this, I think it makes the whole ecosystem make much more sense. Thanks for reading!
submitted by /u/tokoloshe_
[link] [comments]