Rainbow Table Attacks
Pre-Computed Destruction
A rainbow table is a massive, pre-computed lookup database that maps hash outputs back to their original plaintext inputs. Instead of brute-forcing a hash in real-time, an attacker simply looks up the stolen hash in their pre-built table and instantly retrieves the password. Building the table takes enormous time and storage upfront, but once built, millions of passwords can be cracked in seconds.
The original concept of time-memory tradeoff tables was proposed by Martin Hellman in 1980. Philippe Oechslin refined the technique in 2003 by introducing 'rainbow' chains using multiple reduction functions, dramatically reducing table size while maintaining lookup speed. A single rainbow table for 8-character alphanumeric passwords hashed with MD5 can be stored in approximately 500 GB and can crack any matching hash in under 10 seconds.
The absolute, bulletproof defense against rainbow tables is salting. When a unique random salt is prepended to the password before hashing, the attacker must build an entirely separate rainbow table for each unique salt. If every user has a distinct 128-bit salt, the attacker faces 2128 possible tables per user, making the pre-computation strategy physically impossible to execute.
Everyday Example
Imagine a thief who spends months photographing every single lock in a city and recording which key opens each one, storing it all in a massive binder. When the thief encounters a new lock, they simply flip through the binder and find the matching photo instantly. That binder is a rainbow table. Salting is equivalent to every locksmith adding a completely random, unique modification to their lock. The thief's binder becomes completely useless because no two locks look the same anymore.
The Deep Mathematics
A rainbow chain of length t uses t distinct reduction functions R1 through Rt to alternate between hash space and password space. The table stores only the chain endpoints, reducing storage by a factor of t at the cost of O(t²) lookup time. For a password space of size N, a table with m chains of length t covers approximately m × t passwords. The optimal tradeoff occurs when m × t ≈ N, yielding storage of O(N/t) and lookup time of O(t²). Salting inflates the effective password space from N to N × 2s (where s is the salt length in bits), making pre-computation infeasible.
Discover how giovium protects your data
giovium leverages these very cryptographic principles to keep your passwords, files, and secrets completely safe. Try it for free on any platform.
Download giovium