Chapter 5

Hash Functions++

I’m sure [my memory] only works one way.” Alice remarked. “I can’t remember things before they happen.” “It’s a poor sort of memory that only works backwards”, the Queen remarked. “What sort of things do you remember best?” Alice ventured to ask. “Oh, things that happened the week after next”, the Queen replied in a careless tone.

—Lewis Carroll, Through the Looking Glass

A boat, beneath a sunny sky Lingering onward dreamily In an evening of July —

Children three that nestle near,Eager eye and willing ear,

—Lewis Carroll, Through the Looking Glass

5.1 Introduction

This chapter covers cryptographic hash functions, followed by a brief discussion of a few crypto-related odds and ends. At first glance, cryptographic hash functions seem to be fairly esoteric. However, these functions turn out to be surprisingly useful in a surprisingly wide array of information security contexts. We consider the standard uses for cryptographic hash functions (digital signatures and hashed MACs), as well as a couple of non-standard but clever uses for hash functions (online bids and spam reduction). These two examples represent the tip of the iceberg when it comes to clever uses for hash functions.

There exists a semi-infinite supply of crypto-related side issues that could reasonably be covered here. To keep this chapter to a reasonable length, we only discuss a handful of ...

Get Information Security: Principles and Practice, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.