KMAC128 Hash Generator

What is KMAC128?

KMAC128 (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). KMAC128 offers a 128-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 KMAC128 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.