Information Security

⌘K
  1. Home
  2. Docs
  3. Information Security
  4. Message Authentication an...
  5. Hash-Based MAC (HMAC)

Hash-Based MAC (HMAC)

Hash-Based MAC (HMAC) is a keyed-hash message authentication code that combines a cryptographic hash function with a secret key to provide message integrity and authentication.

Thank you for reading this post, don't forget to subscribe!
  • The sender combines the message with a secret key.
  • The combined data is hashed using a cryptographic hash function (e.g., SHA-256).
  • The resulting hash is sent along with the message.
  • The receiver repeats the process with the same key and verifies the hash.

Advantages of HMAC:

  • Resistant to collision attacks.
  • Works with SHA and MD5 algorithms.
  • Provides both integrity and authenticity.
  • Used in TLS, IPSec, and API authentication.

How can we help?