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 ?
There seem to be a couple of misunderstandings that I will try to clarify (briefly).
In 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 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.
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