Definition
Hashing converts input data into a digest according to a defined algorithm. A cryptographic hash function is designed so that finding an input for a chosen digest, or finding distinct inputs with the same digest, is computationally difficult. These are security goals under stated assumptions, not a claim that collisions are mathematically impossible. Common fixed-output algorithms produce the same digest length regardless of the input’s size.
How It Works
Blockchains use hashing in structures such as block identifiers, transaction identifiers, and Merkle trees, although the exact serialization and algorithm differ by protocol. A small change in the encoded input normally produces a very different digest. Recomputing a digest can help detect a changed file or message when the expected value comes from a trusted source. Hashing is not encryption: there is no ordinary decryption key that restores the original input.
Key Considerations
A digest alone does not prove who created data or whether its contents are true. Short or predictable inputs can be guessed and checked, so hashing personal information does not automatically anonymize it. Password storage requires dedicated password-hashing or key-derivation designs and appropriate salts, rather than relying on a fast general-purpose hash alone. When comparing blockchain hashes, use the correct network, algorithm, and byte encoding. A matching digest is meaningful only within those conventions and the security assumptions of the function.