Hash functions

Parallelhash128

An SP 800-185 hash that splits input into blocks so cSHAKE can process them in parallel

standard Safe API Specified in a FIPS standard

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–2016
  1. Specified 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

Hashing very large files on multi-core systemsProtocols already using SP 800-185 functions

Sizes

FieldBytesMeaning
out1 – 1,024Output

Parameters

NameTypeRangeDefaultRequired
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]

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

Other ParallelHash variants

1

Similar names

Looking for something else?

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