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 involves padding the message, initializing a buffer, processing the message in blocks through a compression function, and outputting the final hash.
HMAC is a MAC algorithm that incorporates a secret key into an existing hash function like MD5 or SHA. It pads and XORs the key, hashes the result with the message, then hashes again with a padded key to produce the MAC value.