Skip to main content
Presentation 12 of 16

Hash Functions

MD5 · SHA-1 · SHA-2 · SHA-3 and collisions

Slides: 25 PDF · 1.2 MB
Loading slides…

Keyboard: Left arrow Right arrow Slides; F — fullscreen

Summary

The lecture explains what a hash function is, why collisions are unavoidable (pigeonhole principle), the three security requirements (first-preimage, second-preimage and collision resistance), the avalanche effect and the 2^(n/2) bound that follows from the birthday paradox. It then covers the Merkle–Damgård construction, how MD5 (2004) and SHA-1 (SHAttered, 2017) were broken, a SHA-256 round, the length-extension attack and SHA-3 (Keccak, sponge). It closes with applications (integrity, digital signatures, blockchain, passwords with salt, bcrypt, scrypt and Argon2id), Python practice with hashlib and a table of which hash to use when.

Key terms

MD5 SHA-1 SHA-256 SHA-3 / Keccak to'qnashuv tug'ilgan kun paradoksi ko'chki effekti Merkle-Damgård SHAttered uzunlikni kengaytirish HMAC Argon2id

Lecture outline

  1. What is a hash function? The general scheme
  2. The pigeonhole principle: collisions are inevitable
  3. The three security requirements
  4. The avalanche effect
  5. The birthday paradox and the 2^(n/2) bound
  6. The Merkle–Damgård construction and MD5
  7. SHA-1 and the SHAttered attack (2017)
  8. The SHA-2 family and a SHA-256 round
  9. The length-extension attack
  10. SHA-3 (Keccak): the sponge construction
  11. Applications: integrity, signatures, blockchain, passwords
  12. Python practice, recommendations and conclusions
Related lesson Cryptographic Hashing, Password KDFs & HMAC