Are there an infinity of public addresses for a wallet?

1

If I understand correctly a private 256-bit integer determines the curvature of an EC curve corresponding to your wallet and that 256-bit integer can be consider the "private key".

Now how many "public address(es)" are there corresponding to that particular wallet?

Is there just one public address or an infinity?

I've got a related question related to change: in typical bitcoin clients, when a change public address (I take it a change address is public, right?) is given, is that change address corresponding to the same wallet that the one where the bitcoin came from?

bitcoinNeverSleeps

Posted 2014-01-14T19:36:51.030

Reputation: 99

I think these are known as 'collisions'.John T 2014-01-14T19:38:58.517

Answers

2

A wallet contains a collection of keys, not just a single one.

Every private key has exactly one associated public key. Addresses are shortened forms of public keys (they're encoded hashes of the public key).

Change addresses are indeed public. Like every other address, the key for it is independent from the other keys in your wallet. Note that some clients send change back to one of the addresses the inputs were previously assigned to, in which case it's obviously the same key that is reused.

Pieter Wuille

Posted 2014-01-14T19:36:51.030

Reputation: 54 032

can't upvote you because I miss one upvote to have 15 rep ^ ^bitcoinNeverSleeps 2014-01-14T19:49:49.067

"Addresses are shortened forms of public keys (they're encoded hashes of the public key)." And there can be an infinity of shortened forms / public addresses for a single private key / public key?bitcoinNeverSleeps 2014-01-14T19:57:02.923

@bitcoin: No, there is only one.Nate Eldredge 2014-01-14T20:05:24.253

2But bear in mind addresses are 160 bits. If there are 2^160 addresses and 2^256 public keys, there are 2^96 public keys per address!kaoD 2014-01-14T20:07:46.643

@kaoD: could you expand a bit on the math behind that? Any 160 bit public address of the 2^160 can be used as a public address?bitcoinNeverSleeps 2014-01-14T20:16:25.320

@bitcoinNeverSleeps sure! A private key is any string of 256 bits (so 2^256 different private keys). A public key is 512 bits (256 for X coordinate, 256 for Y coordinate) but since Y depends on X there are 2^256 different public keys. An address is ripemd160(sha256(public key)), so 160 bits, so 2^160 addresses. If there are 2^256 public keys and 2^160 addresses, there are 2^256/2^160 = 2^96 public keys per address. Assuming ripemd160(sha256(x)) is evenly distributed (or roughly), that means that for each address there are 2^96 public keys which can spend the funds sent there.kaoD 2014-01-14T20:25:07.073