Overview
The zero-ciphertext proof certifies that a given ElGamal ciphertext encrypts the message 0 in the scalar field (Scalar::zero()). This proof is useful for verifying that encrypted values have been fully consumed or that no value exists.
The protocol guarantees computational soundness (by the hardness of discrete log) and perfect zero-knowledge in the random oracle model.
Proof Structure
TheZeroCiphertextProof contains three components:
Commitment to the random masking factor with respect to the public key
Commitment to the random masking factor with respect to the ciphertext handle
The masked secret key value (challenge × secret + blinding factor)
Proof Data Context
TheZeroCiphertextProofData includes:
Generating a Proof
To generate a zero-ciphertext proof, you need:- The ElGamal keypair associated with the ciphertext
- The ciphertext that encrypts zero
- A transcript for the Fiat-Shamir heuristic
Verification
The verification checks the algebraic relation:Pis the ElGamal public keyHis the Pedersen commitment base pointDis the ciphertext handleCis the ciphertext commitmentcandware challenge scalars from the transcript
The proof will fail verification if:
- The ciphertext does not encrypt zero
- Any of the public key, commitment, or handle is the identity point
Use Cases
- Balance verification: Proving an account balance is exactly zero after withdrawal
- Nullifier proofs: Demonstrating that an encrypted value has been consumed
- Zero-knowledge transfers: Verifying intermediate encrypted values are zero
Security Considerations
Related Proofs
- Ciphertext-Ciphertext Equality: For proving two ciphertexts encrypt the same value
- Grouped Ciphertext Validity: For proving validity of grouped ciphertexts
Source Code
Sigma proof implementation:zk-sdk/src/sigma_proofs/zero_ciphertext.rs:41
Proof data structure: zk-sdk/src/zk_elgamal_proof_program/proof_data/zero_ciphertext.rs:34