Public key management There is something i am not sure to understand on bitcoin private/public keys and addresses.
A new bitcoin user &quot;U&quot; first generates a private key.
He can compute several public keys from this private key.
When he wants to receive bitcoins, the user should generate an address. I do not understand if this address is a public key or if it is 2 different things.
If my &quot;U&quot; user should receive bitcoin from 10 different people, he can generate a single common address for this 10 peoples but they will be able to see &quot;U&quot; balance, and see that he receives 10 transactions.
The solution is to generate 10 different addresses. With this solution, each sender will only see its own transaction and won't see the 9 others. I am wrong ?
So, to shortcut, can we say &quot;U&quot; generates 10 &quot;virtual accounts&quot;, linked to its private key ?
If so, i do not understand how &quot;U&quot; can computes its own balance: Is there a way for him to recover all public/address he generates from its private key ? Or should user keep all the addresses he generates in a file ?
Thanks
A modern Bitcoin wallet program can generate many private-keys, each private-key has a public-key. For the most common transaction types, a Bitcoin-address is derived from the public-key.
As you say it is normal to generate a new address (i.e. a new set of keys) for each transaction. This is because all the transaction data is public knowledge - it is in the replicated journal of transactions we call the blockchain. Anyone can see all transactions for a specific address, so if ten people each pay you 1 BTC to the same address, they can all see that you have received 10 BTC in total at that address. This is a privacy concern. If the addresses are all different, they can't tell which belong to the same person.
In the Bitcoin network there are no accounts, no virtual accounts and no balances.
A wallet can read through the whole transaction journal and add up all the unspent amounts in transactions where the receiving address is one for which the wallet knows it has the corresponding private-key. That way it can present a total amount to the user. People refer to this total as a balance but that's misleading. The Bitcoin network does not keep a record of people's balances. The Bitcoin network does not know how much money anyone has in total. The US Mint does not know how many US one-cent coins I have sitting in a plastic bag on my shelf, it doesn't keep track of my balance or have an account in my name.
The terminology for Bitcoin is a bit muddled. Bitcoin was designed as digital cash. Accounts and balances are associated with banks, not with piles of dollar bills under your mattress or in your leather wallet. If you were talking about cash in the form of paper money and metal coins you wouldn't think about accounts and balances. You'd just want to know the total amount of money you have in paper banknotes and metal coins.
Modern wallets are what is called Hierarchical Deterministic (HD) wallets. From the initial private key (or seed phrase) it is possible to generate all the subsidiary keys and addresses in a predictable and repeatable way. You don't need to make a backup of each generated key and generated address.