2

I'm currently trying to understand how confidential transactions would work. I think I was able follow all the explanations about Pedersen commitments and the range checks, but I'm still missing one piece of the puzzle: If the network doesn't know transaction amounts, how can it verify a transaction? It doesn't know whether the account balance is sufficient. How can the network even know account balances when the amount of incoming transactions is hidden?

It would be great if anyone could shed some light on this.

1 Answer 1

1

If the network doesn't know transaction amounts, how can it verify a transaction?

That's exactly what Pedersen commitments allow you to do.

Each of the outputs contains a commitment P(v,r) = vH + rG, where v is the value and r is the blinding factr. The network does not know v or r, but does know P(v,r) (and H and G, which are constant).

Pedersen commitments have the property that they're linear in both arguments. This means that P(v1,r1) + P(v2,r2) = P(v1+v2,r1+r2).

For every transaction, a network rule requires that the sum of the output's commitments equals the sum of the commitments of the outputs spent by the inputs. This means that the sum of the output's values must equal the sum of the input's values, and that the sum of the blinding factors must equal the sum of the input's blinding factors.

The range proofs are there to prevent overflow in the value addition.

It doesn't know whether the account balance is sufficient.

There is no 'account' balance in Bitcoin. Transactions create outputs by burning outputs created by other transactions. Your wallet shows the sum of the values of all outputs you can spend. The only requirement is that a transaction does not create more in outputs than it burns in its inputs.

How can the network even know account balances when the amount of incoming transactions is hidden?

It can't. The purpose of Confidential Transaction is to prevent the network from knowing anything about anyone's balances. The only necessity is that individual wallets are able to determine how much they're able to spend. In CT that is solved by sending that information in encrypted form along with the transaction, with the receiver's public key.

1
  • 1
    Ah, now I get it! I always thought that in order do verify the blockchain, nodes would determine balances for each public key from incoming and outgoing transactions. And I thought transaction inputs were public keys of accounts, not outputs of other transactions. Now everything makes sense. Thanks! May 21, 2017 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.