Quiz Entry - updated: 2026.07.05
What is a one-way hash function?
A one-way hash is easy to compute forward but computationally infeasible to invert.
f("M1s!ecurePW") = "Wre/JFp9qIlxKldMuuuD3cnktDfWR" (cheap)
f_reverse("Wre/JFp9qIlxKldMuuuD3cnktDfWR") = ??? (very expensive)
The hash function must be cryptographically secure:
- MD5, SHA-1: Broken - don't use
- SHA-256, SHA-3: Strong for general hashing
- bcrypt, Argon2: Recommended for passwords
Go deeper:
bcrypt (Wikipedia) — why a slow, adaptive hash beats a fast one like SHA-256 for passwords: the cost factor can be raised as hardware speeds up.