Jun 4, 2020 • 5M

Episode 5 - Hashing

Open in playerListen on);

Appears in this episode

Gautam Dhameja
Block Shots provides a basic understanding of the most important blockchain concepts in five minutes. Learn about blocks, transactions, consensus, finality, governance, etc. and many more fundamentals while having your morning coffee, commuting, or whenever you’ve got a moment.
Episode details

Hashing is the process of deriving fixed-length strings from arbitrary-length data. It is generally used to represent data in a more compact and consistent format. For example, a small string like the name of a person and a large file like their resume could both be represented by two different strings of the same length by hashing them (individually) using the same hash function.

Hash Functions

Hashing is done using programs called hash functions. There are several hash functions based on different algorithms. The main characteristics of good hash functions are:

  1. Deterministic — It should generate the same hash from a particular input on any system or hardware.

  2. Irreversible — The hashing process could not be reversed to get the input back.

  3. Fixed-length output — The outputs from a hash function are of the same length irrespective of the length of the input.

  4. Collision-free — The same hash must not be produced for two different inputs.

Hashing Usage In Blockchain

In the context of blockchains, hashing is used in several places. Some of these are:

  1. The cryptographic signing of transactions and blocks. Hashing is generally part of all signing algorithms. All transactions in a blockchain are signed by users and all blocks are signed by their respective miner or producer nodes.

  2. Representation of transactions and blocks using their hashes. In a blockchain, the transactions and blocks are generally represented using their hashes.

  3. Merkle trees used for storage — all non-leaf nodes are hashes of their children. The storage root hash changes even if there is a slight change or update in any of the data stored in the blockchain.

Music: https://www.purple-planet.com