← Cryptography learning path
Cryptography · Module 4 of 10

Hash functions

Create fingerprints of data.

📖 Key ideas

  1. A hash function maps data to a fixed-size digest.
  2. Good hashes are one-way and collision-resistant.
  3. SHA-256 is widely used; MD5 and SHA-1 are broken for security.
  4. Small input changes produce very different hashes (avalanche effect).
  5. Used for integrity checks, digital signatures and blockchains.
💡 Real-life example: A hash is a fingerprint: unique to the data, and you can't rebuild the person from it.
Hash functionMaps data to fixed-size digest
CollisionTwo inputs with the same hash
SHA-256Secure hash with 256-bit output
Avalanche effectSmall change, very different hash