How Rainbow Tables Work
Rainbow tables are precomputed mappings between hashes and plaintext passwords. Attackers compute hashes for millions of password variations offline. Instead of storing every pair raw (which takes terabytes), rainbow tables use reduction functions to condense chains of hashes:
// Hash Chain Reduction Sequence:
Pβ β H(Pβ) β Rβ(Hβ) β Pβ β H(Pβ) β Rβ(Hβ) β Pβ ... β H(Pβ)
// Only starting plaintext Pβ & final hash Hβ are stored in the table!
O(1) Attack Execution Flow:
- Attacker obtains a database of unsalted password hashes
- Attacker passes the target hash through table lookup index
- If matched in table, chain is recomputed from starting password to reveal plaintext
- Password is cracked instantly without brute-forcing every candidate on the fly