KMAC128 Hash Generator
Upload File Upload a file to calculate its KMAC128 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 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
- 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.
- 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).
- Customization String (Optional): Enter any string to customize the hash function. This is useful for domain separation.
- Output Length (bits): Specify the desired length of the output hash in bits (must be a multiple of 8). The default is 256 bits.
- 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.