Patterns of Hashing in Blockchain

Blockychain
Coinmonks
3 min readJul 3, 2022

--

Hash Functions can process only one piece of input data at a time and produce an output value called hash value. Hash value consist of digits from 0–9 and alphabets (A-F), So totally hash value consists of 16 bits. These 16 numbers are called the hexadecimal numbers. There are multiple types of hash functions which vary by length of hash value it produces.

Basically, there are five different patterns of hashing techniques:

  1. Independent hashing
  2. Repeated Hashing
  3. Combined hashing
  4. Sequential hashing
  5. Hierarchical hashing

Independent Hashing: The Hash function transforms each input data separately.

Independent hashing

2. Repeated Hashing: The Hash functions transforms input data into a hash value and again this hash value is given as input and produces another output hash value.

New to trading? Try crypto trading bots or copy trading

Repeated Hashing

3. Combined Hashing: It enables us to produce singular hash value for more than one chunk of data. This kind of hashing technique is used when the data size is very small, because it reduces the utilization of more power to generate a hash value. If you have noticed it is similar to repeated hashing (during first hashing), the two hash values obtained as same.

Combined hashing

4. Sequential hashing: Sequential hashing creates an update of a hash value as soon as new data appears using combined and repeated hashing simultaneously. The existing hash value is merged with the newly arrived input data and then hashed to get the updated hash value. This hashing pattern is valuable in case you require a single hash value and wish to track its development back to the appearance of new data.

Sequential hashing

5. Hierarchical Hashing: Hierarchical hashing uses combined hashing to create pairs of hash values which enable the creation of hierarchy. The goal of the pattern of hierarchical hashing is to create a single hash value for a multitude of data chunks in a similar way as combined hashing. Compared to combined hashing, hierarchical hashing has an efficiency advantage as the combined data is formed by hash values which are fixed in size, hence, reducing the required computational power and required time.

Hierarchical Hashing

For better understanding, you can implement these hashing techniques using the below website. It will be fun learning :)

--

--