Skip to main content
Definition Website Computer and Technology

Cryptographic Hash Function

Subject: Computer and Technology noun /ˌkrɪp.təˈɡræf.ɪk ˈhæʃ ˌfʌŋk.ʃən/ 1 definition

  1. Definition (noun)

    Entry #25 · Updated

    A Cryptographic Hash Function is a deterministic mathematical algorithm that transforms input data of arbitrary length into a fixed-size bit string known as a message digest or hash value. Unlike non-cryptographic hashes designed solely for fast lookup in hash tables, it enforces preimage resistance (preventing reversal from digest to input), second-preimage resistance, and collision resistance, while exhibiting an avalanche effect where flipping a single input bit unpredictably changes the output. Because the transformation is strictly one-way rather than reversible encryption, cryptographic hash functions serve as foundational primitives for data integrity verification, digital signatures, message authentication, and secure credential storage.

    Common Types

    • Merkle–Damgård Hash Functions: Process padded message blocks sequentially through a one-way compression function, a classical construction underlying the widely deployed SHA-2 family (such as SHA-256) alongside deprecated algorithms like MD5 and SHA-1.

    • Sponge-Based Hash Functions: Absorb input blocks into an internal state via a public permutation and squeeze out digests of configurable length, forming the foundation of the SHA-3 (Keccak) standard and extendable-output functions.

    • Keyed Hash Functions: Combine a secret cryptographic key with an underlying hash algorithm—most commonly as a Hash-based Message Authentication Code (HMAC)—to verify both message integrity and sender authenticity.

    • Password Hashing Functions: Deliberately introduce tunable computational work and memory hardness—as implemented in Argon2, scrypt, and bcrypt—alongside unique random salts to resist brute-force and hardware cracking attacks.

    Example

    Before distributing a 4.2 GB Linux installer ISO, a release pipeline computes its 256-bit SHA-256 digest and publishes the resulting 64-character hexadecimal checksum in a signed SHA256SUMS file. After downloading the image, an administrator runs sha256sum locally; if even a single bit was altered by network corruption or mirror tampering, the computed digest changes unpredictably and fails to match the published checksum.