Friday, March 22, 2013

Bitcoin addresses - an analogy

I've had a few tries at explaining Bitcoin addresses to various people with different levels of mathematical skill. This is the best analogy I've been able to come up with:

Imagine a huge warehouse with row upon row up row of glass fronted lockers. Each locker has a number on it - that's the public Bitcoin address of the locker. And you can walk through the warehouse and look inside any locker, but can't open a specific locker unless you have a key. However, each locker has a mailing slot in the shape of a Bitcoin, so you can drop Bitcoins into any locker you like, but you can't get them out again.

In total there are 1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976 lockers. That's a lot of lockers. For comparison, there are only 7,500,000,000,000,000,000 grains of sand on all the beaches on earth. So obviously such a warehouse can't exist in the real world. But it can in a virtual reality or a computer.

We can now wander about the warehouse, and if someone says on their web page that they've got a Bitcoin address you can go and have a look in their locker and see if they have any Bitcoins in it, or even if they once had some coins but don't any more (lockers show a full history of how they've been used). And if you had some Bitcoins you could drop them in any locker you liked (but you wouldn't be able to get them back!).

Now, how do you get your own locker that you can open? Each locker has a security code that needs to be used to open it. The security code is a 77 digit number, something between 1 and about 11,579,208,923,731,619,542,357,098,500,869,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000. You're never going to guess the security code for a given locker. However - there is a special calculator which, if you key in a random security code, will give you the Bitcoin address of a locker that it will open. So you pick a random number, key it in to the calculator, get an address, go to that locker, and hey presto - the random number you picked opens it. And if there were any Bitcoins in there you'd be able to take them out. But chances are there won't be - the vast majority of lockers are empty, and always will be.

And if you keep the random security code (also called a private key) secret, then no one else will be able to open your locker - just you.

And that's a visualisation of how Bitcoin uses ECDSA for storing the value of Bitcoin.



No comments:

Post a Comment