A hash is an output calculated from data using a cryptographic function. In blockchain systems, hashes are often used as references or commitments to particular data.
From data to a hash value
A hash function takes an input and produces an output of a defined form. When the input changes, the resulting hash value changes too. Bitcoin and Ethereum use hashes in several parts of their respective data structures.
How blockchains use hashes
Bitcoin documentation explains that transaction hashes are organised into a Merkle root, which is placed in the block header. Bitcoin also links blocks through the previous block header’s hash.
Ethereum documentation describes cryptographic roots for state and other data structures. A change to the relevant state data produces a different state-root hash.
What a hash is not
A hash is not a universal proof that information is true, accurate or owned by a particular person. It is a value calculated under a specified process. What a network does with that value depends on its own rules.
It is also too broad to say that hashes make data “impossible to change”. A more precise statement is that changing committed data changes the relevant hash value, allowing a protocol’s validation rules to detect a mismatch.
Sources
- Bitcoin Developer Documentation: Block Chain
- Bitcoin Developer Documentation: Block Chain Reference
- Ethereum.org: Blocks
Continue with the crypto explainers hub, browse the crypto glossary, or read a related explainer: related topic.