Hashed Message Authentication Code (HMAC)
To understand a hashed message authentication code (HMAC) you must understand a message authentication code (MAC). First, view the diagram with the subtitle "computing a MAC versus computing an HMAC". Then read the text below the diagram. How does a MAC become an HMAC? What is the purpose of an HMAC?
We introduce the concepts of cryptography-based security step by step. The first step is the cryptographic algorithms - ciphers and cryptographic hashes - that are introduced in this section. They are not a solution in themselves, but rather building blocks from which a solution can be built. Cryptographic algorithms are parameterized by keys, and a later section then addresses the problem of distributing the keys. In the next step, we describe how to incorporate the cryptographic building blocks into protocols that provide secure communication between participants who possess the correct keys. A final section then examines several complete security protocols and systems in current use.
Source: https://eng.libretexts.org/Bookshelves/Computer_Science/Book%3A_Computer_Networks_-_A_Systems_Approach_(Peterson_and_Davie)/08%3A_Network_Security/8.02%3A_Cryptographic_Building_Blocks
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License.