What are Hash Collisions and how do they affect Blockchain ?

#hash #collision #blockchain

Aditi Korgaonkar Feb 10 2021 · 1 min read
Share this

The Hashing Algorithm

A hashing algorithm's mathematical function converts a string input of any length into an output string of a fixed length. For a specific string, the same output will always be returned by a hash function. If a record returns a different hash after someone gets it back, you know they've changed it. This way, files can be checked. This also makes the blockchain irreversible, such as Bitcoin and many other currencies, as a completely different hash would result from altering any transaction or block. Given the fact that every block has the hash output of the previous block as input, the sequence will be broken and not recognized by the method. This renders the blockchain, safe.

Hence, we may assume that most cryptocurrencies are at the heart of hashing algorithms.

What is Hash Collision?

The word says that one hash output will be returned by two separate inputs. This would mean someone could mess with a file or even a Bitcoin transaction with no one knowing. Any hash algorithm is considered disabled with the occurrence of a collision

Therefore, if a hashing algorithm that is considered corrupt were to be used by cryptocurrencies, this will be a problem since this would theoretically imply that previously mined blocks could now be changed and updated without recognizing the blockchain.

The hash output from previous transactions will be the same and hence the chain will remain intact. Thankfully, most cryptocurrencies use SHA-256, an optimal technique for hashing. This algorithm has a much bigger output size, making it, for instance, much safer than MD5 and SHA-1.


IOTA had developed a hashing algorithm called Curl. A team belonging to the  MIT Media Lab came forward and demonstrated that with the same output hash,  they were able to build multiple payments in the IOTA tangle. Before going public, they told the IOTA-team and some changes to the hashing algorithm were made.

Since these algorithms are the basis of blockchain projects, it is absolutely crucial that these algorithms are reliable and that collisions can almost be impossible to make, as a blockchain application may be lost.

Read next