It’s a little complicated. And it should be – it’s cryptography. Every requested transaction is packaged into a block with a timestamp, and broadcast to every machine on the network, the nodes, to be verified. Once it is, the transaction goes through, the block is added to the chain, and all nodes are updated with the new longer chain. This blockchain is essentially a list of transactions.
To verify a transaction, the blockchain must be checked to ensure sufficient coins have been added to your account to cover the output. These are then not considered valid for future transactions. Coins are kept in a wallet application, protected by cryptographic keys – one public, one private. Your transaction is encrypted using your private key and the recipient’s public one, to ensure only they receive it, and they know it’s from you.
Before a block can be added to the chain, each must contain the answer to a complicated maths problem, created using a one-way cryptographic hash function, which essentially turns input into a mass of tangled data. To unlock this requires the network to guess a number which, combined with the previous block, gives the correct answer. Thus, each block is cryptographically locked to the previous one.
These puzzles take considerable power to unlock. To reward those who go through the hard work, successful solutions receive Bitcoins. Each block can contain multiple transactions, limited by the block size: currently 1MB, with typically 1,700 transactions for a Bitcoin. The difficulty level is periodically recalculated, to ensure that security is maintained, and that each block takes about ten minutes to process. Every four years, the block reward is halved.
Security is tight. Nodes only accept the longest verified chain, and any erroneous block quickly disappears. To force the system to accept a modified transaction would involve taking on the combined mathematical power of all the nodes. Blockchain technology isn’t limited to cryptocurrencies; coins can represent anything, such as shares, copyright registrations, digital identities, contracts, votes, or anything else you want to keep on a secure verifiable ledger. Or the tokens can be the data itself – distributed secure cloud storage is being worked on.
You are going to hear a lot more about blockchain apps in future, for sure.