Jenkins lookup3
Bob Jenkins's 2006 hash-table hash, used in the Linux kernel and many C libraries
Overview
lookup3 is a non-cryptographic hash function by Bob Jenkins, published in 2006 as a successor to his lookup2. It has been used in the Linux kernel, PostgreSQL and many hash-table implementations. It provides no security against a deliberate attacker.
lookup3 processes input in 12-byte blocks, adding three 32-bit words into three state variables and applying a mix function of subtractions, XORs and rotations. A final function avalanches the state. Variants return one 32-bit hash or two independent 32-bit hashes from one pass. Its output can be seeded. It is fast on 32-bit machines.
NextSSL includes jenkins-lookup3 wired from source and not yet verified. Bob Jenkins's earlier one-at-a-time and lookup2 hashes are related but produce different values. None of this provides security: the function has no secret key, and anyone can compute or deliberately collide its outputs. Stored values must match the variant. It needs no seed.
History
2006–2006Jenkins lookup3 published by Bob Jenkins
Security notes
lookup3 is not cryptographic and is vulnerable to deliberately constructed collisions. Use it only on trusted inputs.
Typical uses
Variants in NextSSL
1| Algorithm | Tier | Sizes (bytes) | Standards | API |
|---|---|---|---|---|
| Jenkins-Lookup3 jenkins-lookup3 |
unverified | out 4 | — | root |
Frequently asked questions
Which Jenkins lookup3 variants does NextSSL include?
NextSSL registers 1 Jenkins lookup3 variant: jenkins-lookup3.