Skip to content
uencoder

Rainbow Table

A rainbow table is a precomputed table improved by Martin Hellman for inverting hash functions, trading space for time in a time-space trade-off to crack password hashes.

Purpose

Massively reduces storage via precomputed hash chains, efficiently cracking unsalted password hashes under a time-space trade-off.

Mechanism

Precomputes hash chains: repeatedly hash-and-reduce from a start point to an end point, storing only endpoints. To look up, repeatedly reduce-and-hash from the target hash to match an endpoint, then rebuild the chain from the start point to find the preimage. Salt forces an independent rainbow table per user, making precomputation infeasible.

Use cases

  • Cracking unsalted LM/NTLM hashes
  • Password hash security education
  • Ophcrack tool
  • Security audits

Examples

  • Input
    MD5 without salt
    Output
    8-character alphabetic password cracked in seconds

    Salt defeats rainbow tables

Common errors

Storing password hashes without salt
Unique per-user salt + slow hash

Related terms

Related tools

References