upvote
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.

reply
Salting completely defeats rainbow tables.

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

reply
Yeah, no one uses rainbow tables anymore, except for some legacy Windows protocols which either lack the salt or you can control the salt (NTLMv1 for example).
reply
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.

reply
> Unless they're talking keeping the salt secret until they want to make the revelation and only providing it at that time, which isn't exactly a salt IMO.

Why not? You're still salting the input to the hash and cheating hash( salt + secret ) by manipulating the salt after editing the secret is equivalent to brute forcing a hash collision.

I suppose you could call it a key instead of a salt in this context but the way you feed it into the function is the same as a salt. That said, there are also keyed hash functions out there if you prefer that for some reason.

reply
Sorry for being unclear, in my mental model from the way salts are used with passwords is the salts aren't a secret (you might not share them, but you don't need to protect them like a secret in a system design).

So talking about the person who original created the hash to prove knowledge of the title, if they published the resulting hash and the salt (it's not a secret) the same problem would exist with brute forcing guesses. Now if that person kept the salt secret and only released it later, I stop thinking salt and think key's and more in the territory of an HMAC, which is what you're getting at with calling it a key.

So you're right, it depends on what people were actually thinking when referring to it as a salt, whether it would be kept secret or not, and in this case the secret nature released later.

reply
I suppose they were indeed suggesting to retain the salt until disclosure. That is precisely what a salt is (additional input to the hash function), just not used as when storing passwords, since you're protecting the secret against a different scenario (bruteforce)
reply
I suppose that's fair, I had in my mental model that a salt isn't a secret, which is where I diverged a bit in addition to additional input to the hash function, but that may be limited to the use of salts with storing passwords, which is where my mental model comes from.
reply
> It made me think about the old school days of using rainbow tables (...) For anyone not familiar, before per-entry salts were common, a rainbow table was just a (...)

I suddenly felt old...

reply