XXH3
Yann Collet's extremely fast non-cryptographic hash family: XXH32, XXH64, XXH3 and XXH128
About XXH3
XXH3 is one of 4 xxHash variants in the NextSSL registry, a checksum / non-cryptographic hash. It produces an 8-byte (64-bit) output. Its registry entry cites xxHash (Yann Collet), NON-cryptographic. NextSSL lists it in the standard tier and exposes it through the safe API.
Overview
xxHash is a family of non-cryptographic hash functions by Yann Collet, designed to run at memory-bandwidth speed. It is used in compression formats such as Zstandard and LZ4, databases and build systems for checksums and hash tables. It provides no security against a deliberate attacker.
XXH32 and XXH64 process input in stripes using four parallel accumulators updated with multiplication by large primes, rotation and addition, then merge and avalanche the accumulators. XXH3, introduced in 2019, uses a different design built for SIMD: it multiplies 32-bit halves of input XORed with a secret table to 64-bit products and accumulates them, with special fast paths for short inputs. XXH128 is the 128-bit variant of XXH3.
NextSSL includes XXH32, XXH64, XXH3 (64-bit) and XXH128. All pass the SMHasher quality tests, and XXH3 accepts a seed or custom secret. XXH3 and XXH128 are the recommended variants for new code. None of this provides security: the function has no secret key, and anyone can compute or deliberately collide its outputs.
History
2012–2019xxHash released by Yann Collet
XXH3 and XXH128 introduced
Security notes
xxHash is explicitly non-cryptographic. Collisions and multi-collisions can be constructed deliberately, so it must not be used for authentication, signatures or protecting hash tables from adversarial input unless combined with additional defences.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| out | 8 | Output |
Use it
from nextssl_demo import NextSSL
ns = NextSSL() # safe API: safe and standard tiers
value = ns.call("checksum", "xxh3", None, b"123456789")[0]
nextssl_checksum("xxh3", NULL, data, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_checksum_in(reg::all(), Policy::Safe, "xxh3", &Params::new())?;
let value = alg.checksum(b"123456789")?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Other xxHash variants
3More checksums and non-cryptographic hashes
All 130Frequently asked questions
What is XXH3?
XXH3 is a checksum in the xxHash family. xxHash is a family of non-cryptographic hash functions by Yann Collet, designed to run at memory-bandwidth speed.
What are the XXH3 sizes?
In NextSSL, XXH3 uses: output 8 bytes.
Who designed XXH3 and when?
XXH3 belongs to the xxHash family, first published in 2012 by Yann Collet. Its origin: xxHash specification.
Which standards define XXH3?
XXH3 is referenced by xxHash (Yann Collet), NON-cryptographic.
Is XXH3 safe to use?
XXH3 is in the standard tier. Standardised and sound. Reachable from the safe API. It can be called from the safe API.
What other xxHash variants are there?
NextSSL also registers xxh128, xxhash32, xxhash64 in the xxHash family.
Related families
Google's fast non-cryptographic string hash, optimised for short strings on x86-64
MurmurHash3Austin Appleby's widely used multiply-rotate hash for hash tables
wyhashWang Yi's compact, very fast hash based on 64x64-to-128-bit multiplication
BLAKE3A Merkle-tree hash over BLAKE2s rounds, designed for parallel speed and unlimited output
BLAKE3A Merkle-tree hash over BLAKE2s rounds, designed for parallel speed and unlimited output
SipHashA short-input keyed PRF designed to protect hash tables from flooding attacks