<blockquote>
  <p>you generate a Bitcoin address basically by hashing a public key with a RIPEMD160 hash function, </p>
</blockquote>

<p>You use HASH160, actually. HASH160 is RIPEMD160(SHA256(x)).</p>

<p>This is a good resource for learning how to transform a private key into a Bitcoin address: <a href="https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses" rel="noreferrer">https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses</a></p>

<blockquote>
  <p>how is it possible to connect more than 1 address to a single public key</p>
</blockquote>

<p>The compressed and uncompressed versions of an address hash to different values. That's one way that the same key could hash to two different values. There are also Hierarchical Deterministic wallets that allow you to take a single key, and derive many different subkeys from it, all of which have different addresses.</p>

<p>It's also not 1:1 in the sense that it's theoretically possible to create two different public keys that hash to the same value. </p>

CC BY-SA 3.0
2016-12-20T18:47:49.787Z
Thanks, man. I found more info about [un]compressed addresses here: https://bitcoin.stackexchange.com/questions/37373/how-can-i-test-if-a-bitcoin-address-is-compressed-or-not
forkd
CC BY-SA 3.0
2016-12-20T18:28:51.290Z
2016-12-20T18:28:51.290Z
Nick ODell
<p>A Bitcoin wallet can handle multiple private keys.  In ECC, you can have 2^256 private keys, and for each key, you can have 2^256 public keys.  Assuming that's right (please <strong>correct me if I'm wrong</strong>), you generate a Bitcoin address basically by hashing a public key with a RIPEMD160 hash function, which can produce 2^160 different addresses.</p>

<p>Is the <strong>relationship between the Bitcoin address and the public key</strong> 1:1 (one address for each public key)?  If not, <strong>how is it possible to connect more than one address to a single public key</strong>, since this "connection" is made through hash functions and the hash for one entry (the public key) doesn't change unless you change the entry itself?</p>

<p>Thanks in advance.</p>

<address><private-key><hash><public-key><address-generation>
What's the relationship of Bitcoin addresses to public keys?
forkd
# What's the relationship of Bitcoin addresses to public keys?

(Asked by: username_0 on 2016-12-20)

A Bitcoin wallet can handle multiple private keys. In ECC, you can have 2^256 private keys, and for each key, you can have 2^256 public keys. Assuming that's right (please **correct me if I'm wrong**), you generate a Bitcoin address basically by hashing a public key with a RIPEMD160 hash function, which can produce 2^160 different addresses.

Is the **relationship between the Bitcoin address and the public key** 1:1 (one address for each public key)? If not, **how is it possible to connect more than one address to a single public key**, since this "connection" is made through hash functions and the hash for one entry (the public key) doesn't change unless you change the entry itself?

Thanks in advance.

**Tags:** address, private-key, hash, public-key, address-generation


---

## 1 answers

### Answer by username_1 on 2016-12-20. Score: 5 | Accepted answer

> you generate a Bitcoin address basically by hashing a public key with a RIPEMD160 hash function,

You use HASH160, actually. HASH160 is RIPEMD160(SHA256(x)).

This is a good resource for learning how to transform a private key into a Bitcoin address: <https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses>

> how is it possible to connect more than 1 address to a single public key

The compressed and uncompressed versions of an address hash to different values. That's one way that the same key could hash to two different values. There are also Hierarchical Deterministic wallets that allow you to take a single key, and derive many different subkeys from it, all of which have different addresses.

It's also not 1:1 in the sense that it's theoretically possible to create two different public keys that hash to the same value.

> **Comments:**
> **username_0**: Thanks, man. I found more info about [un]compressed addresses here: https://bitcoin.stackexchange.com/questions/37373/how-can-i-test-if-a-bitcoin-address-is-compressed-or-not  

---

