2 Hash Functions

 

This chapter covers:

  • Hash functions and their security properties.
  • The wildly adopted hash functions in use today.
  • What other types of hashing there exist.

I have talked about cryptographic primitives in the previous chapter, they are constructions that achieve specific security properties and form the building blocks of cryptography. In the first part of this book we will learn about several important ones. The very first one we’ll talk about is the hash function. Informally, it is a tool that when given an input will produce a unique identifier tied to that input. A hash function is rarely used on its own but can be found everywhere in cryptography. For example, we will rarely see digital signatures not making use of hash functions (and some signature schemes even go as far as being built solely using hash functions).

2.1  What Is a Hash Function?

In front of you a download button is taking a good chunk of the page. You can read the letters DOWNLOAD, and clicking on them seems to redirect you to a different website containing the file. Below it, lies a long string of unintelligible letters:

f63e68ac0bf052ae923c03f5b12aedc6cca49874c1c9b0ccf3f39b662d1f487b

It is followed by what looks like an acronym of some sort: sha256sum. Sounds familiar? You’ve probably downloaded something in your past life that was also accompanied with such an odd string.

2.2  Security Properties of a Hash Function

2.3  Security Considerations for Hash Functions

2.4  Hash Functions in practice

2.5  Standardized Hash Functions

2.5.1  The SHA-2 Hash Function

2.5.2  The SHA-3 Hash Function

2.5.3  SHAKE and cSHAKE, Two eXtendable Output Functions (XOF)

2.5.4  Attack of the Chapter: Ambiguous Hashing and TupleHash

2.6  Hashing Passwords

2.7  Summary

sitemap