HighwayHash

From HandWiki

HighwayHash is a fast keyed hash/pseudorandom function developed by Jyrki Alakuijala and Jan Wassenberg. The stated design goals are high-throughput mixing and low-cost finalization. An open-source (Apache 2 license) reference implementation was published in March 2016.

Overview

HighwayHash computes 64, 128 or 256-bit digests of variable-length inputs, using a 256-bit seed/key. It processes 32 bytes at a time using AVX-2 SIMD instructions. For 1 KiB blocks, the reported[1] throughput is 0.24 cycles per byte. This is more than 10 times as fast as cryptographic hashes in the ECRYPT hash benchmark.[2]

HighwayHash is not claimed to be a cryptographic hash, but the authors have undertaken preliminary cryptanalysis[3] and claim resistance against differential, length-extension and rotational attacks.

The mixing multiplies 32-bit halves of the input with internal state, yielding a 64-bit result which is permuted and added to the state. The finalization involves four mixing rounds for 64-bit digests. For 128-bit digests, finalization uses six mixing rounds. And for 256-bit digests, finalization uses ten mixing rounds.

Applications

Suggested applications of HighwayHash include:

  • pseudorandom number generation, e.g. to assign items to bins for A/B tests
  • replacing larger data with hash 'fingerprints'
  • authenticating short-lived messages such as RPCs
  • data structures resistant to hash-flooding attacks.

Naming

The name HighwayHash is similar to other hashes developed within Google: CityHash and FarmHash.

See also

References

External links