KMAC128 File Hash

Calculate a variable-length KMAC128 authentication code for a local file or URL using a secret key and customization string. Read more

What is KMAC128?

KMAC128 is a keyed message authentication code standardized in NIST SP 800-185. It authenticates raw file bytes using a secret key, a requested output length, and an optional public customization string. It is based on cSHAKE128, but cSHAKE128 File Hash itself is unkeyed.

How to use this file hash calculator

Choose a local file or URL, enter the Key using the intended encoding, set the output length, and match any protocol-defined Customization value. Local files and the key are processed in your browser without upload. Remote file access requires CORS permission from the server.

Result example

A file containing exactly abc, with UTF-8 key key, UTF-8 customization custom, and a 256-bit output, produces e02a38621d03e5d7befa13b5863f836623d8256fe7a6a8e717613acc7e3f4662 in Hex. Filename and metadata are not authenticated.

Important limitations

KMAC does not hide file contents. Authentication is meaningful only if the key is strong and remains secret; publishing the key turns the result into a reproducible value that anyone can forge. Production verification should compare tags in constant time.

Frequently asked questions

Why does my result differ from another tool?

Check the raw file bytes, key bytes, customization, output length, and every selected encoding. KMAC128 is not the same function as KMACXOF128.

Can I use the result to verify a download?

Yes, when the verifier already has the shared secret key and exact parameters. For encoded text messages, use the KMAC128 calculator.

Input
File
Drag and drop the file here or click to select a file. It will process locally and won't be uploaded.
Output
Settings
Key
Customization