Equal plaintexts under one ElGamal key #
Example 20.2 of [BS23] (pp. 825–826), in additive notation: for a public key u and two
multiplicative-ElGamal ciphertexts (v₀, e₀) and (v₁, e₁), the Chaum–Pedersen protocol on the
triple (u, v₀ - v₁, e₀ - e₁) proves the relation (20.2): there is a β with
β • g = v₀ - v₁ and β • u = e₀ - e₁ ([BS23], p. 826). When g generates the group,
this says that both ciphertexts encrypt the same message (exists_equalPlaintextsRelation_iff).
Neither the message nor the two encryption exponents are needed.
The protocol is SigmaProtocol.comap of chaumPedersen along the statement map
equalPlaintextsTriple, with the identity on witnesses, so completeness, special soundness and
special HVZK are those of chaumPedersen. Special soundness and special HVZK here are the
library's SigmaProtocol.SpecialSoundness and SigmaProtocol.SpecialHVZK: an extractor that
returns a witness from two accepting transcripts, and a simulator whose transcript law equals the
honest one at each fixed challenge. The efficiency of the extractor and simulator, which
[BS23], Definitions 19.4 and 19.5, also ask for, is a separate property
(EfficientSpecialSoundness, EfficientSpecialHVZK) that is not proved here.
Main definitions #
Cslib.Crypto.Protocols.SigmaProtocol.equalPlaintextsRelation: the relation (20.2).Cslib.Crypto.Protocols.SigmaProtocol.equalPlaintextsTriple: the statement map.Cslib.Crypto.Protocols.SigmaProtocol.equalPlaintexts: the protocol.
Main results #
Cslib.Crypto.Protocols.SigmaProtocol.exists_equalPlaintextsRelation_iff: whenggenerates the group, a statement has a witness iff the two ciphertexts encrypt one message.Cslib.Crypto.Protocols.SigmaProtocol.equalPlaintextsRelation_reencrypt: a pair and its re-encryption satisfy (20.2), with the re-encryption exponent (with opposite sign) as witness.Cslib.Crypto.Protocols.SigmaProtocol.equalPlaintexts_complete,Cslib.Crypto.Protocols.SigmaProtocol.equalPlaintexts_specialHVZK: the protocol is complete and special HVZK for (20.2), with no primality or generator hypothesis.Cslib.Crypto.Protocols.SigmaProtocol.equalPlaintexts_specialSoundness,Cslib.Crypto.Protocols.SigmaProtocol.equalPlaintexts_sound: for primeqthe protocol is special sound for (20.2), and when in additionggenerates the group every prover makes the verifier accept a non-equal-plaintext pair with probability at most1 / |C|.
References #
- D. Boneh and V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Theorem 20.1 (eq. (20.1), p. 824) and Example 20.2 (eq. (20.2), pp. 825–826).
The relation of [BS23], Example 20.2, equation (20.2) (p. 826), in additive notation:
a witness for a public key u and ciphertexts (v₀, e₀) and (v₁, e₁) is β with
β • g = v₀ - v₁ and β • u = e₀ - e₁.
The language #
Two encryptions (β₀ • g, β₀ • u + m) and (β₁ • g, β₁ • u + m) of one message under one key
satisfy (20.2) with β = β₀ - β₁ ([BS23], Example 20.2, p. 826).
When g generates the group, a statement has a witness of (20.2) iff the two ciphertexts
encrypt one message under the key u ([BS23], Example 20.2, p. 826). The generator
hypothesis is used only from left to right.
Re-encryption ([BS23], Example 20.2, p. 826): for any pair (v, e) and exponent
β, the pair (v, e) and its re-encryption (v + β • g, e + β • u) satisfy (20.2), with witness
-β. Both are encryptions of one message under u when (v, e) is an encryption
(β₀ • g, β₀ • u + m), or, for every pair, when g generates the group
(exists_equalPlaintextsRelation_iff). Without either, the relation can hold for a pair that is
no encryption: with g = u = 0, a pair whose first component is nonzero. The book writes β for
both this exponent and the witness of (20.2); they differ by a sign.
The protocol #
The protocol of [BS23], Example 20.2 (p. 826): the Chaum–Pedersen protocol on the
triple (u, v₀ - v₁, e₀ - e₁).
The verification equations z • g = t₁ + c • (v₀ - v₁) and z • u = t₂ + c • (e₀ - e₁).
Honest conversations are accepting.
Special soundness as SigmaProtocol.SpecialSoundness: from two accepting conversations with a
common commitment and distinct challenges, the Chaum–Pedersen extractor, run on the triple,
returns a witness of (20.2). The extractor's efficiency is a separate property, not proved
here.
Special honest-verifier zero knowledge as SigmaProtocol.SpecialHVZK, with the Chaum–Pedersen
simulator run on the triple: its conversations are accepting, and for a witness-statement pair its
transcript law at each fixed challenge equals the honest prover's. The simulator's efficiency is a
separate property, not proved here.
Soundness with error 1 / |C| against arbitrary provers ([BS23], Theorem 20.1,
eq. (20.1), p. 824, applied to Example 20.2, p. 826): when q is prime and g generates the
group, on a public key and two ciphertexts that do not encrypt one message, every prover makes
the verifier accept with output in langOut with probability at most 1 / |C|.