🔟 What does n‑bit security level mean? Does a 256‑bit hash provide 256‑bit collision security? (slide 23)
✅ 2ⁿ ops to break; collision gives only n/2‑bit security
n‑bit security = attacker needs 2ⁿ operations. For hash, collision resistance is ~2^(n/2) due to birthday paradox, so 256‑bit hash gives ~128‑bit collision security.
1️⃣1️⃣ List four real hash functions from slide 24. Which ones are considered broken or weak for collision resistance?
✅ MD5, SHA1, SHA2, SHA3; MD5 & SHA1 broken
MD5 (128‑bit) – collisions in ~2²¹ (broken).
SHA1 (160‑bit) – collisions in ~2⁶¹ (deprecated).
SHA2 (224–512‑bit) – still secure.
SHA3 – newest NIST standard, no known attacks.
1️⃣2️⃣ List at least five applications of cryptographic hash functions from slide 25.
The input space is arbitrarily large (or infinite), while output space is fixed (e.g., 2¹²⁸). By pigeonhole principle, at least two inputs must map to the same output.
1️⃣6️⃣ What is the rule of thumb for the number of random items needed for a 50% collision probability when there are N possibilities? (slide 20)
✅ approximately √N
If there are N different outputs, about √N randomly chosen inputs yield a 50% chance of a collision.
📐 FORMAL CONCEPTS – WEEK04 L2 (HASH FUNCTIONS)
🔁 Core properties
Pre‑image (hiding): given H(x), hard to find x
2nd pre‑image: given x, hard to find y≠x with H(x)=H(y)
Collision: hard to find any x≠y with H(x)=H(y)
⚡ Pre‑image brute force
128‑bit hash → average attempts = 2¹²⁷
m‑bit hash → average ≈ 2^(m‑1)
🎂 Birthday bound (collision)
For m‑bit hash, 50% collision after ~2^(m/2) trials