18/05/2017

Dialogic Blockchain Series #1

You might not expect it, but the fundamental building block of a blockchain closely resembles something we all possess: a fingerprint. Digital fingerprints ensure that no single party can take control of a blockchain. But how does that work exactly? Time for some mathematics...

The text on this page was automatically translated and hence may differ from the original. No rights can be derived from this translation.

How does a blockchain work? Part 1: fingerprint

A fingerprint is unique. If you have a person's fingerprint, you can easily verify if this fingerprint belongs to a specific individual. If you only have a fingerprint, it is practically impossible to identify the person without first comparing the fingerprint to those of all individuals (without a previously collected list of fingerprints). From a mathematical perspective, you can determine the fingerprint of a piece of information as well.

Hash

This digital fingerprint, also known as a hash, forms the basis of a blockchain. To understand why digital fingerprints are essential, it is crucial to comprehend how they function.

Anyone can determine the digital fingerprint of a piece of information by calculating a (complex) mathematical equation. The length of the information does not matter (similar to how people's fingerprints are not dependent on their height!). If you have the information and the fingerprint, you can easily confirm if they match.

In Bitcoin, a blockchain for financial transactions, the so-called 'SHA-256' hash method is used. You can calculate the SHA-256 fingerprint of a piece of text yourself, for example here. The hash of the text "Tommy" is, for instance:

5bee7cef227fe327178bd04bb7cc75ba9a36f1b8867ba1025430761a226539e9.

Now, let's change the uppercase to a lowercase letter: what is the hash of "tommy"?

044f4b3501cd8e8131d40c057893f4fdff66bf4032ecae159e0c892a28cf6c8e

Even though only one letter is different, the fingerprint is completely different! Not surprising: your fingerprint and that of your siblings, even if you look very alike, would also be completely different.

If I only provide you with the hash "044f4b..", the only way to determine which text it corresponds to is by trying out all possible texts. After a lot of attempts, you would eventually find out that the fingerprint corresponds to the text "tommy". This is why mathematicians refer to the fingerprint method as one-way: calculating the fingerprint of information is easy, but finding the information from a fingerprint is nearly impossible.

Proof of work

The randomness of the hashes allows for an interesting application. As seen above, the characters in the fingerprint are highly random. Mathematically, the likelihood of a fingerprint for a specific piece of text starting with a '0' is 1 in 16. If I ask you to find a piece of text with a hash starting with a '0', you would need to try approximately sixteen texts on average (and possibly more if you're unlucky!). If I were to request a hash starting with two zeroes, it would require an average of 16 x 16 = 256 attempts; since if the first number is '0', there is only a 1/16th chance that the second number is also zero.

The number of zeroes a hash begins with indicates the number of texts you (on average) had to try before arriving at this hash. This hash can thus be used as a form of 'proof of work'. If you show me a text with a hash starting with two zeroes, I know that you have had to calculate approximately 256 hashes.

Now back to the blockchain: what do we gain from these fingerprints? In the blockchain, only new blocks are accepted when you demonstrate that you have performed a certain amount of computational work. This prevents anyone from casually adding blocks: computational power costs money, and the computations themselves take time. Since it is extremely costly to always have more computational power than other participants, it is practically impossible to gain sole control over a blockchain!

To truly understand how something works, I prefer to completely take it apart and try to put it back together myself.

Do you want to know more about this topic?

Tommy van der Vorst, partner

Meet Tommy

Requesting a proposal

Do you have a specific research question or assignment and would you like to receive a quote from us? Then you can send your question by e-mail to tenderdesk@dialogic.nl. You can also draw our attention to (public) tenders via this address. We will respond within five working days.

Further information