What is Hash Function?
A cryptographic hash function is a one-way mathematical function that converts arbitrary input into a fixed-length output — deterministic, collision-resistant, and fundamental to blockchain security.
WHY IT MATTERS
Hash functions are the glue of blockchain. They produce fixed-length fingerprints from any input, with key properties: deterministic (same input → same output), one-way (can't reverse), collision-resistant (can't find two inputs with same output), and avalanche effect (tiny changes cause massive output changes).
Blockchains use hashes everywhere: block hashing (creating the chain), transaction IDs, Merkle trees, address derivation, and proof-of-work mining.
Bitcoin uses SHA-256; Ethereum uses Keccak-256. Both provide 256-bit security — finding a collision would require ~2^128 operations, well beyond any feasible computation.