Blockchain Basics
What is Blockchain?
A lot has been written on Blockchain, and we are all constantly hearing how it’s going to disrupt and revolutionize the [Fill in the Blank] industry, but when I talk to customers and colleagues alike, nobody seems to really understand how it works. Sure we’ve all heard the distributed ledger description, but there seems to be a lot of confusion on what that means.
Blockchain is very simply a series of transactions that are linked together in a linear fashion. Each block in the Blockchain is encrypted and the encryption of the previous block affects the encryption of each subsequent block. Each block is then distributed to every participant in the Blockchain peer network.
Let’s break that down by starting with encryption, and I know encryption can be intimidating for the uninitiated so we’ll make it simple.
Encryption is when we use some kind of formula to hide or obscure the real meaning or value of a string of characters. Just like the Little Orphan Annie Secret Decoder Ring from A Christmas Story that told Ralphie to drink his Ovaltine. One of the simplest forms of encryption is a substitution cipher. A substitution cipher sounds really nerdy, but it’s what some of us used to pass notes in class: A=1, B=2, C=3, D=4, E=5, F=6, G=7, H=8, I=9, J=10, K=11, L=12, M=13, N=14, O=15, P=16, Q=17, R=18, S=19, T=20, U=21, V=22, W=23, X=24, Y=25, Z=26.
See if you can decrypt this: 25,15,21 1,18,5 19,13,1,18,20
Good you decrypted it! See I told you you’re smart :)
In the example, our starting point was “A=1”, but “A“ can really equal anything… “21”, “42”, “1,999,205”. As long as we know what “A” equals, our code will still work because we know that the next 25 letters will follow in numerical order. Now obviously enterprise grade encryption is much more complex, but we’ve got the basics down.
So what does this have to do with Blockchain? We already know that Blockchain is a series of transaction blocks that are encrypted and arranged in a linear fashion. The next part to understand is that the encryption of a block depends on the information from the preceding block.
We’ve already learned how to encode and decode using our A=1 formula, so now let’s add a step: We’re going to add up the numerical values of all the letters inside our block, and that value will become the starting value for A in the next block (for the technical folks this is our nonce value).
In this case 19+5+5 = 29 so for Block number 2, our code will be A=29, B=30, C=31 etc. Using that pattern we’re going to encode 3 blocks.
Based on our example, what is the starting position of A for Block 4?
If you said A=596, you win!
Great, now what?
The real value of Blockchain as a system of record is that it can’t be changed; there’s no way to change a block without changing the whole Blockchain. In our previous example, we saw that each block depends on the previous block, so what happens if we change a block? Consider the following example: Our Blockchain currently has 3 blocks “See” “Spot” “Run”, now let’s put on our hacker hat and change that middle block from “Spot” to “Jane”.
The first two blocks are fine, but it breaks the third block, because A does not equal 182 anymore; after our change, the third block starts with A=142. So to successfully change it from Spot to Jane, not only do we have to change block 2, but also every single block after block 2 all the way to the end. Like this:
We’ve now seen how the Blockchain is encrypted and how each block is dependent on the others, but what if a really thorough hacker changes every block in the Blockchain?
The real key to Blockchain is that it doesn’t live in one place. Servers go down, data gets corrupted, natural disasters occur, that’s why we all write and test BC/DR plans, because it’s not a question of if, but when.
That’s where redundancy comes into play: every participant in the Blockchain receives a copy of the Blockchain itself, and as transactions occur, they are published out to all the Blockchain participants. Now that everyone has a complete copy of the Blockchain, it doesn’t matter if a disaster wipes out one of the participants because the all the other participants can refresh the information to the participant who went down. The only way to take it down the Blockchain is to take down every participant at once.
Lets go back to the original question, “What if a really thorough hacker changes every block in the Blockchain?”. The same way we refresh a participant from the group in the event of a disaster is the same way we can protect against a really thorough hack.
Consider the following: we have two participants in a transaction Node 1 and Node 2. A team of super-secret hackers compromised Node 2. Once a difference is detected, Node 1 can confirm the correct information with Nodes 3 and 4. Once Node 2 is identified as corrupt, it can be refreshed with correct information from the other nodes. So, just like in the case of a natural disaster, the only way to corrupt the Blockchain is to corrupt every participant at once.
You may be thinking, “Well, that’s cool. Thanks for the explanation, but so what? Isn’t Blockchain just a Bitcoin or financial thing?”.
The beauty of Blockchain, and one of the reasons there is so much hype around it, is that you can put anything in a block: financial data, medical records, contract redlines, anything. Blockchain likely won’t replace databases as we know them, but in any application where you need to track a chain of custody, or have a system of record, Blockchain will have an impact. Tracking compliance documentation for international trade, country of origin tax information, conflict minerals or RoHS compliance, farm to consumer for recall safety, and even tax returns and driver’s licenses could all benefit from Blockchain.
I’ve left out a lot of details here, but hopefully this explanation has helped you understand the technology a little better, and makes you sound a little smarter in your next meeting or networking event. It’s exciting to see how this new technology is developing and I hope you have as much fun as I do watching emerging technologies unfold around us every day!