The cryptocurrency wallet is essential for working with cryptocurrencies, but they are basically just a user-friendly tool. On their background runs the so-called asymmetric cryptography, which is characterized by the use of private and public keys.
But what is the difference between these keys and what to watch out for? Continue reading this article to find out.
What is the private and the public key?
The cryptocurrency itself is not in fact stored in the wallet but remains in the blockchain (what is blockchain?). But what we can find in the wallet is the public address (public key) and the private key. The form of both keys mainly consists of randomly chosen numbers and letters.
We can imagine the public being the number of our bank account and the private key similar to the password for internet banking or the credit card PIN code. It is basically a code that provides you with access to your funds. Only those who know the number of your bank account can send you funds, and the same logic also applies here – only those who know your public key – wallet address – can send you cryptocurrencies.
- Public Key: The address of your cryptocurrency wallet.
Looks like this: 1FpPWeadB8iioc5oH5sPAkcai2paoxZke5
- Private Key: Code to unlock your wallet and sign transactions with.
Looks like this: 0C28FCA386C7A227600B2AISODOS2211EC86D3BF1FBE471BE89827E19D72AA1D
However, anyone who knows the private key, including you, can use the funds in your wallet. Therefore, you should be very careful.
So, this was an illustrative example from a well-known world, but let’s take a deeper look at how it all works. Both private and public keys form a part of asymmetric cryptography, which unlike symmetric cryptography uses two different keys.
Symmetric cryptography uses a single key for encryption and decryption, and therefore both sides must know it. However, it only takes one person to get hold of the key to disrupt the entire system.
In asymmetric encryption, one key (public) is used to encrypt the message (in this case, the cryptocurrency transaction), while the second key (private) is designed to decrypt (unlock the wallet). Obviously, the one who does the encrypting does not have to share the same secret with the decrypting recipient – the same code. Only one of them knows the private key.
Video: Asymmetric encryption explained
The role of security in using private and public keys
It is evident that in order to make all asymmetric encryption meaningful, the private key must be safely stored somewhere where others cannot reach it. On the other hand, we can show the public key to whomever we want to.
Several types of wallets can be used to protect the private key, each offering a different degree of protection. We have already discussed in detail the function of cryptocurrency wallets (how and why keep your crypto secured), but in the following article, we shall summarize the essentials.
In addition to the good old offline paper wallets, usually requiring written letters, the most secure way of holding the private key safe are hardware wallets. When using these wallets, the key is ‘outside’ your computer, which can be an easy target for hackers. Viruses that monitor your keyboard activity are a common way to access the private key. All you have to do is tap the key onto the keyboard and the hacker gets to the key immediately. The basic rule is not to enter the key at all and definitely not send it via e-mail or messenger.
Video: Public and private keys explained in 4 minutes
Using the private key to restore the crypto wallet
Your cryptocurrencies are not necessarily bound to one particular wallet. In order to be able to access your funds, you only need to know your private key. If you make a backup of your wallet, you will receive a second password for your private key, called “seed.” This password contains 12 or 24 random English words.
It is important to write this seed down on a piece of paper (you may want to make multiple copies), so in the case, you lose your wallet, you can easily restore it on other devices such as Mycelium or BRD (Bread wallet) mobile wallets.
In summary, a private key is a code that should be stored in a secure (offline) location and only you should know it.
The public key, on the other hand, is your address to which you can have cryptocurrencies sent. If you follow the basic safety rules, you have nothing to worry, although there are some voices saying that a quantum computer could break asymmetric cryptography. However, nobody in the world has been able to build one yet, and someone will certainly come up with a better encryption method and more complicated keys before anyone succeeds in building one.