Read this lesson as text
Hash Functions Summary
Cryptography · Axiom Academy
Let's review the essential concepts, algorithms, and applications of cryptographic hash functions. Definition: One-way functions that map arbitrary-length input to fixed-size output (digest/hash) Deterministic: Same input always produces the same hash output Fast Computation: Efficiently computable for any input size One-Way Property: Computationally infeasible to reverse (find input from hash) Pre-image Resistance: Given hash h, cannot find message m where H(m) = h Second Pre-image Resistance: Given m1, cannot find different m2 where H(m1) = H(m2) Collision Resistance: Cannot find any two different messages m1, m2 where H(m1) = H(m2) Avalanche Effect: Small input change causes dramatic hash change MD5 (128-bit): Broken - collisions found, DO NOT USE for security SHA-1 (160-bit): Deprecated - collision attacks demonstrated in 2017 SHA-256 (256-bit): Current standard, widely used, secure SHA-3 (Keccak): Latest standard, sponge construction, alternative to SHA-2 Birthday Paradox: Finding collisions is easier than finding specific values Attack Complexity: Approximately 2 n/2 operations for n-bit hash Security Implication: Collision resistance is only half the output bits Example: 256-bit hash provides ~128-bit collision security Purpose: Hash-based Message Authentication Code for data integrity and authenticity Construction: HMAC(K, m) = H((K XOR opad) || H((K XOR ipad) || m)) Security: Requires secret key K; prevents length extension attacks
This is the written version of the interactive lesson above. See the full Cryptography course.