KMAC256 File Hash

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

What is KMAC256?

KMAC256 is the general 256-bit-security KMAC variant defined in NIST SP 800-185. It authenticates raw file bytes using a secret key, output length, and optional public customization string. It is based on cSHAKE256, while cSHAKE256 File Hash is an unkeyed function.

How to use this file hash calculator

Choose a local file or URL, enter the secret Key using its actual encoding, set the output length, and match any protocol-defined Customization value. Local file bytes and the key stay in your browser. URL processing requires CORS permission.

Result example

A file containing exactly abc, with UTF-8 key key, customization custom, and a 512-bit output, produces f366dd5aaeaf403b8c2a9ecfcac666a49089124fb1eccc178eeadf86cba8a09ad2ffdc71e8f8da477cfd83be95b0486152439605bc6df939abb31030aafa2582 in Hex.

Important limitations

KMAC does not encrypt the file. Its authentication property depends on keeping a strong key secret; anyone who knows the key can forge a matching tag. Use constant-time comparison when implementing verification in an application.

Frequently asked questions

Why does my result differ from another tool?

Check raw file bytes, key bytes, customization, output length, and selected encodings. KMAC256 is not interchangeable with KMACXOF256.

Can I use the result to verify a download?

Yes, when the verifier already has the shared secret and exact parameters. For encoded text messages, use the KMAC256 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