Hash functions

Hash functions are used to create fixed-length digests of arbitrarily-long input strings. Hash functions are keyless, and they provide the data integrity service. They are usually built using iterated and dedicated hash function construction techniques.

Various families of hash functions are available, such as MD, SHA-1, SHA-2, SHA-3, RIPEMD, and Whirlpool. Hash functions are commonly used for digital signatures and Message Authentication Codes (MACs), such as HMACs. They have three security properties, namely preimage resistance, second preimage resistance, and collision resistance. These properties are explained later in this section.

Hash functions are also typically used to provide data integrity services. These can be used both as one-way functions and to construct other cryptographic primitives, such as MACs and digital signatures. Some applications use hash functions as a means for generating Pseudo-random Numbers Generator (PRNGs). There are two practical and three security properties of hash functions that must be met depending on the level of integrity required. These properties are discussed in the following subsections.