Bitcoin 103 (101 part 3): wallets, keys and addresses

Monday 13 June 2016

Once you understand the blockchain, it’s much easier to grasp what’s going on with a bitcoin wallet.

This '101' series aims to explain bitcoin starting from first principles. As a quick recap, bitcoin offers the ability to transfer money directly between two people over the internet, just as if they were using physical cash. No middleman like a bank is required, thanks to the nature of the blockchain. This is a complete ledger of who owns what: a record of the funds in every address, owned and maintained by a network of many thousands of computers around the world.

Spending coins

When you spend bitcoins - that is, move them from one address to another - you have to prove you own them first. Each address is controlled by a ‘private key’, which is essentially a very long number. (The address is a unique string of characters derived from the key.) If you have the key, it is a simple matter to show that you have the right to move the coins. If not, it is practically impossible. This is a little like putting a letter through someone’s front door: it is simple to post a letter into a house, but afterwards only the person with the key to the door has access to the letter.

Moving bitcoins from one address to another is a process of showing that you really do own them (using your private key), and then recording that ownership has changed on the blockchain. Thus anyone who has a complete and up-to-date copy of the blockchain can see every transaction that has ever been made, and the current balance of every address.

Wallet and keys

A bitcoin wallet may contain many keys, each with their own associated address

Keys and wallets

A bitcoin wallet is a piece of software that enables you to send and receive bitcoins. It includes a collection private keys, which give you access to the bitcoins in each associated address. A wallet may just be a single address, but there is no limit to the number of addresses you can have in one wallet. It is straightforward to create new addresses by creating new private keys and adding them to your wallet.

The wallet takes care of creating transactions from the private keys. You specify which address you would like to spend from, where the money is going (another bitcoin address), and how much you want to send.

You can also specify the transaction fee - the small amount of money that is generally required as a reward given to the computers that maintain the network and process your transaction. Lastly, you can also state where you want any unspent funds in the sending address to go - that is, back to the same address or into a different one. These last two may be dealt with automatically by default by many wallets. Your wallet software communicates all of this information to the network of computers that maintain the blockchain, and they update the shared ledger with the new information.

The way bitcoin works means it is extremely important to keep your private keys safe, because if you lose them then you also lose the ability to access the bitcoins in that address, and anyone who has the private key can move your bitcoins to another address to which you do not have the key.


comments powered by Disqus