4 ms·
I wrote this because the cautionary tale of PBKDF1 led to some really interesting thought experiments. After I wrote this, I received some math corrections fro
by some_furry 6y ago
I wrote this because the cautionary tale of PBKDF1 led to some really interesting thought experiments.
After I wrote this, I received some math corrections from cryptographers, which led me to discover an interesting (but intuitively sensible) observation:
1. There are roughly O(sqrt(N)) cycles.
2. The average cycle length is roughly O(sqrt(N)).
Unless you're supremely unlucky, most of the hashes you generate will fall within a cycle. (That is, of course, assuming that your hash is securely pseudorandom in the first place.)