Hash Function
Fungsi matematika yang map input arbitrary jadi output fixed length dengan deterministic properties.
Penjelasan
Sobat Kripto, hash function adalah primitive paling fundamental di cryptography dan blockchain. SHA-256 untuk Bitcoin, Keccak-256 untuk Ethereum. Properties penting: deterministic (same input always produces same output), one-way (cannot reverse), fast compute, avalanche effect (small input change = massive output change). Foundation untuk integrity verification.
Properties Penting
Deterministic: input X selalu produce output Y yang sama. One-way: tidak feasible reverse engineer input dari output. Fixed length: output selalu 256-bit untuk SHA-256, regardless input size. Avalanche effect: ubah 1 bit input, output berubah radically. Collision resistant: tidak feasible find dua input yang produce same output.
Use di Blockchain
Block hash: hash of block header yang link ke previous block. Merkle tree: hash of transactions di block. Address: derive dari hash of public key. Mining: Bitcoin proof of work cari nonce yang produce hash di bawah target difficulty. Hash function pengamanan integrity data di blockchain.
Common Algorithms
SHA-256: Bitcoin block hash. SHA-3 (Keccak): Ethereum (slightly different variant). RIPEMD-160: Bitcoin address derivation. Blake2: faster alternative. Argon2: password hashing. SHA-1 dan MD5: deprecated (collision found). Sobat Kripto: hash function reliability fundamental untuk blockchain security. Hash function break (theoretical) akan compromise crypto.