← Back to section · Education & Knowledge Base

Hash and Randomness Terminology: Collision Resistance, Random Oracles, and Entropy

Hashing is not encryption, a checksum is not a cryptographic hash, and a random oracle is not a function that actually exists. This article works through the hash-and-randomness term group: the three resistance properties, digests and fingerprints, key derivation, salt and nonces, plus entropy and cryptographically secure pseudorandom generators.

Published 22 November 2026 · 5 min read · PQ Frontier

Hash and Randomness Terminology: Collision Resistance, Random Oracles, and Entropy
AI-generated site artwork
Video explainer · Cryptography Terminology: a hash tree from leaves to root

Hashing and randomness are the pair of foundational notions that appear most often in cryptography — and the pair whose terminology is borrowed most carelessly. Download pages call checksums hashes, marketing copy calls any data-scrambling operation encryption, and papers suddenly invoke a “random oracle” that does not exist in reality. This article separates the two threads: the hash thread covers the three resistance properties and derivation; the randomness thread covers entropy, salt, and generators.

Hashing is not encryption: fixing the basic boundary

A cryptographic hash function maps an input of arbitrary length to a fixed-length output, called a digest or hash value, colloquially also a fingerprint. It has three basic traits: it is keyless (anyone can compute it), one-way (recovering an input from an output is infeasible), and deterministic (the same input always gives the same output).

The boundary against encryption must be fixed firmly: encryption is a keyed, reversible transformation, and decryption restores the plaintext; a hash has no key and is one-way by design, and a digest does not “contain” any extractable part of the input. Calling a hash encryption breeds false expectations such as “the hash can be decrypted”. A second neighbour is the checksum, including cyclic redundancy checks (CRC): these also map data to a short value, but their design goal is only to detect accidental transmission errors, not deliberate construction — an attacker can easily produce substitute data with the same checksum. So “there is a hash value to compare” does not imply “tampering is prevented”; it depends on whether the function is a cryptographic hash.

Three resistances: three different security goals

A hash function’s security is not a single word like “irreversible” but three separately discussable goals:

  • Preimage resistance: given a digest, one cannot find any input that hashes to it. This is the formal content of “one-wayness”.
  • Second-preimage resistance: given one specific input, one cannot find a different input with the same digest. This is the property that stops “swap the content of an already-signed file” attacks.
  • Collision resistance: one cannot find any pair of distinct inputs with the same digest. Here the attacker may choose both inputs freely, which gives more freedom, so collision resistance is typically the hardest of the three to achieve and the most demanding on output length.

Confusion among the three is common in reporting: when a collision is found for some hash, it is often written up as “broken, originals can be recovered”, although collisions and preimages are entirely different matters. Conversely, once a function loses collision resistance (the fate of MD5 and SHA-1), it must retire from uses that need collision resistance (signatures, certificates), while legacy uses that rely only on preimage resistance present a different risk picture. Before judging impact, establish which resistance was actually broken.

The random oracle: why a nonexistent function appears everywhere

The random oracle is an idealized model used in security proofs: an imagined public black box that returns a perfectly random, consistent output for every fresh input. A real hash function is of course not a random oracle — it is a short, public, deterministic program. Proofs introduce the model to handle, mathematically, the fact that hash outputs “look random”. This gives two model names: a scheme proven secure in the random oracle model must, in practice, be instantiated by replacing the oracle with a concrete hash function, a step the proof does not cover; a proof in the standard model relies on no such idealized assumption — more solid, but often harder to obtain or less efficient.

When a paper marks ROM versus standard model, it is stating the strength of the assumptions behind the proof, not a performance parameter of the scheme. Reading “provable in the random oracle model” as “proven absolutely secure” is the most common over-interpretation in this term group.

Derivation, salt, and random numbers: using randomness correctly

A key derivation function (KDF) derives one or more keys from source material such as a shared secret or a password. The slow derivation functions dedicated to passwords (password hashing) deliberately make computation expensive to raise the cost of brute-force guessing — note that “hashing” here means one-way processing; storing passwords under a plain fast hash is precisely the common mistake, not a shortcut around it.

Salt is a public random value fed into derivation together with an input such as a password, generated fresh per record. Its job is to make the same password produce different outputs in different records, so an attacker cannot batch-compare against one precomputed rainbow table. The key correction: salt is not a secret, and storing it in plaintext next to the digest does not diminish its function. The similar notion that genuinely needs secrecy is pepper: a site-wide secret value not stored with the database. Managing salt as if it were a secret misreads an anti-precomputation mechanism as a second key.

Randomness terms come in three layers. Entropy measures how much unpredictability there is, in bits, sourced from physical processes or system events. A true random number generator draws randomness from a physical entropy source, while a cryptographically secure pseudorandom number generator (CSPRNG) expands a small truly random seed into a large volume of unpredictable output through a deterministic algorithm. What systems actually consume for cryptography is CSPRNG output, whose security depends on sufficient seed entropy and a sound algorithm. Finally, a nonce is a number that only needs to be unique under a given key (number used once): it may be entirely predictable, even a counter, as long as it never repeats. An initialization vector (IV) has requirements that vary by mode of operation — some modes demand unpredictability. Treating every nonce as a random number conflates two different requirements, uniqueness and unpredictability, and muddles protocol analysis.

Closing

The self-check method for this group: when discussing a hash, first ask which resistance is meant and whether the function is cryptographic; when discussing a proof, check whether the assumption is the random oracle model or the standard model; when discussing randomness, separate entropy, seed, and output, and establish whether the scenario actually needs uniqueness or unpredictability.

Tags: hash functionsrandom oraclekey derivationterminology