KMAC128
Calculate a variable-length KMAC128 message authentication code from text using a secret key and optional customization string. Read more
What is KMAC128?
KMAC128 is a keyed message authentication code based on cSHAKE128 and standardized in NIST SP 800-185. It combines a secret key, message, requested output length, and optional customization string to produce a tag. Unlike cSHAKE128, KMAC is designed to authenticate data with a key; unlike HMAC, it is a native Keccak-based construction rather than an HMAC wrapper around a hash.
How to use this hash calculator
Enter the message and choose its input encoding. Enter the secret Key, select the key’s encoding, set the output length, and add Customization only when the protocol defines one. The customization string is a public domain-separation label, not a second key. All parties must use identical bytes and parameters.
Result example
For example, with UTF-8 message abc, key key, customization custom, and a 256-bit output, KMAC128 is e02a38621d03e5d7befa13b5863f836623d8256fe7a6a8e717613acc7e3f4662 in Hex.
Important limitations
KMAC authenticates data but does not encrypt it. Its security depends on a strong secret key that is generated, stored, and shared safely; a short human password is not automatically a suitable cryptographic key. Do not publish the key alongside the tag. Use a constant-time comparison in production verification code.
Frequently asked questions
Why does my result differ from another tool?
Check the message bytes, secret-key bytes, customization bytes, output length, and the encoding selected for each field. KMAC128 and KMACXOF128 also encode output length differently and are not interchangeable.
Can I use the result to verify data?
Yes, when the verifier independently possesses the same secret key and parameters. To authenticate raw file bytes, use KMAC128 File Hash.