Why Is a Double Hash Used in Bitcoin Addresses Instead of a Single Hash?
Bitcoin uses SHA-256 followed by RIPEMD-160 (H(H(pubkey))) for address generation. The primary reason is to shorten the public key hash from 32 bytes (SHA-256 output) to 20 bytes (RIPEMD-160 output), making addresses more manageable.
The secondary reason is to add an extra layer of security, as an attacker would need to find a weakness in both hash functions, though the main security comes from the preimage resistance of the first hash.