liveBook · Manning

Collision-resistant hash function

As explained in Software Security for Developers

Collision resistance is the computational infeasibility of finding two distinct inputs that produce the same cryptographic hash value.

A collision-resistant hash function makes it computationally infeasible to find two different inputs that produce the same hash value. Hashes accept inputs of any size and return fixed-size outputs, so collision resistance is a security property rather than a guarantee that collisions are mathematically impossible. section 4.2.1

Different inputs, different SHA-256 values

SHA-256 produces different example outputs for lowercase “a,” uppercase “A,” and a 2.6 GB Ubuntu ISO. The values are fixed at 256 bits even though the inputs have very different sizes. section 4.2.1

Do not design or implement a cryptographic hash function yourself. Use standardized, peer-reviewed functions from a standard library and approved by the relevant information-security team. section 4.2.1

How Software Security for Developers covers it

How deep it goes
Defines collision resistance and contrasts it with one-wayness, but defers the mathematics of hash-function design and assessment.
Examples
Uses SHA-256 outputs for lowercase “a,” uppercase “A,” and a 2.6 GB Ubuntu ISO.
What you can do after
Evaluate hash-function choices and select standardized, peer-reviewed implementations instead of creating a custom cryptographic hash.
How it connects
Connects collision resistance with cryptographic hash functions, one-wayness, message integrity, authentication, and SHA-256.

Also explained in

Compare how 3 books explain collision-resistant hash function →

Related concepts

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