logoalt Hacker News

mr_mitm • today at 7:41 PM • 2 replies • view on HN

Many don't realize that a rainbow table is actually quite a sophisticated data structure that lets you trade CPU time for storage, and further, lets you choose the degree of that trade-off. There is a reduction function involved, which chains with the hash function, and the length of the chain determines the time it takes to reconstruct a password. When drawn up and colored, it looks like a rainbow. It's not a naive mapping, otherwise it would be called a hash table.

All implementations of rainbow table generators that I've seen (which aren't many, tbh) also assume that the password space consists of all combinations of a given alphabet, so your approach would require a very non trivial reduction function.


Replies

nly • today at 7:56 PM

Salting completely defeats rainbow tables.

And key stretching algorithms (and more modern fit for purpose password hashing functions) largely defeat brute force.

➕ show 1 reply
sophacles • today at 10:00 PM

Thats true, but only relevant under 2 conditions:

1. during computation of the table. The end result that is stored is just a lookup table of input, output.

2. when the input is longer than the block size of of the hash, otherwise there is no chaining to take advantage of. For all the SHA functions the block size is >= 64 bytes - so for passwords of size 8, it is literally just computing a hash table with every input.