Checksums and non-cryptographic hashes

XXH128

Yann Collet's extremely fast non-cryptographic hash family: XXH32, XXH64, XXH3 and XXH128

unverified Root API only Not cryptographic
Unverified tier.

Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.

About XXH128

XXH128 is one of 4 xxHash variants in the NextSSL registry, a checksum / non-cryptographic hash. It produces a 16-byte (128-bit) output. Its registry entry cites xxHash (Yann Collet), NON-cryptographic. It is also known as xxh3-128. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).

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–2019
  1. xxHash released by Yann Collet

  2. 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

Fast data checksums in compression formatsHash tables and deduplicationBuild-system caching

Sizes

FieldBytesMeaning
out16Output

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'unverified' is reachable from the root API only
value = root.call("checksum", "xxh128", None, b"123456789")[0]

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Other xxHash variants

3

Frequently asked questions

What is XXH128?

XXH128 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. It is also known as xxh3-128.

What are the XXH128 sizes?

In NextSSL, XXH128 uses: output 16 bytes.

Who designed XXH128 and when?

XXH128 belongs to the xxHash family, first published in 2012 by Yann Collet. Its origin: xxHash specification.

Which standards define XXH128?

XXH128 is referenced by xxHash (Yann Collet), NON-cryptographic.

Is XXH128 safe to use?

XXH128 is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).

What other xxHash variants are there?

NextSSL also registers xxh3, xxhash32, xxhash64 in the xxHash family.