Posted on 11/13/2018 in Web Development
By Matt Wiseley
As our civilization pushes technology forward at an ever faster pace, we increasingly encounter newsworthy terms that are difficult for most people to understand. It takes time for us to boil down complex science and technologies into simpler ideas that can be understood by a couple of morning show hosts. Consider the microwave. Everyone knows what it is and what it does, but few understand how it really works. Microwave technology is used all over the place, but the word has become synonymous with the household appliance that reheats last night’s dinner.
Blockchain now finds itself in a similar situation. The real world uses of blockchain far exceed Bitcoin. While digital currencies are the most well known applications of blockchain, they don’t explain the hype that has built up around all of the other non-currency applications you may be hearing about.
What blockchain adds to all of these applications, including Bitcoin, is trust. This trust comes in two forms. First, it is a sequence of data records - blocks of information - that can be securely and programmatically validated as a whole. Second, this verifiable sequence of data is distributed on a large, often openly accessible, network of computers. This makes tampering with or destroying the blockchain nearly impossible as it would require simultaneously hacking into every single one of the computers on that network and any backups made along the way.
Before I can explain how blockchain creates trust, we need to look at hash algorithms. A hash algorithm is some computer code that reduces data of variable length down into a fixed length value called a hash. It does this by applying some cryptography to ensure that the resulting fixed length value summarizes the uniqueness - or integrity - of the original value.
MD5 is a hash algorithm often used as a “checksum” for file transfers. Say I’m sending you a 2MB text file and you want to ensure at a glance that the file was correctly transferred and not changed en route. Running this lengthy text file through MD5 might generate a hash value like this: 74FA60D81AD1148344AD42F9671FE336. If even one character of that text file changed, the MD5 result would be very different from the original hash provided along with the file. You can see this happen by entering some text and changing it at https://passwordsgenerator.net/md5-hash-generator/. This same concept is how websites using https:// encrypt and ensure the integrity of data sent to your web browser.
Think of each block in a blockchain as an MD5 hash. MD5 is much too simple and inherently insecure to be used for blockchain but the concept works for the purposes of explanation. The chain in blockchain is a tree structure where each block points back to a parent block. A root block starts the chain and grows from there into a large tree with each block pointing back to a single parent block, all the way back up to the root. And here’s where the trust comes in. Each block in the chain is a hash of it’s own content and it’s parent hash. This means any tampering of data in the blockchain would be immediately apparent to anyone checking the hashes from the modified block down.
Let’s create a simple blockchain using MD5. You can use the link above to create and validate this chain. Take a look at what’s going on in this table:
|Second block in the chain C90893F5E3E994DE74B538B487B5AC16||DFE6B964A6774A9C7B7AE7E71EA91F05|
|Third block in the chain DFE6B964A6774A9C7B7AE7E71EA91F05||84277E8308C57D0BBC8B8B54102BBB93|
Notice how the previous hash is included in the value for each subsequent block. The value in the first column is used to generate that block’s hash. Changing any of the hashes or values associated with them breaks the blockchain validation by resulting in a different MD5 hash. This is what makes blockchain tamper-proof and provides verifiable trust in the data.
Bitcoin and other digital currencies may be the first well known use of blockchain, but the concept can add verifiable trust to any application. Consider how blockchain might be used in applications such as shipping and logistics, commerce and finance, medical records, voting, prescription drug tracking, food sourcing, personal data and identity management, professional references and job history. Once you get the concept, it’s easy to think of applications where data is shared among many actors and needs protection from tampering.
So, is it safe to say you now understand blockchain better than your microwave? It’s a fairly simple concept to grasp, but real world implementations get complicated fast. Just try and buy some Bitcoin or purchase a CryptoKitty and you’ll see what I mean.
Want to implement some of these techniques?
Reach out to us today to speak to one of our experts