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

It depends on the application of the hash table, but malicious agents could 'attack' code by purposefully creating collisions if the author isn't careful. An algorithm expected to run in O(1) that runs at O(n) could be catastrophic.


But the solution to that problem (using a cryptographic hash function randomized with a secret) doesn't change the complexity of the algorithm.


I'm just pointing out that the worst case time complexity is an issue that can't always be cast aside. Aren't cryptographic hash functions generally slower?




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

Search: