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

Taught in

References