Dear all,
As I currently understand it, Bitcoin addresses are generated from ECDSA public keys as follows (ignoring any byte ordering issues for the moment):
address = base58(versionbyte + ripemd160(sha256(pubkey)) + hashCheck),
hashCheck = first4bytesof(sha256(sha256(versionbyte + ripemd160(sha256(pubkey)))))
where versionbyte is 0 in the real network and 111 in the test network.
Is there any technical/cryptographical reason why this has to be so complex? In other words, would the following method for generating addresses have some serious flaw that the above method does not:
address = base58(version byte + first160bitsof(sha256(pubkey)) + crcCheck)
crcCheck = crc32(version byte + first160bitsof(sha256(pubkey)))
Or for that matter, is there any point to sha256'ing the public key to begin with? i.e., would replacing first160bitsof(sha256(pub key)) with just first160bitsof(pubkey) do just as well?
Thanks!