Tuplehash compute
tuplehash-compute · version 1.0.0 · Hashing & signatures · free, no key needed
Compute fixed-output TupleHash128 or TupleHash256 over an ordered tuple of byte strings.
Use when you need to: tuplehash-compute · compute nist tuplehash · compute fixed-output tuplehash128 or tuplehash256 over an ordered tuple of byte strings..
Decide before calling
Read the versioned contract and the supported scope below. Reuse tuplehash-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 tuplehash-compute@1.0.0 for tuplehash-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
- tuplehash-compute
- compute nist tuplehash
- compute fixed-output tuplehash128 or tuplehash256 over an ordered tuple of byte strings.
- compute TupleHash128
- calculate customized TupleHash256
- produce nist sp 800 185 tuplehash-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
tuples(array of object, required): max items 64security(one of 128, 256, required)output_bytes(integer, required): min 1; max 1024customization(string, optional): max length 65536; default""
Output
algorithm(one of "TupleHash128", "TupleHash256", required)input_bytes(integer, required): min 0output_bytes(integer, required): min 1; max 1024hex(string, required): pattern^[0-9a-f]+$standard(constant "NIST SP 800-185 (December 2016)", required)reference(constant "Section 6", required)
Limits
- max input bytes: 65536
- max output bytes: 1024
- max tuples: 64
Example
Request input:
{
"tuples": [
{
"data": "000102",
"encoding": "hex"
},
{
"data": "101112131415",
"encoding": "hex"
}
],
"security": 128,
"output_bytes": 32
}
Response:
{
"result": {
"algorithm": "TupleHash128",
"input_bytes": 9,
"output_bytes": 32,
"hex": "c5d8786c1afb9b82111ab34b65b2c0048fa64e6d48e263264ce1707d3ffc8ed1",
"standard": "NIST SP 800-185 (December 2016)",
"reference": "Section 6"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "tuplehash-compute",
"version": "1.0.0",
"input": {
"tuples": [
{
"data": "000102",
"encoding": "hex"
},
{
"data": "101112131415",
"encoding": "hex"
}
],
"security": 128,
"output_bytes": 32
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/tuplehash-compute/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"tuples":[{"data":"000102","encoding":"hex"},{"data":"101112131415","encoding":"hex"}],"security":128,"output_bytes":32}'
The machine-readable contract is at /v1/tools/tuplehash-compute/versions/1.0.0.
CLI
node cli.mjs run tuplehash-compute 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Parallelhash compute: Compute fixed-output ParallelHash128 or ParallelHash256 with an explicit bounded block size.
- Tuplehash xof compute: Compute TupleHashXOF128 or TupleHashXOF256 with right_encode(0) XOF framing.
- Adler-32 window roll: Roll an Adler-32 state forward by replacing one byte in a fixed-size window.
- Crc catalog compute: Compute a pinned RevEng CRC of hex bytes, including crossed-endian CRC-12/UMTS.
- Xxh3 128 compute: Compute the bit-exact XXH3 128-bit hash with a uint64 seed or public 192-byte custom secret.
- Xxh3 64 compute: Compute the bit-exact XXH3 64-bit hash with a uint64 seed or public 192-byte custom secret.