Tuesday 31 July 2018

A Brief Guide to Cryptographic Hash Functions

Hash functions are one of the most important things in blockchain technology. It helps in securing the data stored in the blockchains. The property immutability is all depended on hashing (hash functioning).

Today we are discussing cryptographic hash functions. Consider this article as a basic guide. Continue reading to know more.



What is Hashing?

It is the transformation of an input string of characters into a usually shorter fixed-length value or key that represents the original string. Talking about cryptocurrencies like bitcoin, the transactions are denoted as input and run through a hashing algorithm that provides an output of a fixed length. Bitcoin usually uses SHA-256 (Secure Hashing Algorithm 256). 


In the case of SHA 256, the length of the inputs doesn’t matter as the output is fixed in 256 bits length. So, instead of recollecting the input data, you have to remember the hash and keep track.

Properties of cryptographic hash functions

1. Deterministic: You will get the same result every time for any particular input processed through hash functions.

2. Fast Computation: The hash functions must quickly make the keys for the inputs. For an efficient process, the hashing must be fast too.

3. Pre-Image Resistance: According to Wikipedia, “In cryptography, a preimage attack on cryptographic hash functions tries to find a message that has a specific hash value. A cryptographic hash function should resist attacks on its preimage.

In the context of the attack, there are two types of preimage resistance:

Preimage resistance: for essentially all pre-specified outputs, it is computationally infeasible to find any input that hashes to that output, i.e., given y, it is difficult to find an x such that
h(x) = y.
Second-preimage resistance: it is computationally infeasible to find any second input which has the same output as that of a specified input, i.e., given x, it is difficult to find a second preimage x′ ≠ x such that h(x) = h(x′).”

4. The Avalanche Effect: The small changes in the input are reflected as huge in the hash.

5. Collision Resistant: For two different inputs, most parts of hash be unique.

Having a basic idea about the cryptographic hash functions will let you understand the amount of time and calculations are required to make every code work. Constant innovation is going on, so, newer algorithms may come along in the future to the help the blockchain technology development. Till then, we have to study more to understand the processes.

We offer an A-Z solution to the ICO and bitcoin struggle. if you need any assistance regarding blockchain app development and want to know about the whole launch process.


No comments:

Post a Comment