Parallelhash128
An SP 800-185 hash that splits input into blocks so cSHAKE can process them in parallel
About Parallelhash128
Parallelhash128 is one of 2 ParallelHash variants in the NextSSL registry, a cryptographic hash function. It produces a 1–1,024-byte output. It takes the parameters block_size (default 8192), custom and out_len (default 32). Its registry entry cites NIST SP 800-185. NextSSL lists it in the standard tier and exposes it through the safe API.
Overview
ParallelHash is a hash function defined by NIST in SP 800-185. It divides long inputs into fixed-size blocks, hashes each block independently with cSHAKE, and combines the results, so multi-core or SIMD hardware can hash large messages faster.
The caller chooses a block size B. Each B-byte block is hashed with cSHAKE128 or cSHAKE256 to an intermediate value of 256 or 512 bits, and these intermediate values are concatenated with length encodings and hashed again with cSHAKE under the function name "ParallelHash". A customisation string allows domain separation, and an XOF variant gives arbitrary-length output.
NextSSL provides ParallelHash128 and ParallelHash256, offering 128-bit and 256-bit security respectively. Because the block size is an input to the computation, the same data hashed with different block sizes gives different results. For short messages ParallelHash offers no speed advantage and is slower than plain cSHAKE because of the extra layer. It is best suited to inputs of many kilobytes or more, where independent blocks can be dispatched to separate cores or SIMD lanes.
History
2016–2016Specified in NIST SP 800-185
Security notes
ParallelHash inherits its security from cSHAKE and Keccak, with no known weaknesses. Users must fix the block size and customisation string as part of the protocol to get reproducible outputs.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| out | 1 – 1,024 | Output |
Parameters
| Name | Type | Range | Default | Required |
|---|---|---|---|---|
| block_size | u64 | 1 – 4294967295 | 8192 | no |
| custom | bytes | 0 – 65536 | — | no |
| out_len | u64 | 1 – 1024 | 32 | no |
Parameters are passed as a string, for example nextssl_mac("hmac", "hash=sha512", …). Omitted parameters take their declared default.
Use it
from nextssl_demo import NextSSL
ns = NextSSL() # safe API: safe and standard tiers
digest = ns.call("hash_with", "parallelhash128", None, b"abc")[0]
nextssl_hash_with("parallelhash128", NULL, data, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let digest = reg::hash_in(reg::all(), Policy::Safe, "parallelhash128", &Params::new(), b"abc")?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Other ParallelHash variants
1Similar names
Looking for something else?More hash functions
All 424Frequently asked questions
What is Parallelhash128?
Parallelhash128 is a hash in the ParallelHash family. ParallelHash is a hash function defined by NIST in SP 800-185.
What are the Parallelhash128 sizes?
In NextSSL, Parallelhash128 uses: output 1 to 1,024 bytes.
Who designed Parallelhash128 and when?
Parallelhash128 belongs to the ParallelHash family, first published in 2016. Its origin: NIST SP 800-185.
Which standards define Parallelhash128?
Parallelhash128 is referenced by NIST SP 800-185. It is specified in a FIPS standard.
Is Parallelhash128 safe to use?
Parallelhash128 is in the standard tier. Standardised and sound. Reachable from the safe API. It can be called from the safe API.
What other ParallelHash variants are there?
NextSSL also registers parallelhash256 in the ParallelHash family.
Related families
The Keccak sponge, standardised by NIST in FIPS 202 as a structural alternative to SHA-2
KMACNIST's Keccak-based MAC from SP 800-185, with optional arbitrary-length output
cSHAKECustomisable SHAKE from SP 800-185, adding function-name and customisation strings
KangarooTwelveA fast tree-hashing XOF over 12-round Keccak, standardised in RFC 9861
SHA-3 and KeccakThe Keccak sponge, standardised by NIST in FIPS 202 as a structural alternative to SHA-2