Blockchain Hashing Explained | Flash Learn Series

Welcome back to Flash Learn!

After introducing you shortly to what blockchain is, 5 key expressions, we will be exploring the technical components of the unique blockchain technology. Our first stop on the road is blockchain hashing!

Let’s dive in!

The magic of the blockchain lies in recording data, and linking it to a chain, making the individual transactions linked and unchangeable within the chain. The cornerstone of this technology is hashing.

 

Blockchain hashing:

 

Hashing takes any data of arbitrary size and transforms it to a data of fixed size via a mathematical algorithm. For example, on the Bitcoin chain transactions go through a hashing algorithm (SHA-256) which gives an output of fixed length- 256 bits. If the data is smaller, the hashing algorithm packs it to reach the desired length, and if it is longer it cuts it down to this size.

Blockchain uses cryptographic hash functions, which have 4 properties that make them secure to use:

  1. Same input = same hash value: it is not possible to make 2 different hashes from the same input, neither to have the same hash from 2 different inputs
  2. Changing the input changes the hash itself
  3. Quick to produce a hash for any message
  4. Can not determine input based on the hash value: as in asymmetrically encrypted messages above, you can not determine the original message from the encrypted format without the key

With hashing, you can verify the authenticity of a data- if the data you have makes a certain hash, and another data provides a different hash the 2 are not the same. If the hash is the same, the data is the same.

Hashes in blockchain represent the current state of the chain. Each block is connected with the hash of the previous block. As the hash represents all the block connected before, it includes by connection the whole chain.

Blockchain hashing

Blockchain hashing

The hashes are connected in a data structure called Merkle-tree.

Merkle trees are created by making pairs of hashes repeatedly, until there is only one hash left. They are made from bottom up from the hashes of individual transactions, or leafs.

The Merkle root is the one hash summarizing all of the data, at the top of the tree, and contains all of the hashes under it. The individual branches can be downloaded, but if modified the whole Merkle tree and root changes.

Merkle trees provide an efficient way to verify data, prove the validity and require little memory and computational power. Merkle trees help to prove that all previous transactions from the blockchain are recorded, and the shared ledger is complete, unchanged, and in chronological order.

Image courtesy of Wikipedia

With hashing technology we can understand, how is blockchain technology able to:

  • Mash a lot of information in a smaller form
  • Connect one data to another
  • Provide security with storing information in hash format instead of the original

For some more mathematical background on hashing, we recommend to check out this explanation from our colleagues at Blockgeeks.

This is only one of the components of the magic behind blockchain! Stay tuned for next week’s Flash Learn on public key cryptography!

Share the knowledge on this amazing new technology with your friends, colleagues, kids, neighbors, twitter followers, facebook friends, your dentist, lawyer, cellmates and more!

Don’t forget to follow BlockchainFlashNews for more info from the crypto world on your preferred media, and ask any questions in the comment section!

Comments (No)

Leave a Reply