liveBook · Manning

Hash value

As explained in Hacking Cryptography

A hash digest is the fixed-size output produced by applying a hash function to input data.

A hash value is the fixed-size, deterministic output of applying a hash function to input data of arbitrary length. Reversing the output to recover the input should be computationally impractical. section 6.1

Hash values act like one-way fingerprints: identical inputs produce matching values, while even a small input change usually produces a radically different value. This supports password verification and file-integrity checks without storing the original data. section 6.1 section 7.1

Use hash values carefully:

  • Store a password’s digest and hash the login attempt again; matching values permit login. section 6.1
  • Compare a downloaded file’s digest with a published checksum to detect accidental corruption. section 7.1
  • Do not treat an ordinary hash value as authentication: an attacker can replace both a message and its digest. section 7.1
Figure 6.1 Hash functions use one-way functions to calculate a fixed-length hash digest from a variable-length input message.
figure

Shows the transformation from a variable-length input message to a fixed-length digest through a one-way function. section 6.1

How Hacking Cryptography covers it

How deep it goes
Defines deterministic one-way hashing and shows applications, but defers detailed collision, rainbow-table, and length-extension attacks.
Examples
Uses password login comparisons, Linux DVD checksums, and corrupted-download scenarios as concrete examples.
What you can do after
Apply it via password verification and checksum comparison while recognizing that public digests do not authenticate messages.
How it connects
Connects one-way functions, password storage, checksums, message integrity, collision resistance, and message authentication codes.

Also explained in

Compare how 7 books explain hash value →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Hacking Cryptography. The section links point to the parts of the book it draws on.