By Iván Castelán
Let's start from scratch
Now that you have heard how Web3, through the powerful technology of blockchain, comes to revolutionize the internet, decentralizing and returning power to users, have you ever wondered how it can do that?
Well, let's start with something very simple: the heart of blockchain is cryptography! 🤖 Cryptowhat? Cryptography! Ahh! The thing about hackers? More or less. Cryptography is an important branch of computer science for information security; basically, it provides the trust we need for these systems, but don't worry! We will see more in-depth what cryptography is and some very interesting history in another post.
For now, we will discuss a very important topic for cryptography that has to do with blockchain. We will address what public keys 🔑 and private keys 🗝 are.
In VERY VERY simple and basic terms, the two keys are a pair of codes generated through a series of mathematical procedures that are linked together, meaning that one public key corresponds to only one private key and vice versa. And, as their names suggest, the public key is public, which means that you can share that key with anyone you want, without fear! Meanwhile, the private key is only and solely yours! Only yours! Please never share it.
The public key is the one you use to communicate with the world, present yourself, and say that information, assets, digital goods, etc., can be sent to that key. The private key is super important, remember that you cannot share it with anyone, and you also cannot lose it! As public key (public_address) and private key (private_key) are linked, if you ever lose the private key, there is no way to recover the funds or digital goods associated with that public key.
An example to understand
Did it sound a bit complicated? Let's try to simplify it a bit more. If we bring it down to a more physical level. Let's imagine your home. That home (house, apartment, loft, condominium, whatever it may be) is your property, it's your heritage. From that property, you can share the address, right? You can let half the world know what the address of your home is, and nothing will happen. That (the address) would be the equivalent of a public key BUT! They will never be able to enter because they don't have the key to the locks, that would be your private key, with the only thing you can access your assets, you and only you! You wouldn't give someone else the keys to your house, would you? It's the same with the private key, NEVER! share it and always remember where it is! If not, you lose access to your property!.
🔑 Public key -> The one I share with the world, with which I communicate and to which assets, digital assets, etc. can be sent.
🗝 Private key -> Only yours, you should never share it, much less lose it and most importantly, it is what validates that a public key belongs to me.
We can understand it with an English acronym: POOP
"The people can only see your public key."
The private key is not shared or lost
Why can't it be lost? Isn't a password easier? That one, if I lose it, I can recover it, right?
It's true, BUT! Let's remember that we're entering another paradigm, another way of thinking with Web3, and now we're the owners of our information and have full control over it! Therefore, more responsibilities. In the future, there will be simplifications for the private key, but for now, please follow our advice and do not lose your private key. If we could tell you the amount of money that has been lost simply because people lost their private key, we would all start crying.
All right, any doubts up to this point? The technical and mathematical way of how keys are generated will be addressed in the future in a special section of the information capsules called "technical bites," so stay tuned!
Iván Castelán, Web 3 developer at OS City