Understanding Hashes
Fundamentals: what is a hash function and how does it work?
-
What Is a Hash Function? Explains how hash functions like SHA-256 map data of arbitrary length onto a hash value of fixed length, what determinism and the avalanche effect mean, and how hashing differs from encryption and encoding.
-
What Is a Hash Collision? Explains why hash collisions are mathematically unavoidable, what collision resistance means, and why SHA-256 is still considered secure despite existing collisions.
-
What Is the Avalanche Effect? Explains why even a single changed bit strongly changes a SHA-256 hash, and what the strict avalanche criterion means.
-
What Is Preimage Resistance? Explains why it should be practically impossible to find a matching input for a given SHA-256 hash value, and how preimage resistance differs from collision resistance and second-preimage resistance.
-
What Is Second-Preimage Resistance? Explains why it should be difficult to find a second input with the same hash value as a known input, and why the second-preimage-resistance strength of SHA-256 depends on the message length.
-
What Is Collision Resistance? Explains why SHA-256 has a collision-resistance strength of 128 bits, what the birthday bound means, and how collision, preimage, and second preimage differ.