What is a Bitcoin address? (illustrated)
July 05, 2019
If you are new to Bitcoin and cryptocurrencies you are probably asking yourself this: “Do I have to register somewhere to get a Bitcoin address?” This is a natural question. Every other service on the internet works this way: you sign-up to a service by giving your email. On Bitcoin, it’s not required.
In my How does bitcoin work article I was picturing Bob sending money to Alice representing a transaction. The transaction contains a recipient address. What is it?
In this article, I will tell you what a Bitcoin address and how it works!
It’s all about maths…
You can create a bitcoin address using a wallet program (actually most wallets will create multiple addresses to help keeping things quite anonymous). An address is a big number represented by letters and numbers. It is also called a public key. The wallet will generate these numbers.
3CahdmxRvrCiZVZLMpFchbDMVsdLyu69uF
is one of my Bitcoin public address. You can even see whether I received money on it or not on the Bitcoin blockchain explorer: https://www.blockchain.com/btc/address/3CahdmxRvrCiZVZLMpFchbDMVsdLyu69uF
This number is associated with another number you MUST keep secret. It’s called your secret key for a reason! This key is mathematically linked to your public key!
This secret number allows you to create a third number (that’s a lot of numbers) that’s called a signature. The signature proves that you own the secret key without actually revealing it.
This is very different from how credit/debit cards work. When you pay with a credit card you give your secret code to the payment terminal ! With Bitcoin, your secret never leaves (and it shouldn’t) your wallet. The way Bitcoin procedes is far more secured than the one credit/debit cards work.
It’s very handy that you can prove that you own a secret without having to reveal it, isn’t it? We will see why next!
How does all this help me own and send Bitcoins?
First, it might seem counter-intuitive but… There are no actual coins in an address, just unspent transactions from before that you are allowed to spend if you know the secret key. They are called UTXO, standing for unspent output from bitcoin transactions.
A wallet is a collection of addresses having one or more unspent transactions that have been sent to them. It is closer to a keychain than an actual purse containing coins.
Owning Bitcoins means you know secret keys that allows you to create signatures proving that you can send unspent transactions to another address.
That’s it! That’s why you don’t have to sign-in anywhere online. The only fact that you have a secret key on your computer or your phone is enough to let you spend your coins. When you create a transaction using these keys and broadcast it to the Bitcoin network then the payment is done!
The person associated to this address also possesses a secret key that allows him/her to spend these Bitcoins and so on.
What if I lose my private key? What if I spend money on the wrong address? 😱
There are multiple cases where this could happen.
You sent it to the wrong person: If you know that person you can ask for your money back. If you don’t, the chances of seeing your money again are very thin.
You have done a typo typing the address: No worries, there is a verification system built in the address system and most wallets will tell you if it doesn’t match. You should always copy and paste addresses (or flash a QR Code if you are on mobile). This limits the chances of making a mistake. Once you copy and paste, check if the address is really what you copied!
You sent it to an address and the private key associated is lost? Then my friend your money is lost in the intergalactic void!
There is no “reverse transaction” mechanism in Bitcoin. With great power comes great responsibility… Keep your keys safe!
You could technically try to stumble upon your old key but mathematically the odds are so thin that you would have more luck keeping a backup somewhere safe.
What if someone finds one of my private keys? 😱
Then this person can produce a cryptographic signature for this address, i.e: spend your coins! That’s why you NEVER (can’t emphasize this more) give your keys to a third party. Even a friend you trust could be careless about your keys and get them stolen.
Some online services can create Bitcoin addresses for you. These services like exchanges (where you can trade cryptocurrencies against dollars for example) can handle your money for you. But beware! You should never keep large sums of money on these online wallets. Once the exchange gets hacked, you lose everything.
Remember: not your keys: not your coins!
Where does the chain of transactions start? Where does the money come from?
Bitcoin consists of a set of rules. In these rules somewhere is written that whoever won the mining game (I talked about it in this article) is allowed to create brand new coins. That’s why it’s called mining. When you find a block it’s quite like you would have found a brand new Gold ore!
So every bitcoin from every transaction starts from a Bitcoin that was once mined. Nobody else can create Bitcoins. This is different from central banks who can print money whenever they want.
Conclusion
- You own and send Bitcoins because you know a secret that allows you and only you to create a signature giving you the right to send them.
- Keeping your keys (and the wallet containing them) secure is the golden rule of cryptocurrencies!
- You actually spend UTXOs when doing a transaction.
- All coins are created by miners!
Having a question or suggestion about the article?
Tell me on Twitter where I'm @vincentdnl!
Help others understand Bitcoin and cryptocurrencies by sharing this post!