在线实验室

比特币 HASH160 流水线

在浏览器本地测试哈希摘要、文件校验、默克尔证明与密钥派生。

Bitcoin Protocol Standard Client-Side Web Crypto

Bitcoin HASH160 & RIPEMD-160 Pipeline

Explore the exact dual-stage cryptographic hashing pipeline utilized in Bitcoin's proof-of-work consensus: RIPEMD160(SHA256(data)).

Preset Test Vectors
Input Type: Hex Bytes Length: 66 chars (33 bytes)
1 Stage 1: SHA-256 Digest
256 bits (32 bytes)
0b7c28c9b7290c98d7438e70b3d3f7c848fbd7d1dc194ff83f4f7cc9b1378e98
Collision Resistance: ~2¹²⁸ operations
↓ feeds into RIPEMD-160
2 Stage 2: Bitcoin HASH160 (RIPEMD-160)
160 bits (20 bytes, 37.5% compact)
f54a5851e9372b87810a8e60cdd2e7cfd80b6e31
Cryptographic Hash Payload for P2PKH scriptPubKey
↓ 0x00 Version Prefix + 4-byte Double SHA-256 Checksum + Base58
3 Standard P2PKH Bitcoin Address
Base58Check Encoded
1PMycacnJaSqwwJqjawXBErnLsZ7RkXUAs
Valid Bitcoin Mainnet Address starting with "1"
Why Did Satoshi Nakamoto Combine SHA-256 and RIPEMD-160?

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.