Is it a good idea to do some kind of non destructive post processing (reordering) on hash strings before storing then? Ex:
$hash = strrev(hash($algo, $data . $salt));
Other example:
$hash = hash($algo, $data . $salt)
$hash = strrev(substr($hash, 0, (int) ($length / 2))) . strrev(substr($hash, (int) ($length / 2)));
Instead of simply:
$hash = hash($algo, $data . $salt);
In other words:
Considering the breaker will not know how the hashes were transformed, will first two examples result in less breakable hashes than third example?
I'm NOT saying I will strrev
my hashes, this is just the most simple example I could think of to illustrate what "non destructive" means in this context: to post process the hash without reduce algorithm's key space.
Answers I'm NOT looking for:
- Dude, use a salt to avoid raimbow table blah blah - Rainbow table is related though
- Just rehash your hash like this
hash(hash(hash($data)))
- Question is not about rehashing - Please please please do not roll your own crypto - That's not what I'm talking about
- DON'T RUN YOUR OWN CRYPTO. - This won't help either
Answer I'm actually looking for:
This is (is not) a good idea because of ...reasons... Here is some example about why you should (should not) do this: ...example... Also, read this ...paper, article, post, link to a research... that proves my point.