KMAC256 Hash Generator

Generate KMAC256 hash online for any text input or file with a customizable key and output length, based on SHA-3.

Upload File
Upload a file to calculate its KMAC256 hash.
The key used for the KMAC calculation. Leave empty for an unkeyed hash.
An optional string to customize the KMAC function.
Desired output length in bits (multiple of 8). Default is 256.

What is KMAC256?

KMAC256 (Keccak Message Authentication Code) is a cryptographic hash function based on the Keccak algorithm (the foundation of SHA-3). It provides keyed hashing (message authentication) and can also function as a pseudorandom function (PRF). KMAC256 offers a 256-bit security level.

Key Features

  • Keyed Hashing: Uses a secret key to generate the hash, providing message authentication.
  • Customizable Output Length: Unlike fixed-output hashes (e.g., SHA-256), KMAC allows specifying the desired output length.
  • Customization String: An optional public string can be used to define different function variants or domains.
  • Based on Keccak/SHA-3: Built on the modern and secure Keccak sponge construction.
  • Variable Input: Can hash messages of any length, including files.

How to Use This Calculator

  1. Input Data: Either type or paste text into the 'Text Input' field, or upload a file using the 'Upload File' button. File upload takes precedence.
  2. Key (Hex - Optional): Enter a secret key in hexadecimal format. If left empty, the calculation behaves more like an unkeyed hash (though technically KMAC always uses a key, often defaulting to an empty one if not provided).
  3. Customization String (Optional): Enter any string to customize the hash function. This is useful for domain separation.
  4. Output Length (bits): Specify the desired length of the output hash in bits (must be a multiple of 8). The default is 256 bits.
  5. View Results: The calculated KMAC256 hash will appear in Hexadecimal and Base64 formats below. Use the copy buttons for convenience.

Note: The key should be kept secret in real-world applications. This tool is for educational and testing purposes.