Chapter 5. Hashes and Message Digests



Random numbers should not be generated with a method chosen at random.

 --Donald Knuth

A hash (also known as a message digest) is a one-way function. It is considered a function because it takes an input message and produces an output. It is considered one-way because it’s not practical to figure out what input corresponds to a given output. For a message digest function to be considered cryptographically secure, it must be computationally infeasible to find a message that has a given prespecified message digest, and it similarly should be impossible to find two messages that have the same message digest. Also (which follows from the previous properties), given a message it should be impossible ...

Get Network Security: Private Communication in a Public World, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.