What is Hashing?

Last updated: July 29, 2026

Definition

Hashing is a one-way cryptographic function that converts data of any size into a fixed-length string of characters that cannot be reversed to reveal the original input. IT security teams use hashing to store passwords securely, verify file integrity, authenticate digital signatures, and detect data tampering without exposing the underlying content.

Key Facts

  • Also known as: Hash function, message digest, cryptographic hash, checksum
  • Category: Data Security / Cybersecurity
  • Related standards/protocols: MD5 (deprecated), SHA-1 (deprecated), SHA-2 (SHA-256, SHA-512), SHA-3 (Keccak), BLAKE2, Scrypt, Bcrypt
  • Key implementations: Password storage systems, digital signature algorithms, blockchain validation, file integrity verification, SSL/TLS certificate authentication
  • Common algorithms: LANMAN (obsolete, 1980s), NTLM (Windows authentication), Ethash (Ethereum), SHA-256 (Bitcoin, NIST standard)

How Hashing Works

A hash function takes input data of any size and processes it through a mathematical algorithm that produces a fixed-length output string. The function applies bitwise operations, modular arithmetic, and compression steps that scramble the input deterministically. The same input always produces the same hash, but even a single-bit change generates a completely different output.

The algorithm divides input into fixed-size blocks, then processes each block through multiple transformation rounds. SHA-256 uses 64 rounds of operations including logical functions, bitwise rotations, and modular additions. Each round mixes the data with constants and previous outputs, creating an avalanche effect where small input changes cascade through the entire calculation.

For password storage, systems hash the password during account creation and store only the hash value. When a user logs in, the system hashes the entered password and compares it to the stored hash. Matching hashes confirm the password without ever storing or retrieving the original. Salting adds random data to each password before hashing, preventing attackers from using precomputed rainbow tables to crack multiple passwords simultaneously.

Why Hashing Matters

Stolen or compromised credentials accounted for 22% of all data breaches in 2024, making credential-based attacks the most common initial attack vector (Verizon, 2025). Without proper hashing, passwords stored as plaintext become immediately compromised when databases are breached. Attackers use stolen credentials across multiple sites because users reuse passwords, turning a single database breach into widespread account takeover.

Hashing with modern algorithms like SHA-256 and unique salt values makes stolen database dumps worthless to attackers. The computational cost of cracking properly hashed passwords makes bulk attacks infeasible. Organizations implementing strong hashing within their cybersecurity frameworks reduce their exposure to credential stuffing attacks. This protection is critical when credential stuffing attacks account for 19% of all daily authentication attempts and reach 25% for enterprise-sized companies.

File integrity verification through hashing catches unauthorized modifications immediately. Any change to a file produces a different hash, allowing security teams to detect tampering, validate software downloads, and verify backup integrity without accessing the original content.

Hashing vs. Encryption

AspectHashingEncryption
Primary functionOne-way transformation for integrityTwo-way transformation for confidentiality
ReversibilityIrreversible, no decryption possibleReversible with decryption key
Used byAuthentication, digital signatures, blockchainData protection, secure communications
Key differenceNo key requiredRequires encryption/decryption keys
When to usePassword storage, file integrityProtecting data that needs retrieval

The key difference is reversibility. Hashing creates a one-way fingerprint for verifying data integrity, while encryption protects data confidentiality through reversible scrambling using keys.

Common Misconceptions

Hashing is not the same as encryption. While both use mathematical algorithms to transform data, hashing cannot be reversed to reveal the original input, whereas encryption is specifically designed to be reversed using a decryption key.

Hashing does not make data "uncrackable" with older algorithms, particularly in environments like healthcare IT security where regulatory compliance demands current standards. MD5 and SHA-1 have known collision vulnerabilities where different inputs produce identical hashes, making them unsuitable for password storage or security-critical applications despite still being used for basic checksums.

Frequently Asked Questions