Skip to content
uencoder

KMAC

KMAC is a Keccak-based message authentication code defined in NIST SP 800-185 — a sponge-native replacement for HMAC that needs no nested double hashing.

Purpose

Provides a standardized MAC based on SHA-3, more efficient than HMAC-SHA3 (single sponge pass) with arbitrary-length output support.

Mechanism

cSHAKE128/256 absorbs key K as the first block followed by message M, outputting L bytes. KMAC(K, M, L, S) = cSHAKE(M, L, "KMAC", S, K_prefix). No nested double pass as in HMAC.

Use cases

  • SHA-3 message authentication
  • Standardized MAC
  • Efficient sponge MAC

Related tools

References