Confidential Transaction
Last updated
Last updated
Confidential Transactions (CT) are a cryptographic method used to enhance privacy on the blockchain by hiding transaction details from the public while still allowing transaction validity verification. The key features of Confidential Transactions include:
Hidden Transaction Amounts: CTs conceal the transaction amounts so that only the sender and receiver know the actual values being transferred. This is done using cryptographic techniques that obscure the amounts while still enabling network nodes to validate the transaction.
Verifiable Transactions: Although the amounts are hidden, network participants can still verify the validity of transactions. This ensures no double-spending or creation of money out of thin air, without revealing the exact transaction amounts.
Initially, the confidential transaction dApp communicates with the zkFHE network, requesting a subset of zkFHE nodes to generate a shared public key (PK). Account balances are encrypted as unsigned integers using this key.
When minting tokens, the mint amount is encrypted with the shared public key and added to the encrypted account balance. During account registration, the first minted tokens are encrypted to represent the account balance.
In cases where the confidential transaction application interacts with an external plain token asset (e.g., converting a public asset to a private one), the system allows the private asset to be burned for withdrawal into the plain asset. Random mint/burn mechanisms are irrelevant in this context, as plain asset functions will always reveal the amount. The burn process involves homomorphically subtracting the burnt amount from the encrypted account balance. The burnt amount is then decrypted and revealed to reduce the total supply accordingly.
To view their account balance, a user can instruct the dApp to re-encrypt the balance from the network's shared public key to their own public key. This operation is performed through a view function, which requires the user to provide a signature when calling the contract. This ensures the network can authenticate the user’s ownership of the balance before displaying the encrypted balance.
This approach ensures transaction privacy while maintaining the integrity of the system, offering a robust solution for privacy-conscious blockchain applications.
4o