Browser Labs
Bitcoin HASH160 Pipeline
Trace SHA-256 followed by RIPEMD-160 for Bitcoin public-key address derivation.
Bitcoin HASH160 & RIPEMD-160 Pipeline
Explore the exact dual-stage cryptographic hashing pipeline utilized in Bitcoin's proof-of-work consensus: RIPEMD160(SHA256(data)).
1. Defense-in-Depth Cryptanalysis: SHA-256 was designed by the NSA, while RIPEMD-160 was engineered by the COSIC research group in the European Union (KU Leuven). An unexpected mathematical vulnerability in one algorithm would require an adversary to simultaneously break both distinct cryptographic primitives.
2. On-Chain Block Space Efficiency: Compressing the 256-bit SHA-256 output down to 160 bits saves 12 bytes per transaction output in the Bitcoin UTXO set. Across hundreds of millions of blockchain transactions, this conservation preserves decentralized node validation on commodity consumer hardware.
3. Length Extension Protection: Merkle–Damgård hash functions (like SHA-256) can be susceptible to length extension attacks if misused. Wrapping the SHA-256 digest inside RIPEMD-160 completely neutralizes this attack vector.
01 Why This Matters & 30-Second Experiment Tap to expand plain-English guide & CLI command
Bitcoin shortens 33-byte or 65-byte ECDSA public keys into compact 20-byte (160-bit) payloads using HASH160: first SHA-256, then RIPEMD-160, before Base58Check or Bech32 encoding.
- Enter or prefill a compressed public key above to trace Stage 1 (SHA-256) into Stage 2 (RIPEMD-160).
- Change 1 hex character in the public key and watch both intermediate and final 160-bit digests change completely.
- Read the companion guide to see how the version byte and 4-byte checksum produce a mainnet address.
node -e "const c=require('crypto'); const s=c.createHash('sha256').update('pubkey').digest(); console.log(c.createHash('ripemd160').update(s).digest('hex'))"