<p>Maybe this helps you: </p>

<ul>
<li>1 user per private key (if you don't share it or give access to your wallet)</li>
<li>1 or many private keys per user.</li>
<li>1 private key per address (otherwise collision).</li>
<li>1 (or alternatively 2) address(es) per private key.</li>
<li>1 or many private keys per wallet</li>
</ul>

CC BY-SA 3.0
2018-02-09T09:41:42.773Z
Okay, I understand but when a 1 input 2 output transaction happens and there is some change amount left, it is sent back to same user but at a different address. Does the wallet integrate all addresses belonging to a user to show him his balance/ unused bitcoins ?
Varad Bhatnagar
CC BY-SA 3.0
2018-02-09T09:45:10.777Z
yes, depending on the way the wallet is built (newer wallets use HD keys). The wallet is a "collection" of keys. The change address belongs to one of the other keys in the wallet. This has to do with the idea of not reusing keys. Have also a look into Andreas' book "Mastering Bitcoin", he explains it very well: http://chimera.labs.oreilly.com/books/1234000001802/index.html
pebwindkraft
CC BY-SA 3.0
2018-02-09T09:27:06.753Z
2018-02-09T09:27:06.753Z
hardfork
<p>There seem to be a couple of misunderstandings that I will try to clarify (briefly).</p>

<p>In <a href="https://en.wikipedia.org/wiki/Public-key_cryptography" rel="noreferrer">public-key cryptography</a> a pair of keys is used; a private and a public. The private is kept secret and the public shared. Assume that Bob has the public key of Alice. Alice can then sign a message using her private key and send the signed message to Bob. Bob can use the Alice's public key to verify that it was indeed signed by that private key. Because of the mathematical properties of public-key cryptography only the owner of that private key could sign that message.</p>

<p>A Bitcoin private key can be used to derive a Bitcoin address.<br>
A <a href="https://bitcoin.org/en/glossary/hd-protocol" rel="noreferrer">HD key</a> can be used to derive several private keys which in turn can be used to derive a Bitcoin address.</p>

<p>So, to answer your question:</p>

<p>A private key does not really uniquely identify a user. It just allows someone to prove that he owns a private key (has control over a specific address)</p>

<p>Nowadays wallets are HD wallets thus use a master key that all private keys (and thus addresses) are generated from.</p>

<p>So one user can have multiple address because they have multiple private keys associated with them. The private keys could be generated from one master key (HD wallets) or randomly (several non-HD private keys). Anyone holding a private key can prove that he controls the derived address without revealing that private key.</p>

CC BY-SA 3.0
2018-02-09T09:46:34.600Z
2018-02-09T09:46:34.600Z
karask
<p>I read somewhere that Private Keys are used to uniquely identify users and one user can have multiple addresses. So how does it work? Each private key derives a user or each private key derives an address ?</p>

<private-key>
Every bitcoin wallet user has one Private Key or every address has one private key?
Varad Bhatnagar
# Every bitcoin wallet user has one Private Key or every address has one private key?

(Asked by: username_0 on 2018-02-09)

I read somewhere that Private Keys are used to uniquely identify users and one user can have multiple addresses. So how does it work? Each private key derives a user or each private key derives an address ?

**Tags:** private-key


---

## 2 answers

### Answer by username_3 on 2018-02-09. Score: 7 | Accepted answer

There seem to be a couple of misunderstandings that I will try to clarify (briefly).

In [public-key cryptography](https://en.wikipedia.org/wiki/Public-key_cryptography) a pair of keys is used; a private and a public. The private is kept secret and the public shared. Assume that Bob has the public key of Alice. Alice can then sign a message using her private key and send the signed message to Bob. Bob can use the Alice's public key to verify that it was indeed signed by that private key. Because of the mathematical properties of public-key cryptography only the owner of that private key could sign that message.

A Bitcoin private key can be used to derive a Bitcoin address.  
A [HD key](https://bitcoin.org/en/glossary/hd-protocol) can be used to derive several private keys which in turn can be used to derive a Bitcoin address.

So, to answer your question:

A private key does not really uniquely identify a user. It just allows someone to prove that he owns a private key (has control over a specific address)

Nowadays wallets are HD wallets thus use a master key that all private keys (and thus addresses) are generated from.

So one user can have multiple address because they have multiple private keys associated with them. The private keys could be generated from one master key (HD wallets) or randomly (several non-HD private keys). Anyone holding a private key can prove that he controls the derived address without revealing that private key.


---

### Answer by username_1 on 2018-02-09. Score: 0

Maybe this helps you:

* 1 user per private key (if you don't share it or give access to your wallet)
* 1 or many private keys per user.
* 1 private key per address (otherwise collision).
* 1 (or alternatively 2) address(es) per private key.
* 1 or many private keys per wallet

> **Comments:**
> **username_0**: Okay, I understand but when a 1 input 2 output transaction happens and there is some change amount left, it is sent back to same user but at a different address. Does the wallet integrate all addresses belonging to a user to show him his balance/ unused bitcoins ?  
> **username_2**: yes, depending on the way the wallet is built (newer wallets use HD keys). The wallet is a "collection" of keys. The change address belongs to one of the other keys in the wallet. This has to do with the idea of not reusing keys. Have also a look into Andreas' book "Mastering Bitcoin", he explains it very well: http://chimera.labs.oreilly.com/books/1234000001802/index.html  

---

