We store cryptocurrencies in a crypto wallet, just like you put fiat currency in a bank account. However, a crypto wallet works very differently from a bank account, because the latter is managed by a central party. A crypto wallet, on the other hand, runs on the decentralized blockchain. You are also responsible for your crypto wallet.
You send crypto from a crypto wallet, but with a public and private key. You use these keys to sign the transaction, which results in a digital signature. You can compare the wallet address with a bank account number; you send crypto to and from a wallet address.
Yet the wallet address is often confused with the public key. Both are public and can be shared. Not rightly so, because the public key and the wallet address are completely different from each other. So, let’s take a look at the difference between public keys, private keys and wallet addresses.
How does cryptography work? #
Cryptography is seen as the basis of the security of cryptocurrencies. That is also the reason why this digital currency is named after cryptography. Everything stored on the blockchain, including cryptocurrencies, is secured by cryptography. It ensures that your cryptocurrencies and your data are really yours, and that no one else but you can access them.
With cryptography, data is secured by converting the data to a cryptographic hash, which you can compare with ciphers. At first glance, the hash seems to consist of random numbers and letters, while theoretically these numbers and letters are not so randomly chosen. The hash is determined based on the content.
Suppose we convert the following sentence to a hash using SHA1 (a hashing algorithm):
“Today I’m going to buy cryptocurrencies”
Then the SHA1 hash looks like this:
056c3a3d5c3f608147b4573c2d98d5f104c2767d
When we add a period at the end and hash the sentence one more time, the hash looks like this:
6e07f0aad5ec754ecf35eab5527b8b4cb0266782
One small difference makes the sentence look completely different.
SHA1 is a hashing algorithm, but it is slightly different from cryptography. In cryptography, the content is also converted to a hash, but the public and private key are also used here. These two keys ensure that data and crypto can only be used by the rightful owner.
Public key #
The public key is a public key that may be shared publicly. When someone else has your public key, they can’t pretend to be you yet. They need the private key for that.
A public key can look like this:
MIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgGXJXiwc4RpZ+YmRZDNSpsoIpKv1 tjNHLUwJYp1d1S2LOSVs/P1Oq3uipfdvs/jLSAx2N7VtuvToyO7BWcj/bjmlMJCo ZQztW7fyxWUXbemqN2uOddjHq+ixW9PYGXwpgLXQIBmi6mPQ2PmCYjsSUYkCHKUC QiCQSBZxXfbTn4mpAgMBAAE=
Private key #
The private key is a key that can only be owned by the owner. So never share your private key with others! If you do, others can steal your cryptocurrencies.
A private key is a string of numbers and letters that can look like this:
MIICWwIBAAKBgGXJXiwc4RpZ+YmRZDNSpsoIpKv1tjNHLUwJYp1d1S2LOSVs/y1O
q3uipfdvs/jLSAx2N7VtuvToyO7BWcj/bjmlMJCoZQztW7fyxWUXbemqN2uOddjH
q+ixW9PYGXwpgLXQIBmi6mPQ2PmCYjsSUYkCHKUCQiCQSBZxXfbTn4mpAgMBAAEC
gYBR5VUp9QqA40fNkfeK+6dLAu1LlmVEmM4vUZXQvACbplsSa8Jct+Ftlo4mqe+K
DDUqIavtBB7akrmosFUHTc1m9icxSot84z/vVpU2cEAl/iVKaaFal1p6Gr+Eynzc
n5hxBEEUr8za3emktMM8ncH+Rk7+Ky/+gtbJ9H3VtmZ0IQJBAMj2V7YvFctMjn7W
ELdZmm7rW4hydBRnlDuqso8G+mYuvbZu4GJCvHI3/7ifah8RhQRDIOj6cXceWfoK
XGn5iaUCQQCBqbkn+umw6Aw+PxnHbZSi2ydhgp7Pa5bl8wD7Eybs2BGdTIwkJiZ/
M+5jBXysc+AuI+kXBstofHNTS1vIdti1AkEAicz56jAxRp1xXKHXBpLHpeV3d4Hb
/R3ldGChXhgP3b+RUSaIcHiIld22WVfewf0WdAy/5WHOKjtCwYUXR4fYDQJADC3x
InxDL0bcv4wV09HLQHDthg9K85jbl8X3tZ3a7ixtmyTxlQOwYgpyvgJp75kC2dKt
tmgA+1OVUaGmgXIIcQJAfhYOy3qiBkl4Qv27DxJbbX8Utb3I0keG6IYPn+HVPNxy
u3ZTbpqcxvYzMoBfh8dCOHmLhVO4+nF8jqIrOa+OSg==
Digital signature #
When you perform a transaction on the blockchain, you use both keys. First you indicate how much crypto you want to send. Then you add the wallet address and public key of the recipient (more about the wallet address in a moment). You then sign the transaction with the digital signature, for which you use your private and public key. Combining these two keys together creates a unique number, number and character combination that proves that the transaction was made by the rightful owner of the cryptos. The blockchain network then knows that the transaction is valid and can add it to a block.
What is a wallet address? #
Often the public key is confused with the wallet address. Yet there is a big difference between the public key and the wallet address, despite the fact that they can both be shared publicly.
The wallet address is nothing less than a hashed version of the public key and is comparable to a bank account number. The moment you send crypto to someone else, you send it to the recipient’s wallet address. The receiver can then see where the cryptocurrencies come from, because the sender’s wallet address is added to the outside of the transaction. We are talking about the outside here because everyone can see this information. The blockchain is public and transparent.
How is a wallet address created? #
To make things a bit easier, we are going to use the Bitcoin blockchain in this example. Creating a wallet address is done in the following way, in the order shown here:
Seed phrase -> Private key -> Public key -> Wallet address
Seed phrase #
It all starts with the seed phrase. This is a randomly generated list consisting of 12 to 24 words. An algorithm selects the words. It is important that you write these words down as they will allow you to access your wallet if you lose the keys or password. You may never share the seed phrase with others.
The words don’t say much for the code of the blockchain. Each word represents a series of zeros and ones. However, it is easier for people to remember and write down the words, hence they use words.
It is important that the combination of words never occurs more than once, to avoid duplicate addresses. A technique called ‘entropy’ is used to prevent this.
The seed phrase consists of 256 bits, or 256 ones and zeroes. The chance that someone can guess your seed phrase is very small. You can compare it to flipping heads or tails 256 times, writing down a 1 or 0 each time. The chance of ever guessing the same sequence is 1 in 100000000000000000000000000000000000000000000000000000000000000000000000000.
Private key #
The combination of the seed phrase is converted into a private key via a cryptographic algorithm. As we mentioned earlier, you are not allowed to share the private key with anyone. With this key you can sign transactions and access your cryptocurrencies. If someone else has the private key, they also have access to your crypto.
In the case of Bitcoin, the private key could look like this:
L5UxSZahnowzrNU3kv6gxatYcC3TXffv6sxQkebxUxYFxxdSmva1
Public key #
The private key is again converted into a string using a cryptographic algorithm, and this is the public key. The public key is important, because in combination with the private key it creates a digital signature that is unique.
In the case of Bitcoin, the public key could look like this:
020qe9666e50552e0f10c15fa0a7691197144313d30a61c9129ec40375748e28ed
Bitcoin wallet address #
A wallet address is created from the hash of a public key. Other people can send crypto to this address, but crypto is also sent from this address. In the database of the blockchain, the cryptocurrencies are linked to the wallet address.
The wallet address could look like this:
bc1q6zjfr73jywxck3stj0rzl62gaa4hyxgw9tfu8g
Can you reverse this process? #
You cannot reverse this process. It is therefore not possible to retrieve the public key from the wallet address. Also, you cannot extract the private key from the public key, and it is impossible to extract the seed phrase from the private key. This process only works in one direction. That is why it is possible to share the public key with third parties, because no one else can extract the private key from it.
Do I always have to use the same wallet address? #
It is of course easier if you always use the same wallet address. Just think of a bank account number. Inconvenient if you have a new number every week. But in the case of crypto, it can be wise to sometimes change the wallet address, for privacy reasons.
Everyone can see how much crypto is sent to a certain wallet address, but also how much crypto is on it. When you use a wallet address for a long time, it is easier for others to link an identity to the wallet address. Once criminals know which address is yours and how much crypto is on it, you are more likely to become a target.
What is the difference between wallet address, public key and private key? #
So, there is a big difference between the wallet address, the public key and the private key. The private key comes from a cryptographic hash of the seed phrase, which is a 256-bit string. Then the public key comes from the cryptographic of the private key. The wallet address comes from the cryptographic hash of the public key.
Although the wallet address and public key are closely related, they are not the same. The public key is used for signing transactions, while you use the wallet address to send crypto to and from.
How to keep the public key and wallet address safe? #
You usually store the public key and the private key in a crypto wallet. This is software that securely stores the keys. There are different types of crypto wallets, such as the software wallet and hardware wallet. A software wallet is a program that you install on a computer or in the browser. A hardware wallet is a piece of removable hardware, comparable to a USB stick.
The hardware wallet is a lot more secure than the software wallet. If you have not connected the hardware wallet to your device, it is impossible to access the public and private key. They are only stored and nowhere else than on the hardware wallet.
You do not have to keep the wallet address separately. You can simply share this with others. If someone has your wallet address, they cannot steal crypto with it. This is only possible when they are in possession of the private key and the public key.
Conclusion #
You now understand why the wallet address of a crypto wallet is not the same as the public key. In fact, you now know how cryptography works and how the wallet address is created. Extremely important information if you would like to learn more about how the blockchain works and why the blockchain and cryptocurrency are so safe.
When you better understand how the blockchain and crypto work, it will also be easier to understand specific crypto projects.