A Classical Introduction to Cryptography: Applications for Communications Security

Content
Hash functions: MD5, SHA, SHA-1
Generic attack against hash funtions: birthday paradox
?Analysis of hash functions: dedicated attack against MD4
Message authentication codes: CBC-MAC, HMAC
?Pseudorandom generator: congruential generator
In Chapter 2 we saw several conventional encryption algorithms. They were dedicated to confidentiality. In this chapter we study other conventional cryptographic primitives that are dedicated to integrity, authentication, and randomness.
In computer science, hash functions are used in order to arrange a database so one of its element can be accessed very efficiently. An entry is usually a pair ( x, y) where x is the entry label and y is data. It is stored at the location h( x) in the database. Later on, if we want to have access to data related to the label x, we just look at the location h( x). Problems arise when we have two different labels x and x' such that h( x) = h( x'). This is called a collision. Efficient hash functions are functions whose domain space is small and whose expected number of collisions is small in practical applications.
In cryptography, hash functions are used to protect the integrity of data: instead of protecting the integrity of data of arbitrary length, we want to concentrate on protecting the integrity of really small bitstrings.