FNV
FNV (Fowler-Noll-Vo) is a simple non-cryptographic hash that computes quickly via XOR and multiplication by a prime, used for hash tables and fingerprinting.
Purpose
Provides an extremely low-overhead non-cryptographic hash, suited to hash table key distribution and fast fingerprinting.
Mechanism
FNV-1: hash = (hash × FNV_prime) ⊕ byte; FNV-1a: hash = (hash ⊕ byte) × FNV_prime. The offset basis and prime depend on the word width (e.g. FNV-1a 32-bit uses 2166136261 and 16777619). Non-cryptographic, not collision resistant.
Use cases
- Hash table key distribution
- Fast deduplication fingerprints
- URL routing hashes
- Non-security checksums
Examples
- Input
helloOutput0x4f9f2cabFNV-1a 32-bit
Common errors
- Using FNV for cryptographic authentication
- FNV is not cryptographic; use HMAC-SHA256
Related terms
MurmurHash
MurmurHash is a non-cryptographic hash designed by Austin Appleby, achieving good distribution and high speed through multiply-and-rotate operations. GLOSSARY
xxHash
xxHash is an extremely fast non-cryptographic hash designed by Yann Collet, approaching memory bandwidth limits on modern CPUs, used with LZ4/Zstd compression. GLOSSARY
CRC32
CRC32 is a 32-bit cyclic redundancy check based on polynomial division over GF(2), used to detect transmission errors — not a cryptographic hash. GLOSSARY