Skip to main content

KMAC, cSHAKE & TupleHash Generator

API reference

Compute KMAC128/256, KMACXOF, cSHAKE128/256, TupleHash and SHAKE128 (NIST SP 800-185) of text or hex bytes with a custom key, customization string and output length.

Input

TupleHash hashes each line as a separate tuple element, so ab|cd and a|bcd give different results.

UTF-8 text. Ignored by SHAKE128. With cSHAKE, empty S and N give plain SHAKE.

Reserved by NIST for standardized names; leave empty unless a spec tells you otherwise.

1–1024 bytes. 32 bytes = 256 bits.

Output

Was this helpful?

More ways to use this tool

REST API

curl -X POST https://api.iotools.cloud/v1/tool/kmac-cshake-tuplehash-generator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "algorithm": "kmac128",
    "inputText": "00010203",
    "key": "404142434445464748494A4B4C4D4E4F5051525354555657…",
    "inputFormat": "hex",
    "customization": "",
    "functionName": "",
    "outputLength": "32",
    "outputFormat": "hex"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `kmac-cshake-tuplehash-generator` tool (KMAC, cSHAKE & TupleHash Generator) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Embed widget

<iframe
  src="https://iotools.cloud/embed/kmac-cshake-tuplehash-generator/"
  width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
  title="KMAC, cSHAKE & TupleHash Generator — iotools.cloud"
  sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
  allow="clipboard-write"
  style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>

Drop this into your own page — free, no key required, just a link back.

Cost per API/MCP callFrom 5 credits
Need more credits?View pricing

Also available with

Guides

Compute KMAC128/256, KMACXOF, cSHAKE128/256, TupleHash and SHAKE128 in your browser. Type text or paste hex bytes, set a key, customization string and output length, and copy the result as hex or base64. Nothing you enter leaves your device.

What are these functions?

They are the SHA-3 derived functions from NIST SP 800-185, all built on the Keccak sponge:

  • cSHAKE is SHAKE with a function name (N) and a customization string (S), so the same message hashes differently per application.
  • KMAC is a keyed message authentication code built on cSHAKE. The XOF variants let the output length vary without changing the first bytes.
  • TupleHash hashes an ordered list of strings unambiguously, so ab, cd and a, bcd never collide.

How to use

  1. Pick a function.
  2. Enter the message (one element per line for TupleHash) and, for KMAC, the key.
  3. Choose whether message and key are text or hex, then set the customization string and output length.
  4. Copy the digest.

Can I check NIST test vectors?

Yes. Switch the input format to hex and paste the sample bytes. The "Try an example" buttons are the official KMAC128 and cSHAKE128 samples.

kmaccshaketuplehashkmacxofshake128sha3keccaksp 800-185machashxofcryptography

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.