How does confidential transaction technology work?
The technology implements new address formats and transactions. The transaction format consists of scriptPubKey, Pedersen’s commitment scheme, and a random ECDH (elliptic Diffie-Hellman curve) code.
The ScriptPubKey contains the Confidential Transaction Address (CTA) and the mathematical condition that Bitcoin can only be spent if the ownership of the address’s private key is confirmed by a signature.
The confidential transaction address is the hash of the blinding key plus a regular bitcoin address.
The function of the blinding key is to hide the bitcoin address and transaction amount in the public register. In addition, access to the blinding key makes it possible to see the bitcoin address and amount in a confidential transaction.
Pedersen’s commitment scheme is the hash of the entire Bitcoin output plus the blinding key.
The ECDH is the key to expose the entire confidential transaction. It is used to transmit encrypted data to the recipient of the transaction, who will recognize the output of the Bitcoin transaction and the blinding factor of the confidential transaction.
An example of how confidential transactions work.
Alice’s wallet has two bitcoins, one of which she wants to send to Bob.
After receiving Bob’s address, Alice creates a blinding key and concatenates them into a single hash. This creates a confidential address. Although it is recorded in the public registry, no one except Alice and Bob knows that the address of the confidential transaction is associated with Bob’s address.
An example of a confidential address:
Alice then creates a confidential transaction. Using the same blinding key and the output of one bitcoin, she creates a Pedersen bond. Thanks to this, the amount that Alice sends to Bob is hidden, but both of them can see it, since both have a public blinding key. Alice has it because she created a blinding key, and Bob can derive it using the private key of his bitcoin address.
Alice then creates a scriptPubKey with a confidential transaction address that she created with Bob’s bitcoin address, with the mathematical condition that one bitcoin can be spent if Bob can verify with a signature that he owns the address’s private key.
The transaction is then recorded in the public ledger.