What is the Bitcoin blockchain?
Bitcoin, and its fundamental technology blockchain, have been popping up in the news plenty over the past few years. However, discussion about them is typically a bit high level — or, OK, gibberish — leaving the average person with the vague impression that something cool is happening with currency, but very little in the way of actual knowledge or understanding.
The technology is indeed elegant, but it is not that difficult to understand. We’ll take a shot at explaining in a straightforward way how blockchain works, avoiding geeky jargon as much as possible.
Just two tech concepts…
Anyone can generate a digital name and digital signature. Those aren’t like your typed name and handwritten signature; they are a public key and a private key, respectively. Having these digital assets enables the following scenario:
- A person can write messages, sign them digitally, and publish online.
- The world can see that the message is genuine — people can identify the person’s digital name thanks to the digital signature.
- No one can forge a signed message.
- A person may generate numerous name-and-signature pairs (think of them as stage names) for various purposes.
What is All this Business about #Bitcoin? #onlinethreats
— Kaspersky Lab (@kaspersky)
How hashing works
Let’s say I write a message (“Hello”) and want to send it to my friend. But I need to make sure it reaches the intended recipient unaltered. How would I do that? The easiest way would be to ask my friend to send the whole message back to me so I can compare the two messages and see if they match. Many people use the same approach when dictating some numbers or spelling e-mail addresses over the phone.
However, the message might reach my friend perfectly but “break” on its way back, and in that case we would not be able to ensure its integrity. Moreover, the message might be very long. What if the message contains a high-def video? It makes no sense to send back all those gigabytes of data just to verify they were received properly, and that’s why another approach is used to ensure message fidelity. It’s called hashing.
Let’s create a numeric representation of “Hello.” Here’s one way to do that:
Let each letter be associated with a sequential number (i.e., a=1, b=2, z=26), so Hello would read 8 5 12 12 15.
Multiply the numbers to get 86400. That’s how we get the simplest hash.
After I have sent a primary message to my friend, I send the hash so that they can check whether the received message matches the intended one.
Now, what if the message was altered on its way, and now it reads “Hallo”? Well, that would change its hash: 8*1*12*0. My friend would expect to get 86400, so when they get 17280, the difference would alert us both that something went wrong.
We should note here that the hash itself could be altered or otherwise compromised. It does not serve to protect the integrity of the message (a signature does that); it is used to simplify and speed up the process of integrity checking. Also, in actual use, people do not encode their hashes and send them to their friends as separate messages; their computers handle the entire process in a way that is invisible to the users.
That simple hash method would not catch swapped letters in the message — it was just an example. In the real world, we use much more complex algorithms.
For “Hallo, ” the hash would look like this:
Not much in common, is there? Well, that’s how it was meant to be — it’s a code.
Enabling virtual money
OK, that’s the hard part done. So, what cool things can we do with these technologies?
Imagine there are 30 kids in a classroom, and they would like to use their own play money, which should be entirely virtual (i.e., mere numbers written on paper or stored on the Internet).
To do this, the kids write the values of their initial cash possessions on the chalkboard, and then write down how much money each of them gave to another person. They write down each “transaction” in their genuine handwriting and sign it with a signature, so no one can mess with transactions while everyone is out during the break. This approach works perfectly until a teacher comes and wipes it all off the board, claiming control over the cash flows because he or she has power and, say, wants to prevent children from using the system for buying drugs from each other.