A hash function deterministically maps arbitrary input to a fixed-size digest. It is one-way and collision-resistant.
Algorithms
- SHA-256 / SHA-3 — cryptographically strong, recommended.
- MD5 / SHA-1 — collision-vulnerable, not for security.
- bcrypt / Argon2 — password hashing (salt + cost factor).
CTF Attacks
Hash Length Extension, Rainbow Tables, brute-forcing weak hashes.