Introduction
As you’re probably already aware, the power of Bitcoin boils down to cryptography. Using a system of public and private keys, you can track every users’ finances without revealing his or her identity. Security and privacy: the best of both worlds.
What you might be less familiar with is called hashing, the specific mathematical technique employed. It takes data of any size and converts it to a numerical value of fixed length–the hash. The public keys listed on the Bitcoin blockchain are hashed from private keys, as are the signatures needed to verify transactions in the network.
Bitcoin uses the SHA-256 algorithm, which has the special property that it is practically impossible invert. This means that nobody can find a private key which could produce your signature or public key, nor calculate your private key in reverse. If anyone could, he would use it to send all of your bitcoins to himself.
Planting the Seed
The Bitcoin blockchain also uses hashing in its internal structure. It contains a record of every transaction; your wallet actually calculates your balance using addition and subtraction. The transactions in each block are organized into a structure called a Merkle tree, which is shaped like a bracket tournament (as in the featured graphic).
The tree is upside-down: the transactions at the bottom are referred to as leaves, and their data values are concatenated and hashed together two at a time. If there are an odd number of them, the last one is duplicated, and eventually they all coalesce into a single hash called the Merkle root. These roots link the blockchain together, with each new block containing the top hash of the last.
The most important function of the Merkle root is verification; it can be easily proven whether or not any transaction data was used to form it, meaning you can authenticate any transaction using just the most recent block. Its block header contains the essence of every Bitcoin transaction ever issued, which branch out from its root hash value.
Bitcoin 2.0
But what if we’re sending more than just bitcoins? In addition to the payer, payee, and bitcoin amount, each transaction also contains a section called OP_RETURN. Most people still leave it blank, but it can hold many other types of data.
Using protocols like Counterparty, we can integrate data called smart property, which corresponds to real digitally-controlled items (such as smart cars) or represent abstract assets like stocks. Now that they’ve adopted Ethereum’s Turing-complete language, we should also be able to implement certain smart contracts, such as dividend rules for smart stockholders.
Many of these smart contracts can be automatically implemented and enforced. Once they are included in the Bitcoin blockchain, the top hash can thereafter detect any forgeries. No judge is necessary to say if a contract is valid–instead of signing before a court, you sign to the blockchain, instead.
Transactions are limited in size to prevent rampant blockchain growth, with the OP_RETURN section being 40 bytes as of the time of this writing. This prevents us from storing documents, media, or other large files, but we can store the hashes of them with ease. By comparing, we could later validate any copy supposed to be unaltered.
Factomize Everything
Unfortunately, Bitcoin’s 10-minute block time is too sluggish for most decentralized applications, which must conduct their operations in real time. Moreover, if everyone started using them, our combined transactions would flood the network and render the blockchain too large for most nodes to handle.
Thankfully, Factom has a solution. Using a supplemental peer-to-peer network layered overtop of Bitcoin, it arranges data submitted by these applications into Merkle trees in real time. Once per block, the roots are calculated, combined again, and inserted into the Bitcoin blockchain via a single transaction.
User-submitted data is thereby integrated into the larger Merkle structure, or Factomized, if you will. The Merkle roots on the Entry Layer become Merkle leaves on the Directory Layer, which root in a Bitcoin transaction that stems from a block header that hashes all the way up to the top.
Anything can be Factomized in this fashion, including other blockchains custom tailored to specific applications. Every smart entity on Ethereum, every file location on Storj, every digital object on the Internet of Things will be distilled to one number, with which any forgery of anything ever recorded could be detected.
Regardless of whether people use bitcoins as a currency, people will continue to need Bitcoin; it has the most secure blockchain available, with the most active full nodes and the highest mining difficulty. If a new blockchain supplants it, everything will be Factomized again, and the top root remains the most difficult in the universe to reverse-calculate. It is the greatest arbiter of truth–the ultimate hash value.