Blockchain networks are kept secure through encryption. Simply put, encryption allows users to encode information in a way that only authorized parties can access it. Decryption is the method that network participants can use to decodethis information for future use. Each user has a public key and a private key which can be used to encrypt and decode information on the blockchain.
But what is blockchain and why do we need public and private keys to use them? How are public keys and private keys used in practice? And how do I keep this information safe?
Public Key vs. Private Key
It’s important to understand the difference between public and private keys. Both have very different functions and understanding how they are used is essential if you are investing in cryptocurrency.
Your public key can be thought of as your account number. You want this information to be know to other users that you will be transacting with. When someone wants to send you Bitcoin or Ethereum they will include your public key when conducting the transaction. You don’t want to keep this a secret. Think of it this way, if you kept your email address a secret no one would be able to send you emails! The same type of thinking applies to your public key.
Your private key is like a password. This is what you are going to use to unlock the cryptocurrency you have when you want to spend it or send it to others. This is absolutely something that you should keep a secret. The owner of the private key is the owner of the cryptocurrency that it is associated with. If you lose your private key or if it gets stolen you no longer have the right to the cryptocurrency it was once associated with.
Taking A Look At An Example
So let’s get an understanding of how a public and a private key are used in a cryptocurrency transaction. The image below shows a simple distributed network. One individual wants to send information (in this case monetary value) to another individual.
When the user engages in this transaction they will take the information they want to send and encrypt it using the public key of the individual they are sending the information to. They will then send a message to all transaction approvers so they can validate the transaction.
Once the transaction is approved the information (in this case the cryptocurrency) will be transferred to the receiving party.
If this individual wants to use this cryptocurrency that they received they will need to use their private key to decode this information before sending it. Only their private key can decode this information because the information was originally encrypted using their public key. Public keys and private keys are related mathematically. This is why only this individual’s private key can decode this information and no one else’s.
If this individual wants to send this information to another individual they will decode this information using their private key. Then they can encrypt it again using the intended receiver’s public key. This is how transactions are performed via a blockchain network.
Cryptocurrency Wallets and Private Keys
Cryptocurrency wallets are just software that help you manage your public and private keys in a user friendly way. Everytime you use your cryptocurrency wallet to send cryptocurrency elsewhere it is applying the private keys it has stored to decode this information before sending. Before cryptocurrency wallets existed as they do today individuals would have to manually store and apply their private keys when engaging in transactions.
Most software wallets, like Exodus or Jaxx, come with a seed phrase and this pass phrase is directly connected to you private key. Using this phrase will help you recover your assets if the hardware your wallet is stored on is not functioning properly anymore.
Most wallets will allow you to export your private key so you can write it down and keep it somewhere safe. It’s probably a good idea to do this just to be on the safe side. Remember, your private key is the most important information that you have. Maintaining it will allow you to access your cryptocurrency assets no matter what happens to the computers that they are stored on.