This document discusses hash and MAC algorithms. It provides details on hash functions, the Secure Hash Algorithm (SHA), and HMAC.
Hash functions take a message and produce a fixed-size hash value. SHA is a secure hash algorithm developed by NIST that produces 160-bit or longer hash values. It works by padding the message, appending the length, initializing buffers, processing the message in blocks through compression functions, and outputting the hash value.
HMAC is a MAC algorithm that incorporates a secret key into an existing hash function like MD5 or SHA. It works by padding the key, XORing it with ipad or opad, appending the message or hash, and applying the hash function to produce the