Transcript for:
Understanding Hashing in Blockchain Technology

What is hashing and what does it do? Hashing is the process of converting an input of any length into a fixed size string of text using a mathematical function. This means that any text, no matter how long it is, can be converted into an array of numbers and letters through an algorithm. The message to be hashed is called input. The algorithm used to do so is called a hash function, and the output is called hash value. There are many formulas that can be used to hash a message, but a cryptographic hash function needs to have some qualities to be considered useful. Each hash value, or output, has to be unique. This means that it should be impossible to produce the same hash value entering different inputs, and therefore the same message should always produce the same hash value. The hashing speed is also an important factor. A hash function should be quick to produce a hash value. Finally, a hash function needs to be secure. It is extremely difficult, if not impossible, to determine the input based on the hash value, while a slightest change to an input should generate a hugely different hash. In blockchain, hashes are used to represent the current state of a blockchain and to ensure its immutability. Every transaction contains certain bits of information, such as the amount being sent, the sending and receiving addresses, the timestamp, and so on. All of this information is combined into the formula to produce a hash called Transaction ID. The Transaction ID is a hash value that can be used to identify and confirm that a transaction has happened. The first block in a blockchain, known as a Genesis block, contains transactions that, when combined, produce a unique hash. When the second block is created, the hash of the Genesis block is added to all of the new transactions in the new block. This combination is used to create its respective hash. This process is repeated with all the new blocks being added to a blockchain, always taking previous hashes to generate the newer ones, creating an unbreakable dependency. This way, each block links back to its previous block through its hash, forming a chain back to the Genesis block. which makes blockchain a secure, immutable and transparent network.