# Parallelhash compute

`parallelhash-compute` · version 1.0.0 · Hashing & signatures · free, no key needed

Compute fixed-output ParallelHash128 or ParallelHash256 with an explicit bounded block size.

**Use when you need to: parallelhash-compute · compute nist parallelhash · compute fixed-output parallelhash128 or parallelhash256 with an explicit bounded block size..**

## Decide before calling

Read the [versioned contract](/v1/tools/parallelhash-compute/versions/1.0.0) and the supported scope below. Reuse `parallelhash-compute@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `parallelhash-compute@1.0.0` for parallelhash-compute. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- parallelhash-compute
- compute nist parallelhash
- compute fixed-output parallelhash128 or parallelhash256 with an explicit bounded block size.
- compute ParallelHash128
- calculate customized ParallelHash256
- produce nist sp 800 185 parallelhash-compute bytes

## Not supported

- KMAC or any keyed operation
- implicit algorithm detection
- streaming across calls

## Behavior

- All lengths passed to left_encode, right_encode, and encode_string are bit lengths where SP 800-185 requires bits.
- customization is UTF-8 text and defaults to the empty string; byte data supports utf8, canonical hex, or canonical padded base64.
- Outputs are lowercase hexadecimal and algorithm selection is explicit; keyed KMAC is unsupported.

## Input

- `data` (string, required): max length 262144
- `encoding` (one of "utf8", "hex", "base64", optional): default `"utf8"`
- `security` (one of 128, 256, required)
- `block_size` (integer, required): min 1; max 8192
- `output_bytes` (integer, required): min 1; max 1024
- `customization` (string, optional): max length 65536; default `""`

## Output

- `algorithm` (one of "ParallelHash128", "ParallelHash256", required)
- `input_bytes` (integer, required): min 0
- `output_bytes` (integer, required): min 1; max 1024
- `hex` (string, required): pattern `^[0-9a-f]+$`
- `standard` (constant "NIST SP 800-185 (December 2016)", required)
- `reference` (constant "Section 7", required)

## Limits

- max input bytes: 65536
- max output bytes: 1024
- max block size: 8192

## Example

Request input:

```json
{
  "data": "000102030405060710111213141516172021222324252627",
  "encoding": "hex",
  "security": 128,
  "block_size": 8,
  "output_bytes": 32
}
```

Response:

```json
{
  "result": {
    "algorithm": "ParallelHash128",
    "input_bytes": 24,
    "output_bytes": 32,
    "hex": "ba8dc1d1d979331d3f813603c67f72609ab5e44b94a0b8f9af46514454a2b4f5",
    "standard": "NIST SP 800-185 (December 2016)",
    "reference": "Section 7"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "parallelhash-compute",
  "version": "1.0.0",
  "input": {
    "data": "000102030405060710111213141516172021222324252627",
    "encoding": "hex",
    "security": 128,
    "block_size": 8,
    "output_bytes": 32
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/parallelhash-compute/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"data":"000102030405060710111213141516172021222324252627","encoding":"hex","security":128,"block_size":8,"output_bytes":32}'
```

The machine-readable contract is at [/v1/tools/parallelhash-compute/versions/1.0.0](/v1/tools/parallelhash-compute/versions/1.0.0).

### CLI

```sh
node cli.mjs run parallelhash-compute 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Tuplehash compute](/tools/tuplehash-compute): Compute fixed-output TupleHash128 or TupleHash256 over an ordered tuple of byte strings.
- [Tuplehash xof compute](/tools/tuplehash-xof-compute): Compute TupleHashXOF128 or TupleHashXOF256 with right_encode(0) XOF framing.
- [Xxh3 128 compute](/tools/xxh3-128-compute): Compute the bit-exact XXH3 128-bit hash with a uint64 seed or public 192-byte custom secret.
- [Xxh3 64 compute](/tools/xxh3-64-compute): Compute the bit-exact XXH3 64-bit hash with a uint64 seed or public 192-byte custom secret.
- [Adler-32 window roll](/tools/adler32-window-roll): Roll an Adler-32 state forward by replacing one byte in a fixed-size window.
- [Crc catalog compute](/tools/crc-catalog-compute): Compute a pinned RevEng CRC of hex bytes, including crossed-endian CRC-12/UMTS.
