Checksum family

SpookyHash

Bob Jenkins's 128-bit non-cryptographic hash for 64-bit machines

unverified 1 variant

Overview

SpookyHash is a non-cryptographic hash function by Bob Jenkins, released in 2011. It produces a 128-bit hash and is designed for speed on 64-bit processors with long inputs. It provides no security against a deliberate attacker.

SpookyHash keeps twelve 64-bit state variables and consumes input in 96-byte blocks, mixing each block in with additions, XORs and rotations. Short inputs use a separate, faster routine with four state variables. The 128-bit result can be truncated to 64 or 32 bits. It favours long inputs. It is fast on x86-64.

NextSSL includes SpookyHash wired from source and not yet verified against the reference implementation. SpookyHash version 1 and version 2 produce different results for some inputs. None of this provides security: the function has no secret key, and anyone can compute or deliberately collide its outputs. Record the version used.

History

2011–2011
  1. SpookyHash published by Bob Jenkins

Security notes

SpookyHash is not cryptographic and makes no claim of resistance to deliberately constructed collisions. Use it only on trusted data.

Typical uses

Hash tables and checksums for large trusted dataDeduplication

Variants in NextSSL

1
AlgorithmTierSizes (bytes)StandardsAPI
Spookyhash
spookyhash
unverified out 16 — root

Frequently asked questions

Which SpookyHash variants does NextSSL include?

NextSSL registers 1 SpookyHash variant: spookyhash.