0
There's a gap in my understanding regarding the generation, via hashing, of bitcoin addresses. (I'm quoting from Antonoplous below for convenience, but I have consulted multiple other sources.)
According to Antonpolous:
"The bitcoin address is derived from the public key through the use of one-way cryptographic hashing. (Antonpolous, 2014:71)"
My understanding of public keys is that they do not change once generated from a private key (via ECDSA multiplication):
"Because the generator point is always the same for all bitcoin users, a private key k multiplied with G will always result in the same public key K.(Antonpolous, 2014:68)"
Best practice regarding bitcoin addresses recommends that:
"a unique address should be used for each transaction. Most Bitcoin software and websites will help with this by generating a brand new address each time you create an invoice or payment request. (Antonpolous, 2014:188)"
I understand that performing a hash function on the same data will always produce the same result (digest):
"For any specific input, the resulting hash will always be the same and can be easily calculated and verified by anyone implementing the same hash algorithm." (Antonpolous, 2014:188).
Given all of the above, my question is, how can different addresses be generated from the same, unchanging input, namely the public key?
Is it the double-hashing (SHA256 + RIPEMD160)? Is it the address pool? Is it due to deterministic wallets? The answer is probably simple and staring me in the face, but I can't see it. Thanks for any clarification.
1When you want to generate a new unique address, you start by generating a new private key, then using it to generate the corresponding public key, then hash it to get an address. You don't generate a new address from a public key you already have. – Nate Eldredge – 2017-02-25T01:55:57.477
There are generally two approaches to getting multiple addresses: 1) have multiple private keys 2) use BIP32
– Nick ODell – 2017-02-25T04:38:06.880@NateEldredge Thanks! I've seen lots about generating new addresses for every transaction but don't remember (or have blanked) seeing that a new private/public key is required also per transaction. Obvious now, but don't want to make any assumptions. – Colman McMahon – 2017-02-25T12:07:38.313
@ColmanMcMahon: Using a new address is recommended, but not required; if you want you can reuse an address you've used before (thus reusing the corresponding private/public key). – Nate Eldredge – 2017-02-25T14:15:24.950
@NickODell: While reading the question I was wondering: would it be indeed possible to generate two different addresses corresponding to the same public key by hashing either the compressed version of the public key or the uncompressed one? – cpsola – 2017-03-23T14:33:32.227
@disckjet Yes, that's right. – Nick ODell – 2017-03-23T15:20:59.400