Overview
The ciphertext-commitment equality proof certifies that an ElGamal ciphertext and a Pedersen commitment encode the same plaintext value. The prover must provide:- The decryption key for the ElGamal ciphertext
- The Pedersen opening for the commitment
Proof Structure
TheCiphertextCommitmentEqualityProof contains six components:
Commitment to blinding factor for the ElGamal public key
Commitment combining message and ciphertext handle
Commitment for the Pedersen commitment verification
Masked ElGamal secret key
Masked plaintext message
Masked Pedersen opening
Proof Data Context
Generating a Proof
Verification
The verification checks the following algebraic relations using challenge scalarsc, w, and ww:
Pis the ElGamal public keyG,Hare the Pedersen base pointsDis the ciphertext handleC_ciphertextis the ElGamal ciphertext commitmentC_commitmentis the Pedersen commitment
All points (public key, ciphertext components, and Pedersen commitment) must be non-identity. Identity points are rejected to prevent trivial proofs.
Use Cases
- Confidential tokens: Linking encrypted balances with range-proof commitments
- Balance validation: Proving an encrypted balance matches a committed value
- Deposit proofs: Verifying the encrypted amount matches the committed deposit
- Withdrawal verification: Ensuring withdrawal amounts are consistent across encryption and commitment
- Transfer integrity: Proving amounts in encrypted and committed forms are identical
Typical Usage Pattern
In Token-2022 confidential transfers:- Encrypt the transfer amount for the recipient’s privacy
- Commit to the amount for range proof verification
- Prove they represent the same value using this proof
- Attach a range proof to the commitment to ensure it’s within valid bounds
Security Considerations
Proof Size
Total size: 192 bytes (6 × 32 bytes)- 3 Ristretto points (96 bytes)
- 3 scalars (96 bytes)
Related Proofs
- Ciphertext-Ciphertext Equality: For proving two ciphertexts are equal
- Range Proofs: For proving committed values are within bounds
- Grouped Ciphertext Validity: For proving validity of multi-handle ciphertexts
Source Code
Sigma proof implementation:zk-sdk/src/sigma_proofs/ciphertext_commitment_equality.rs:46
Proof data structure: zk-sdk/src/zk_elgamal_proof_program/proof_data/ciphertext_commitment_equality.rs:41