Where is Bitcoin?

Where does Bitcoin live?

Bitcoin is often described as digital gold or digital cash, both of these things you can hold in your hands. But, Bitcoin is not something you can see or hold, so where is it? You may have heard of a Bitcoin Wallet or a Private Key which implies that there is a place where Bitcoin is stored, and subsequently unlocked to be moved. But, like many aspects of Bitcoin, analogies don’t work very well. It is truly new and unique.

Let’s say you download a Bitcoin Wallet, could be an app on your phone. You create a new address in the wallet, and your friend sends you some bitcoin. It shows up on your phone screen and that’s it. The Bitcoin is now in your wallet right? Not exactly.

What is a Bitcoin Wallet?

When you interact with Bitcoin, sending or receiving, you will likely use a Bitcoin Wallet to do that (See here for a list of some good ones). When you think of a wallet it implies that the valuable thing, in this case your Bitcoin, would be stored inside of it. But, in the world of Bitcoin that’s not really the case.

So, if your Bitcoin Wallet isn’t holding the Bitcoin, what is it holding? It’s holding your Private Key.

What is a Private Key?

If you have used Bitcoin only on an exchange you may not have encountered private keys. Although they exist there too, they just take care of it behind the scenes. But, if you ever want to self-custody your Bitcoin. Which is kind of the whole point of Bitcoin by the way, but we’ll tackle that topic another time. You will need a Private Key.

A Private Key in it’s most basic form is simply a 256-bit number, or some number between 0 and 115792089237316195423570985008687907853269984665640564039457584007913129639934. Every Bitcoin wallet out there has a private key somewhere in that range.

A more common way to see a private key is it’s Seed Word representation. It is a list of 12 or 24 words, from a specific set of 2048 words. It is outside of the scope here but essentially with 2048 different words, there are enough combinations to represent that very large number.

An exmaple of some seed words, representing a private key:

image

Ok, so I know what a private key is but what is it for?

Why do I need a Private Key?

Bitcoin uses something called Public Key Cryptography which works with a Public Key that is public, and a Private Key that is private. Again, when we are referring to keys we just mean some very large number, so large that it is impossible to guess. Private keys and public keys are linked, when you create a new private key (basically picking a very large random number) you use that private key to create a public key.

Public keys are safe to be shared, private keys are not. The way you can create a safely sharable public key from a private key is a little complex. But, a simple way to think about it is:

Quick Public Key Cryptography Example

Say you have a private key that is equal to 1234. If you then go to a clock, starting at 12 and move the hour hand one place until you’ve moved it 1234 times, you will end up with a number between 1 and 12. You could share that number without revealing your private key. But you could also easily prove that your private key matches the public key. That’s the basic idea. If you want to know more look up The Discreet Log Problem here’s a really good short video about it: Public Key Cryptography.

So, public keys are generated from a private key. And, if you have a private key, you can prove that you have it for a certain public key.

Why does this matter? Because Bitcoin addresses are public keys.

“Receiving” Bitcoin

Let’s start from the beginning again. Say you download a Bitcoin wallet onto your phone. You open it up and it will create a private key for you. It will probably ask you to write down your seed words, which are a representation of your private key. You then want to receive some Bitcoin. So you tap the “Receive” button and it gives you an address. It would look something like this: bc1q3xqmxcx823h9a40g48z8ptpl2c2jh509er0zmp.

That string of letters and numbers is your private key’s public key. Plus some hashing (Learn more about that here).

Now, your friend copies that address into their Bitcoin wallet and sends you 0.001 Bitcoin. You see it show up in your wallet (eventually).

What happened here? How did the Bitcoin move from their wallet to yours? Well, they didn’t. The ledger of all transactions ever (aka “The Blockchain”) was updated.

Where is this Ledger?

In Bitcoin, there is no central authority, no central database or server. It is a Distributed System. You may have heard of a Bitcoin Node, or a Bitcoin Miner, there are at least 10s of thousands of them across the world running at any given time. What are they doing? They are keeping track of the ledger of every transaction ever made on Bitcoin, going all the way back to 2009.

When you run a Bitcoin node, you can easily do this on your home computer, you will have a full copy of the entire history of Bitcon transactions. This is another rabbit-hole we wont go down right now. Basically, every Bitcoin node, including the Bitcoin wallet on your phone has the full transaction history of all Bitcoin transactions ever.

Why does this matter? When your friend “sent” you some Bitcoin, what they actually did was tell all the Bitcoin nodes in the world to add a transaction where I am sending my Bitcoin to the address: bc1q3xqmxcx823h9a40g48z8ptpl2c2jh509er0zmp, your address.

Then your phone noticed the ledger was updated and that one of the transactions that was added referred to your address. So, it added that amount to the display of your balance in your wallet.

In short, Bitcoins don’t move, transactions happen and the ledger gets updated. Everyone has a copy of this ledger so you know when Bitcoin has been sent to you.

Are the Bitcoin Mine?

All that happened in the last section was the Bitcoin list of transactions was updated with one that matched your public key. But, does that mean you own them?

Remember that your public key is created from your private key. You can prove that you have the private key for a certain public key. So, what’s really happening is someone made a transaction and now anyone with the private key matching this public key: bc1q3xqmxcx823h9a40g48z8ptpl2c2jh509er0zmp can spend this Bitcoin.

So, you don’t really “own” them, they never really “moved”, but as long as you have the private key, your the only one that can spend them.

Conclusion

Bitcoin is complicated, at least at the beginning. Wallets aren’t really wallets. Bitcoins aren’t really sent. It’s all about who has the private key matching the address the Bitcoin were sent to. If you lose that key, the Bitcoin are gone.

I hope that was useful for understanding a little more about how Bitcoin works. If you have any questions or want to discuss anything else Bitcoin related, check out the Bitcoin Buddy Forum or email me at joel@bitcoinbuddy.co.