rainbow table
A huge precomputed lookup table that maps password hashes back to the passwords that produced them, so cracking becomes a quick lookup.
In more detail
An attacker spends the hashing effort once, in advance, for a particular hash function and a range of passwords, then reuses the table against every leaked database that used that function without salt. Rainbow tables use chains of hashes to store this far more compactly than a plain list. A unique random salt for each password defeats them, because the attacker would need a separate table for every salt.
Example
table = {hashlib.sha256(w.encode()).hexdigest(): w for w in wordlist}Related terms
- salt — An extra value mixed into data before hashing so that otherwise identical inputs produce different hashes.
- password cracking — Recovering the actual passwords behind stolen password hashes by guessing candidates, hashing each one and looking for a match.
- password hashing — Storing a password as the output of a deliberately slow, salted hash function, so a stolen database does not reveal the passwords.
- dictionary attack — A password-guessing attack that tries words from a prepared list of likely passwords instead of every possible combination.
Taught in
- Cryptographic Hashing: SHA-256, SHA-3 & Passwords — Cybersecurity Fundamentals, GRC & Cryptography