Warning. Cryptographic hash functions are not appropriate for hash tables

[comp1110-4Q]

Cryptographic hash functions are correct hash functions, and they do satisfy our desiderata. However, they are a poor choice for a hash table for two reasons:

  1. They are much slower to compute than a simple purpose-built hash, for no benefit in this setting. The resistance to inversion that makes them cryptographically useful is irrelevant when you are building a lookup table.
  2. Avalanche and one-wayness do not guarantee good distribution for real-world key distributions. A purpose-built hash function can be tuned for the structure of likely inputs.
bars magnifying-glass caret-down plus minus arrow-right xmark