Summary
In this chapter, we learned how a hash algorithm is a one-way function that takes a variable-length block of text and creates a fixed-length output. The output is referred to as a message digest. A message digest can be used in a variety of applications. We saw how it can ensure file integrity, create a digital signature, or verify a password. In addition, we can use a hash to identify data within a hash table and create a blockchain.
Not all hash algorithms are created equal in that there are several optimal hash properties. We reviewed these properties, including the one-way nature of the algorithm in that the message digest bears no resemblance to the original text. We also saw how a hash needs to consistently create the same hash every time the algorithm is run on a block of data. And we learned that one of the more important properties is collision resistance.
We reviewed several common hash algorithms, namely those in the message digest and SHA families. We know...