7

So I have 5 monero, but if nobody else can see my balance, how can I prove that these coins are in my posession, and that they have not been spent yet.

I just fail to see how Monero can ensure that without the ability to view either a list of transactions or balances.

If I understand correctly, I can see my received transactions with my viewkey, and my sent transactions with my spendkey, but how can I prove that the coins have not been spent before if I don't disclose my spendkey?

I understand most of Bitcoin transactions and I have a more than basic understanding of encryption and how public and private keys work.

Also, please link easy-to-understand posts about the security of monero.

vrwim
  • 377
  • 2
  • 8

1 Answers1

9

When you have 5 monero it actually means that you have some unspent outputs with the total value being 5 monero. Those outputs are actually one-time use containers and you always empty them completely to make new ones.

So, if you had 5 monero in a single container, when sending 3 monero to someone, you'd empty your original container and create new ones of 3+2; one for the recipient and one for you. The recipient's wallet is then able to recognize (using private view key) and access the corresponding one-time private key (using private spend key) to the corresponding container(s).

Spending actually means using the one-time private key to sign to empty some container, which gives you the right to create new containers of the same value. The network doesn't check that it's full because it doesn't know which container you're emptying (it's hidden among other containers in the ring signature - the network can't know from which one you "took"). Instead, the network does check that you don't take from the same one 2 times, which effectively prevents double-spends but still keeps the "real" container hidden among other ones used in the ring signature. The mechanism for this is called a key image, and it's described here: What is a key image?

JollyMort
  • 20,004
  • 3
  • 49
  • 105