Hash function

A hash function is a function that takes an input in a given domain and returns a fixed-size string of bytes , this output is normally called the hash value. It should ideally be:

  • Uniformly distributed over its output,
  • Fast to compute, and
  • Minimize collisions - with .

In security settings it may also be useful to have them be:

  • Non-reversible - it is very hard to compute the inverse, and
  • Randomly distributed - so keys close in the input space are not close in the output space.