Hashing is useful for checking that an input matches expectations without giving away the stored expected version - so confirming passwords etc.

But are there other use cases? In general, cryptographic storage so data is retrievable seems to be the norm.


Data integrity is another usage. For example, when you want to send/download data, you want to make sure that the data is not modified or transmitted/downloaded correctly. To achieve this the data hashed and the hash value sent/downloaded on another channel. One may see examples of this file verification on Linux ISO download pages. Of course, hashing is not enough to protect you against some attacks. Therefore you need digital signatures.

Another one, when digitally signing the document, we first hash the document then sign the hash value. This is more efficient than signing the whole document.

Keyed-Hash Message Authentication Code (HMAC) is a message authentication code (MAC) that involves a Cryptographic hash function and a Cryptographic key.

Key Derivation Functions are also using hash functions to derive a key from your password plus various random sources.

Key Stretching: making a possibly weak password more robust against brute-force attacks. PNKDF2, bcrypt, Argon2 use key stretching.

Ratcheting: forward key chaining with no backward availability.

A special case of hash usage is the Merkle-Tree to verify the integrity of data with low bandwidth.

In Blockchains: hashes are a fundamental part of the blockchains.

Proof-of-work systems:

A Proof-of-Work (PoW) system (or protocol, or function) is an economic measure to deter denial of service attacks and other service abuses such as spam on a network by requiring some work from the service requester, usually meaning processing time by a computer.

Bitcoin mining and Hashcash use Proof-of-work systems.

Constructing Stream Ciphers as in ChaCha2 in TLS 1.3. This construction uses CTR mode of operation.

Public Key Cryptography: Trapdoor one-way functions are easy to compute hard to invert without special information. Most of the public key cryptosystems are based on Trapdoor one-way functions.

Commitment schemes allow committing a value while keeping others hidden and give the ability to reveal at a later time.

Lamport signature or Lamport one-time signature scheme can use one-way functions in which usually cryptographic hash functions are preferred.

Secure Random Number Generators such as Hash_DRBG use hash functions to improve and stretch the output from a true random number generator

