Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> You shouldn't be using a KDF that takes significantly longer when the password gets bigger.

Your KDF necessarily takes longer when the password gets longer as it's a hash function and thus O(n).

For typical password sizes (typically under 64 bytes), you're below the hash's blocksize so the effect is nil and you can treat it as a constant but it will start coming into play as the size of the key and thus the number of blocks to feed into the hash increases.



A KDF is not a hash function, and I said "significantly" for a reason.

If adding a megabyte of input causes the original megabyte to get hashed or otherwise processed once, then you pass the test.

If adding a megabyte of input causes the original megabyte to get fed into your algorithm 100000 times, then you fail the test.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: