11
Hash Functions and Message Authentication Codes
In previous chapters, we touched upon message authentication and its importance for applied cryptography. We also used the terms cryptographic hash function and message authentication code (based on symmetric key cryptography), which are the underlying cryptographic mechanisms to realize message authentication. However, we did not give a formal definition of these terms and did not discuss their mathematical properties.
In this chapter, we take a deep dive into hash functions and message authentication codes. After explaining why message authenticity and integrity are crucial for security, we will cover one-way functions, mathematical properties of hash functions, as well as their underlying building blocks, such as the Merkle-Damgard construction.
Moreover, we will discuss how message authentication codes work and learn about a popular algorithm called HMAC. Finally, we will take a look at where hash functions and message authentication...